An opinionated toast component for Svelte.
Setup theme support
By default, Sonner will use the user's system preferences to determine whether to show the light or dark theme. To get around this, you can either pass in a custom
theme prop to the component, or simply use mode-watcher which you can hardcode to
light mode should you wish.
You can learn more about setting up Dark Mode support here.
If you wish to opt out of Dark Mode support, you can uninstall
mode-watcher and remove the
theme prop from the component after installing via CLI, or manually install the component and don't include
Run the following command:
Add the Toaster component
On This Page