Skip to content
tastebase

tastebase

Sign in

Your agent gets your look, hearts and dislikes in every project. Folders follow you to every device.

We keep the name, avatar and email your provider shares. Nothing else.

Sonner

free

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

by Emil Kowalski GitHub npm
visit
Sonner website

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

For your agent

Install
npm i sonner
Use 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
Pairs with
Alternatives
Compare Sonner with its alternatives
import { Toaster, toast } from 'sonner'

<Toaster position="bottom-right" />

<button onClick={() => toast('Invite sent', { action: { label: 'Undo', onClick: undoInvite } })}>Invite</button>
Visit