Umbra UI

Toast

Transient notifications with full keyboard and screen-reader support.

Animatedimport { Toaster } from 'umbra-ui/motion'

Props

PropTypeDefaultDescription
closeLabel stringDismiss notificationAccessible label of each toast's dismiss button.
hotkey stringF8`KeyboardEvent.key` that moves focus to the newest toast from anywhere.
label stringNotificationsAccessible name of the notifications landmark.
max number4Maximum toasts shown at once; older ones wait their turn.
position "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right"bottom-rightScreen 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; danger toasts use role="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