Sonner
llms.txtExample
Usage
In your root layout:
<Toaster />
In your page:
<Button onclick={handleClick}>Default</Button>
API Reference
Toaster
A toast notification container. Place once in your layout and use the toast() function to show notifications. Built on svelte-sonner.
Property Type Description
colors
object
Color mapping for toast types. Colors can be: 'blue' | 'red' | 'yellow' | 'green' | 'indigo' | 'purple' | 'pink' | 'orange' | 'teal' | 'emerald' | 'lime' | 'cyan' | 'sky' | 'rose' | 'amber' | 'violet' | 'fuchsia' | 'base' | 'accent'. Default:
{ default: 'accent', success: 'green', error: 'red', info: 'blue' }Property
colors