Sonner
@/components/kamod-ui/sonner
Installation
Import Sonner and helper functions from `@/components/kamod-ui/sonner`.
pnpm add @kamod-ch/uiUsage
Mount Sonner once near app root, then trigger notifications from events.
import { Sonner } from "@/components/kamod-ui/sonner";<Sonner />Basic Toast
Display a short success message after an action.
Dismissible Toast
Close notifications programmatically if workflow changes.
API Reference
Props, slots and variants for this component.
Sonner
Sonner component props and accepted values.
| Prop | Type | Default |
|---|---|---|
| sonner | (args: { title: string; description?: string }) => string | function |
| dismissSonner | (id: string) => void | function |
| Sonner | Notification outlet component | mounted |
Accessibility Notes
Ensure toast messages stay short, avoid critical-only notifications, and keep important outcomes visible in page content.