A vertically stacked set of interactive headings that each reveal an associated section of content.
Full keyboard navigation.
Supports horizontal/vertical orientation.
Supports Right to Left direction.
Can expand one or multiple items.
Can be controlled or uncontrolled.
Install the component from your command line.
Import all parts and piece them together.
Contains all the parts of an accordion.
Contains all the parts of a collapsible section.
Wraps an Accordion.Trigger. Use the asChild prop to update it to the appropriate heading level for your page.
Toggles the collapsed state of its associated item. It should be nested inside of an Accordion.Header.
Contains the collapsible content for an item.
Use the defaultValue prop to define the open item by default.
Use the collapsible prop to allow all items to close.
Set the type prop to multiple to enable opening multiple items at once.
You can add extra decorative elements, such as chevrons, and rotate it when the item is open.
Use the orientation prop to create a horizontal accordion.
Use the --radix-accordion-content-width and/or --radix-accordion-content-height CSS variables to animate the size of the content when it opens/closes:
Adheres to the Accordion WAI-ARIA design pattern.