Skip to content
Overlay

Toast

Transient notifications that auto-dismiss. Service/hook-based API — place LlmToastContainer once in app root.

LlmToastProvider + useLlmToast
WCAG AA0 deps

Demo

Live PreviewReact
jsx
// App root:
<LlmToastProvider>
  <App />
  <LlmToastContainer position="bottom-right" />
</LlmToastProvider>

// In any component:
const { show } = useLlmToast();
show('Saved!', { variant: 'success' });
show('Error occurred', { variant: 'danger', duration: 8000 });
show('Persistent', { duration: 0 });

API (Angular)

PropTypeDefaultDescription
variant'default' | 'success' | 'warning' | 'danger' | 'info''default'Color scheme of the toast
durationnumber5000Auto-dismiss delay in ms. 0 = no auto-dismiss
dismissiblebooleantrueShow a dismiss button
position'top-right' | 'top-center' | 'bottom-right' | 'bottom-center''bottom-right'Container position (on LlmToastContainer)

Import

ts
import { LlmToastProvider, LlmToastContainer, useLlmToast } from '@atelier-ui/angular';

Accessibility

ARIA rolestatus / alert

KeyAction
TabReach the dismiss button inside the toast.
Enter / Space (on dismiss)Close the toast early.
  • Default toasts live in an aria-live="polite" region — announced without interrupting.
  • Danger-variant toasts use role="alert" so screen readers announce them immediately.
  • Auto-dismiss respects prefers-reduced-motion and pauses while the toast is hovered or focused.