ToastHost

Where toasts stack, and the layer they live on.

import { ToastHost } from '@textui/core';

<ToastHost anchor="bottom-right" />

Props

| Prop | Type | Default | | | — | — | — | — | | anchor | 'top-right' \| 'bottom-right' \| 'top' \| 'bottom' | 'bottom-right' | Where the stack sits. Named anchor so it does not shadow position. |

Plus everything on BoxProps.

Mount one, once, near the root - or let a shell do it, which the shipped ones already do by giving the notification layer a home.

It listens for notifications and renders them on the notification layer, above everything except debug. anchor decides the corner.

See also

  • Toast - the message
  • Layers - why notifications are their own plane

Back to top

MIT licensed. Pre-1.0 - the surface is still moving.