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
Installation#
pnpm dlx shadcn@latest add @force-ui-svelte/collapsible
Usage#
<script lang="ts">
import * as Collapsible from "$lib/components/ui/collapsible/index.js";
</script><Collapsible.Root>
<Collapsible.Trigger>Can I use this in my project?</Collapsible.Trigger>
<Collapsible.Content>
Yes. Free to use for personal and commercial projects. No attribution
required.
</Collapsible.Content>
</Collapsible.Root>Composition#
Use the following composition to build a Collapsible:
Collapsible.Root
├── Collapsible.Trigger
└── Collapsible.ContentControlled State#
Use bind:open to control the state.
<script lang="ts">
import * as Collapsible from "$lib/components/ui/collapsible/index.js";
let open = $state(false);
</script>
<Collapsible.Root bind:open>
<Collapsible.Trigger>Toggle</Collapsible.Trigger>
<Collapsible.Content>Content</Collapsible.Content>
</Collapsible.Root>Examples#
Basic#
Settings Panel#
Use a trigger button to reveal additional settings.
File Tree#
Use nested collapsibles to build a file tree.
RTL#
To enable RTL support in Force UI, see the RTL configuration guide.
API Reference#
See the Radix UI documentation 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