Hextech UI

Sonner

Live example

Sonner

Installation

Terminal
npx shadcn@latest add https://hextech-ui.vercel.app/r/sonner.json

API reference

These are the main Sonner options. See the exported TypeScript types for inherited native or primitive props.

PropTypeDefault
positiontop-left | top-center | top-right | bottom-left | bottom-center | bottom-rightbottom-right
durationnumber (milliseconds)4000
closeButtonbooleanfalse
themelight | dark | systeminherited
sonner.success / error / warning / info / loading / promisenotification API—

Notification status

Mount Sonner once for the relevant application region. Call the matching status helper and provide text explaining the outcome. Status icons inherit semantic colors in both themes. Promise messages should describe the actual pending action and its result.