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
- Toast
- Toggle
- Toggle Group
- Tooltip
- Typography
Get Started
Forms
Component accordion-demo not found in registry.
Installation
pnpm dlx createui@latest add accordion
Usage
import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,
} from "@/components/ui/accordion"<Accordion defaultValue={["item-1"]}>
<AccordionItem value="item-1">
<AccordionTrigger>Is it accessible?</AccordionTrigger>
<AccordionContent>
Yes. It adheres to the WAI-ARIA design pattern.
</AccordionContent>
</AccordionItem>
</Accordion>Examples
Basic
A basic accordion that shows one item at a time. The first item is open by default.
Component accordion-basic not found in registry.
Multiple
Use the multiple prop to allow multiple items to be open at the same time.
Component accordion-multiple not found in registry.
Disabled
Use the disabled prop on AccordionItem to disable individual items.
Component accordion-disabled not found in registry.
Borders
Add border to the Accordion and border-b last:border-b-0 to the AccordionItem to add borders to the items.
Component accordion-borders not found in registry.
Card
Wrap the Accordion in a Card component.
Component accordion-card not found in registry.
API Reference
See the Base UI documentation for more information.