// preview in
saved for every page

Accordion

A stack of headings that each open a section in place, for long content people read one part of at a time, like an FAQ. Collapsible is the single version, for one show/hide.

Built on Base UIPattern WAI-ARIA AccordionClient componentSource ↗
minimal · light · #3fa34d

multiple

Installation

Set up Camaleo once (Installation), then import what you need. It renders on the client.

import { Accordion, AccordionItem, AccordionTrigger, AccordionPanel, Collapsible, CollapsibleTrigger, CollapsiblePanel } from "@camaleo/react";

Anatomy

AccordionTrigger puts its button inside a heading, so the sections show up in a screen reader's list of headings. It is an h3; set level to fit the page's outline, such as level={4} under a card title. The panel animates its height; the padding sits on an inner element so nothing jumps. Collapsible has the same trigger and panel without the heading.

Examples

Every example is a real file you can copy. They all wear the skin, mode and brand from the bar above. Open a section, then try Tab and Enter.

minimal · light · #3fa34d

Grown at 1,200 m in the Mantiqueira range, Minas Gerais, by the Silva family. Harvested in July 2026.

15 g of coffee to 250 ml of water at 93 °C. Medium-fine grind for a filter, coarse for a French press.

Several open

With multiple, opening a section leaves the others open. Use it when people read sections side by side; defaultValue opens the ones most people need.

Sections of a form

Split long settings into sections people fill one at a time. keepMounted keeps the fields of closed sections in the form, so what people typed is still sent.

Expand all

Click the button. With value and onValueChange you control which sections are open, so one button can open or close them all.

Found by page search

Press Ctrl+F and search for "invoice". With hiddenUntilFound, closed panels stay in the page and open when the browser finds a match in them.

Payouts open once your bank account is verified. We usually finish within 2 business days.

Disabled, with a reason

A disabled header is skipped by Tab, so keep the reason in visible text next to it: say why it's closed and when it opens.

Export orders

Advanced options

Collapsible hides options most people never need, so the form stays short and the defaults do the work.

The Pro plan includes
  • Unlimited products
  • Up to 3 stores
  • Abandoned cart emails

Show more

Click it. The extra items appear right above the button, where the reader stopped, and the label says what it will do next.

In context

These are whole pieces of UI you can copy, in the skin you picked.

Help center

Answers to the questions we get most.

Yes, within 30 days of delivery, in its original packaging. Start the return from My orders and we email you a prepaid label.

Still need help?
Help centerCard · SearchInput · Accordion · Button
Product filtersAccordion · Checkbox · RadioGroup · Badge

Order summary

Subtotal
$186.40
Shipping
Free
Total
$186.40
Order summaryCard · Collapsible · Separator · Button

Guidelines

DoHeaders that say what's inside.

A question or a topic tells people whether to open it, and reads well in a list of headings.

Don’tVague headers.

"More information" and "Other" make people open every section to find anything.

PlanPriceOrders
Basic$9 per monthUp to 100 orders
Pro$29 per monthUnlimited orders
DoThings to compare, side by side.

Prices and limits in one table can be read at a glance.

Don’tHiding what people compare.

With one plan open at a time, people have to remember the other one's price.

Props

PropTypeDefaultDescription
valueValue[]—The controlled value of the item(s) that should be expanded. To render an uncontrolled accordion, use the defaultValue prop instead.
defaultValueValue[]—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.
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.
onValueChange(value, eventDetails) => void—Event handler called when an accordion item is expanded or collapsed. Provides the new value as an argument.
multiplebooleanfalseWhether multiple items can be open at the same time.

AccordionItem takes a value and disabled. AccordionTrigger takes level (1 to 6, default 3) for the heading around it. AccordionTrigger and AccordionPanel take the props of their element.

Collapsible opens and closes one panel:

PropTypeDefaultDescription
openboolean—Whether the collapsible panel is currently open. To render an uncontrolled collapsible, use the defaultOpen prop instead.
defaultOpenbooleanfalseWhether the collapsible panel is initially open. To render a controlled collapsible, use the open prop instead.
onOpenChange(open, eventDetails) => void—Event handler called when the panel is opened or closed.
disabledbooleanfalseWhether the component should ignore user interaction.
Also accepts every prop of the underlying primitive and native attributes.

Styling hooks

Restyle it without forking: target the attributes, or set the tokens on a parent, a skin or the accordion itself.

Attributes

data-openon an open item and its panel
data-panel-openon the trigger while its panel is open
data-disabledon a disabled item, trigger and panel
data-starting-style · data-ending-stylewhile the panel opens and closes

Tokens it reads

Color

--cml-border--cml-fg--cml-fg-secondary--cml-focus-offset--cml-focus-ring--cml-focus-width

Shape & size

--cml-border-width--cml-font-size-field

Type & motion

--cml-duration-base--cml-ease-standard--cml-font-control--cml-font-weight-control

This component only

--cml-accordion-chevron--cml-accordion-plus
/* a plus that turns into a minus, only on the help page */
.help [data-slot="accordion"] {
  --cml-accordion-chevron: none;
  --cml-accordion-plus: inline-block;
}

Accessibility

TabMoves to the next header, or into an open panel's links and fields.
Shift + TabMoves to the previous header or control.
Enter / SpaceOpens or closes the focused section.
Was this page helpful? · Edit this page on GitHub