Compose one item for each panel.
pricing-faq.tsx
Accordion
<div>| Prop | Type | Default | Description | |||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| variant | "contained""default""filled""separated" | "default" | ||||||||||||||||||||||||||||||||||||||
| class | string | — | ||||||||||||||||||||||||||||||||||||||
From Base UIAccordion.RootBase UI docs | ||||||||||||||||||||||||||||||||||||||||
| value | AccordionValue<Value> | — | The controlled value of the item(s) that should be expanded. To render an uncontrolled accordion, use the defaultValue prop instead. | |||||||||||||||||||||||||||||||||||||
| default | AccordionValue<Value> | — | The uncontrolled value of the item(s) that should be initially expanded. To render a controlled accordion, use the value prop instead. | |||||||||||||||||||||||||||||||||||||
| disabled | boolean | false | Whether the component should ignore user interaction. | |||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. | |||||||||||||||||||||||||||||||||||||
AccordionItem
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| class | string | — | |
From Base UICollapsible.RootBase UI docs | |||
| disabled | boolean | false | Whether the component should ignore user interaction. |
| value | any | — | A unique value that identifies this accordion item. If no value is provided, a unique ID will be generated automatically. Use when controlling the accordion programmatically, or to set an initial open state. |
| on | — | Event handler called when the panel is opened or closed. | |
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
AccordionTrigger
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| class | string | — | |
| header | — | Props of the heading around the button (Base UI Accordion.Header, an <h3>). Set the level that fits the page with a render function: headerProps={{ render: ({ children...props }) => <h2 {...props}>{children}</h2> }}. The element form render: <h2 /> works too, but jsx-a11y/heading-has-content reports it, because the rule cannot see that Base UI adds the children. A className here adds to the component classes. | |
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
AccordionContent
<div>| Prop | Type | Default | Description | |||||||
|---|---|---|---|---|---|---|---|---|---|---|
| class | string | — | ||||||||
From Base UIAccordion.RootBase UI docs | ||||||||||
| keep | boolean | false | Whether to keep the element in the DOM while the panel is closed. This prop is ignored when hiddenUntilFound is used. | |||||||
| render | — | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render. | ||||||||
| ||||||||||
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. | |||||||
| EnterorSpace | Opens or closes the panel of the focused heading. |
|---|---|
| ↑ ↓ | Moves between the headings. |
| HomeorEnd | Moves to the first or the last heading. |
- CollapsiblePick Collapsible for one panel with one trigger, not a stack of headings.
- TabsA row of tabs that switch the panel under them, such as Overview, Activity, and Settings. A sliding mark shows the open tab.
- SpoilerPick Spoiler for one block of long content cut at a height, with a Show more button under a fade.
Built with
Installs with Accordion
- Components
- Collapsible





