- Accordion
- Action Bar
- Alert Dialog
- Alert
- Announcement
- Aspect Ratio
- Autocomplete
- Avatar
- Badge
- Bottom Navigation
- Breadcrumb
- Button Group
- Button
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Circular Progress
- Circular Slider
- Clipboard
- Collapsible
- Color Picker
- Combobox
- Command
- Context Menu
- Data List
- Date Picker
- Dialog
- Drawer
- Editable
- Field
- File Upload
- Float
- Floating Panel
- Frame
- Hint
- Hover Card
- Image Cropper
- Input Group
- Input OTP
- Input
- Item
- Kbd
- Link Overlay
- Listbox
- Marquee
- Menu
- Native Select
- Number Input
- Pagination
- Popover
- Progress
- Prose
- QR Code
- Radio Group
- Rating
- Resizable
- Scroll Area
- Segment Group
- Select
- Separator
- Sheet
- Sidebar
- Signature Pad
- Skeleton
- Skip Nav
- Slider
- Spinner
- Status
- Steps
- Switch
- Table
- Tabs
- Textarea
- Timer
- Toast
- Toggle Group
- Toggle Tooltip
- Toggle
- Tooltip
- Tour
- Tree View
Our flagship product combines cutting-edge technology with sleek design. Built with premium materials, it offers unparalleled performance and reliability.
Key features include advanced processing capabilities, and an intuitive user interface designed for both beginners and experts.
Installation
pnpm dlx shadcn@latest add https://shark.vini.one/r/accordion.json
Usage
import { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from "@/components/ui/accordion";
<Accordion> <AccordionItem> <AccordionTrigger /> <AccordionContent /> </AccordionItem> <AccordionItem> <AccordionTrigger /> <AccordionContent /> </AccordionItem> </Accordion>
Controlled
Use the value and onValueChange props to control the accordion state programmatically.
Open the 2nd item
Examples
Non-collapsible
Set the collapsible prop to false to disable the collapsible behavior and prevent closing the open item.
Our flagship product combines cutting-edge technology with sleek design. Built with premium materials, it offers unparalleled performance and reliability.
Multiple
Use the multiple prop to allow multiple items to be open simultaneously.
Disabled
Use the disabled prop on AccordionItem to prevent interaction with specific items.
Our flagship product combines cutting-edge technology with sleek design. Built with premium materials, it offers unparalleled performance and reliability.
API Reference
Accordion
Root component. Manages expand/collapse state for items.
| Prop | Type | Default |
|---|---|---|
collapsible | boolean | true |
multiple | boolean | false |
value | string[] | - |
defaultValue | string[] | - |
onValueChange | ValueChangeDetails | - |
className | string | - |
asChild | boolean | false |
AccordionItem
Wraps a single accordion section (trigger + content).
| Prop | Type | Default |
|---|---|---|
value | string | required |
disabled | boolean | false |
className | string | - |
AccordionTrigger
Toggles the section open/closed on click.
| Prop | Type | Default |
|---|---|---|
disabled | boolean | false |
className | string | - |
asChild | boolean | false |
AccordionContent
Holds the collapsible content for the section.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |
For a complete list of props, see the Ark UI documentation.