Mounting the Host
toi doesn't render anything on its own — it registers a request in an internal store and waits for something to render it. ToiHost is that something: it subscribes to the store and renders every component currently mounted by toi.
ToiHost needs to be mounted once, but it doesn't matter where — every call to toi, from anywhere in the app, renders into the same host. There's no need for one host per feature or per component type. Click "Show toast" a few times below to see several requests stack up inside the same host, each dismissible on its own:
What it renders
ToiHost wraps its children in a <section> with aria-live="polite" and aria-label="notifications", so screen readers announce dialogs and toasts as they're mounted:
Beyond that wrapper, ToiHost adds no markup, styling, or positioning of its own — each component you pass to toi is responsible for its own presentation (for example, a <dialog> that manages its own centering, or a toast that positions itself with CSS).
If toi is called before ToiHost is mounted, the request is simply queued in the store; it renders as soon as ToiHost mounts and reads the current snapshot.