Sonner
freeOpinionated toast component with stacking, swipe to dismiss and promise toasts; ports for Vue, Svelte, Solid and Angular.

Try these
react-hot-toast
Lightweight toast library for React with a headless useToaster hook for fully custom UI.
Base UI
Unstyled, accessible React primitives from the Radix, Floating UI and MUI teams.
shadcn/ui
Copy-in React components on Tailwind, built on Base UI, Radix or React Aria, plus a registry CLI.
shadcn-vue
The Vue port of shadcn/ui: copy-in Tailwind components on Reka UI.
Try it
Looks that pick it
Minimalfirst pickApple-likefirst pickPlayfulfirst pickCorporate / dashboardfirst pickClaymorphismfirst pickTactile 3Dfirst pickMaterial Youfirst pickFluentfirst pickiOS nativefirst pickmacOS desktopfirst pickBento gridfirst pickFlat designfirst pickand 18 more
For your agent
Install
npm i sonnerUse it for
- confirming a background action finished away from where it started (Saved, Invite sent)
- an undoable destructive action (Deleted 3 items, Undo)
- progress of an async task the user can walk away from (toast.promise)
Skip it when
- form validation errors: show them inline next to the field
- confirming an action at the button the user just pressed: change the button itself (torph Copy -> Copied, a check icon)
- errors the user must act on or might miss: use an inline alert or a dialog; toasts disappear
- every successful click: toasts for trivial actions train users to ignore them
- a progress bar shown inline: use the kit's Progress component
What's inside20 free
- Toaster
- toast()
- toast.success
- toast.error
- toast.info
- toast.warning
- toast.loading
- toast.promise
- toast.custom
- toast.dismiss
- Action / Cancel buttons
- Headless
- Updating toasts
- Persisting toasts
- useSonner
- Expand
- Position
- Multiple Toasters
- Dynamic theme
- Styling (unstyled, classNames)
Facts
- Frameworks
- react, vue, svelte, solid, angular
- Styling
- css
- Weight
- small
- Accessibility
- ok
- Maturity
- established
- License
- MIT
- Price
- Free
Alternatives
import { Toaster, toast } from 'sonner'
<Toaster position="bottom-right" />
<button onClick={() => toast('Invite sent', { action: { label: 'Undo', onClick: undoInvite } })}>Invite</button>https://sonner.emilkowal.ski
Loading website