Skip to content

Accordion

Free

A stack of headings that each open a panel of text under them. Use it for an FAQ or for settings groups. It has four looks.

  • Base UI
  • React 19
  • Tailwind CSS 4

Added Nov 8, 2026 · MIT + Commons Clause

Playground

Loading the preview

Props

Compose one item for each panel.

pricing-faq.tsx

Accordion

<div>
PropTypeDefaultDescription
variant"contained""default""filled""separated""default"
classNamestring—
From Base UIAccordion.RootBase UI docs
valueAccordionValue<Value>—The controlled value of the item(s) that should be expanded. To render an uncontrolled accordion, use the defaultValue prop instead.
defaultValueAccordionValue<Value>—The uncontrolled value of the item(s) that should be initially expanded. To render a controlled accordion, use the value prop instead.
disabledbooleanfalseWhether the component should ignore user interaction.
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

AccordionItem

<div>
PropTypeDefaultDescription
classNamestring—
From Base UICollapsible.RootBase UI docs
disabledbooleanfalseWhether the component should ignore user interaction.
valueany—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.
onOpenChange—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>
PropTypeDefaultDescription
classNamestring—
headerProps—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>
PropTypeDefaultDescription
classNamestring—
From Base UIAccordion.RootBase UI docs
hiddenUntilFoundbooleanfalseAllows the browser's built-in page search to find and expand the panel contents. Overrides the keepMounted prop and uses hidden="until-found" to hide the element without removing it from the DOM.
keepMountedbooleanfalseWhether 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.
  • Use it for an FAQ or for settings groups.
  • Set multiple to keep many panels open.
  • Pass defaultValue with an array of open items, even for one panel.
  • For one panel with one trigger, use a Collapsible.
  • For views of one thing in one place, use Tabs.
EnterorSpaceOpens or closes the panel of the focused heading.
↑ ↓Moves between the headings.
HomeorEndMoves to the first or the last heading.

Each trigger is a real button in a heading, with its expanded state.

A row is 44px tall, so it is a full touch target.

Panel
panel · the height opens and closes
Row
hover · the fill of the `filled` variant

Built with

Installs with Accordion

Components
Collapsible
  1. AddedAccordion, with Collapsible.
Open the release