Toaster
nivalis-ui/toasterFreeComponent
A toaster component.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/nivalis-studio/nivalis-ui/main/public/r/toaster.jsonSource
1'use client';23import { Toaster as Sonner } from 'sonner';45type ToasterProps = React.ComponentProps<typeof Sonner>;67const Toaster = ({ ...props }: ToasterProps) => {8 return (9 <Sonner10 className='toaster group'11 toastOptions={{12 classNames: {13 toast:14 'group toast group-[.toaster]:bg-white group-[.toaster]:text-gray-950 group-[.toaster]:border-gray-200 group-[.toaster]:shadow-lg dark:group-[.toaster]:bg-gray-950 dark:group-[.toaster]:text-gray-50 dark:group-[.toaster]:border-gray-800',15 description:16 'group-[.toast]:text-gray-500 dark:group-[.toast]:text-gray-400',17 actionButton:18 'group-[.toast]:bg-gray-900 group-[.toast]:text-gray-50 dark:group-[.toast]:bg-gray-50 dark:group-[.toast]:text-gray-900',19 cancelButton:20 'group-[.toast]:bg-gray-100 group-[.toast]:text-gray-500 dark:group-[.toast]:bg-gray-800 dark:group-[.toast]:text-gray-400',21 },22 }}23 {...props}24 />25 );26};2728export { Toaster };
What it pulls in
npm packages
Files it writes
More from @nivalis/ui
All 23 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | @nivalis/ui | Components | Free | 1 dep | |
| Avataravatar | @nivalis/ui | Components | Free | 1 dep | |
| Badgebadge | @nivalis/ui | Components | Free | no deps | |
| Breadcrumbbreadcrumb | @nivalis/ui | Components | Free | 1 dep | |
| Buttonbutton | @nivalis/ui | Components | Free | 1 dep | |
| Cardcard | @nivalis/ui | Components | Free | no deps | |
| Checkboxcheckbox | @nivalis/ui | Components | Free | 1 dep | |
| Commandcommand | @nivalis/ui | Components | Free | 2 deps · 2 files |
