Feedback

Toasts for transient notifications

Toasts acknowledge background work—saved settings, queued jobs, or soft failures—without modal interruption. Integrate them in React apps and Next.js client islands that own global providers.

Examples

Compact size for lightweight confirmations.


Toast variants examples

Each row shows the hook call that matches the button you click, with a Variant: line naming the toast tokens.





























What it does

Limit concurrent toasts and preserve reading order for screen readers.

Provide action buttons sparingly to reduce accidental clicks.

Composition and API

Prefer compound subcomponents instead of one oversized prop bag. Export a small, documented API for your design system.

Never rely solely on toasts for critical legal consent.

Common use cases

  • Confirm CRUD actions after server mutations.
  • Surface copy-to-clipboard success.
  • Notify when async exports finish.
  • Warn about connectivity retries.

Accessibility

Keyboard order, focus rings, and ARIA attributes should match production usage. Test with your supported browsers and assistive technologies when semantics are non-trivial.

This preview page exposes a single h1 in the hero for a clean outline.

Next.js integration notes

Colocate examples under the App Router, keep server and client boundaries explicit, and avoid pulling interactive overlays into unexpected server layouts.

Set NEXT_PUBLIC_SITE_URL so canonical and Open Graph URLs resolve on deploy.

FAQ

Does the Toast component work with Next.js App Router?

Yes. Import it like any other React component; keep interactive subtrees in client components when you need hooks or browser APIs, and leave static structure in server components where possible.

Can I customize toast with Tailwind CSS?

Zentauri UI exposes class-friendly variants and slots so you can extend styles with Tailwind utilities without fighting inline styles.

Is this Toast implementation accessible by default?

Primitives follow sensible defaults, but accessibility depends on how you label controls, manage focus, and wire keyboard handlers in your app. Validate critical flows with keyboard-only use and screen readers.