Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Avatar
- Badge
- Breadcrumb
- Button
- Button Group
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Collapsible
- Combobox
- Command
- Context Menu
- Data Table
- Date Picker
- Dialog
- Drawer
- Dropdown Menu
- Empty
- Field
- Hover Card
- Input
- Input Group
- Input OTP
- Item
- Kbd
- Label
- Menubar
- Native Select
- Navigation Menu
- Pagination
- Popover
- Progress
- Radio Group
- Resizable
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Sonner
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Toggle
- Toggle Group
- Tooltip
- Typography
Get Started
@shadcn/react
@shadcn/helpers
Force UI registry
Utilities
About#
Sonner is built and maintained by emilkowalski.
Installation#
Run the following command:
pnpm dlx shadcn@latest add @force-ui-svelte/sonner
Add the Toaster component
<script lang="ts">
import { Toaster } from "$lib/components/ui/sonner/index.js";
let { children } = $props();
</script>
{@render children()}
<Toaster />Usage#
<script lang="ts">
import { toast } from "svelte-sonner";
</script><Button onclick={() => toast("Event has been created.")}>Show Toast</Button>Examples#
Types#
Description#
Position#
Use the position prop to change the position of the toast.
API Reference#
See the Sonner API Reference for more information.
Deploy your shadcn/ui app on Vercel
Trusted by OpenAI, Sonos, Adobe, and more.
Vercel provides tools and infrastructure to deploy apps and features at scale.
Deploy to Vercel