Toast
Transient notifications with full keyboard and screen-reader support.
Animatedimport { Toaster } from 'umbra-ui/motion'
Props
| Prop | Type | Default | Description |
|---|---|---|---|
closeLabel | string | Dismiss notification | Accessible label of each toast's dismiss button. |
hotkey | string | F8 | `KeyboardEvent.key` that moves focus to the newest toast from anywhere. |
label | string | Notifications | Accessible name of the notifications landmark. |
max | number | 4 | Maximum toasts shown at once; older ones wait their turn. |
position | "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right" | bottom-right | Screen corner or edge the stack is anchored to. |
reducedMotion | "system" | "always" | "never" | "system" | Reduced-motion override. Under reduced motion toasts fade without sliding. |
Usage notes
Mount <Toaster /> once, then call toast() from anywhere.
Accessibility
- The stack is a labelled landmark containing a polite live region;
dangertoasts userole="alert". - F8 (configurable) moves focus to the newest toast; Escape dismisses the focused toast and returns focus to where it was.
- Timers pause on hover and focus.
- Every toast has a labelled dismiss button.
Import
import { Toaster } from 'umbra-ui/motion';
import 'umbra-ui/styles.css'; // once, at the root of your app