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/accordion
Usage#
<script lang="ts">
import * as Accordion from "$lib/components/ui/accordion/index.js";
</script><Accordion.Root type="single" collapsible>
<Accordion.Item value="item-1">
<Accordion.Trigger>Is it accessible?</Accordion.Trigger>
<Accordion.Content>
Yes. It adheres to the WAI-ARIA design pattern.
</Accordion.Content>
</Accordion.Item>
</Accordion.Root>Examples#
Basic#
A basic accordion that shows one item at a time. The first item is open by default.
Multiple#
Use type="multiple" to allow multiple items to be open at the same time.
Disabled#
Use the disabled prop on Accordion.Item to disable individual items.
Borders#
Add border to the Accordion.Root and border-b last:border-b-0 to the Accordion.Item to add borders to the items.
Card#
Wrap the Accordion.Root in a Card component.
RTL#
To enable RTL support in Force UI, see the RTL configuration guide.
API Reference#
| Prop | Type | Default | Description |
|---|---|---|---|
| type | "single" | "multiple" | "single" | Determines whether one or multiple items can be opened at the same time. |
| collapsible | boolean | false | When type is "single", allows closing content when clicking trigger for an open item. |
| value | string | string[] | — | The controlled value of the item(s) to expand. |
| disabled | boolean | false | When true, prevents the user from interacting with the accordion item. |
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