Toast

Toast notifications that grow out of the screen edge and stack neatly. A loading toast can turn into a success in place, and you can swipe one away or let it fade.

Preview

Installation

npx @lumioui/cli add toast

Usage

import { useToast, ToastProvider } from "@/components/ui/toast/toast";
<Toast />

Also exported: useToast, ToastProvider.

Examples

Action

Archiving mail.

Loading

Sending calendar invites.

Export flow

One export, one card.

API reference

Prop Type Default
children* React.ReactNode —
position ToastPosition

Where toasts appear. Default "top".

"top"
defaultDuration number

Auto-dismiss duration in ms. 0 = manual dismiss only. Default 4000.

4000
limit number

Max simultaneous toasts. Older ones are dismissed with an exit animation. Default 4.

4
maxVisible number

Stack levels that peek out behind the front toast. Deeper toasts stay queued (timers running) until a slot frees. Default 3.

3
surface "solid" | "glass"

Card material. "solid" (default) is an opaque card with a hairline and soft shadow that reads in both schemes; "glass" is the Lumio glass material for apps whose content behind is photographic / moving.

"solid"