Skip to documentation

ComponentsFeedback & loading

Sonner

Shared primitive

Acknowledge completed work or report an actionable failure.

@/features/ui/toast

Composition preview

Try Sonner alongside its related feedback & loading components. These examples keep all actions local.

No drafts yet
Create a draft when you have something to share.

Usage

import { toast } from "@/features/ui/toast";

toast.success("Changes saved");
// Keep the shared renderer mounted once at the application root.

Composition recipe. Supply application state, handlers and persistence in the owning product component. Inspect the installed source before extending its API.

API & composition

toast.success/error/info/show/dismiss; title, description, duration, optional async action

Usage & accessibility

The shared toast store feeds Sonner while retaining action pending/retry, hover/focus pause, and native-modal placement.

Implementation contract

src/components/ui/sonner.tsx

Use named variants and semantic theme tokens. Preserve existing input values, refs, focus and cancellation behavior. Verify keyboard, narrow layouts and pending/error states when behavior changes.

V-2026-10-19_18.07.14