Skip to content

Early previewhamur is not on npm yet. The components are being built in the open, follow along on GitHub.

UIComponentsReact

Sonner

There is no Sonner item: Toast stands in for it, on the headless Toast.

Use Toast

shadcn's sonner item installs the sonner library. Here the same job is done by the Toast item, which adds no library: stacking, timeouts, swiping and the live region come from the headless Toast.

npx shadcn@4.23.0 add https://hamur.dev/r/react/toast.json

From sonner

Render Toaster once, as with sonner, and call the layer's toast manager:

sonnerToast
toast("Saved")toast.add({ title: "Saved" })
toast.success("Saved")toast.add({ type: "success", title: "Saved" })
toast.promise(p, { … })toast.promise(p, { … })
toast.dismiss(id)toast.close(id)
<Toaster position richColors /><Toaster limit timeout />

The Toast page lists the other differences.