Toast overview
Toast renders short-lived notifications in a fixed viewport and manages queue trimming, dismissal timing, action buttons, and focus-aware Escape behavior for you.
Imports
Use TngToastComponent when you want the wrapper’s built-in queue and minimum notification shell. Reach for the headless toast page when you need to own the markup and timers yourself.
Component import
ts
import { TngButtonComponent, TngToastComponent } from '@tailng-ui/components';
Wrapper variants
The same wrapper queue rendered with the default shell and themed through surrounding page styles.
Wrapper toast controls (plain CSS)
Wrapper toast controls (Tailwind)
No action callbacks yet.
Accessibility baseline
- Neutral and success toasts announce with
role="status". - Warning and danger toasts announce with
role="alert". - Escape dismisses the focused toast when possible, or the latest toast in the stack.
- Use
duration: 0only when the message requires explicit acknowledgement.