Skip to content
Playground

Accordion

Reveal sections of related content with keyboard-accessible headings.

Reveal sections of related content with keyboard-accessible headings.

Backed by Base UI Accordion for upstream behavior and configuration. Zenos owns the public API, styling, and composition shown on this page.

default

Manage email alerts and push notifications for workspace updates.

plain

Manage email alerts and push notifications for workspace updates.

Each item needs a unique value. Wrap the trigger in Header so the disclosure control keeps proper heading semantics.

TSX
<Accordion.Root defaultValue={["billing"]}>  <Accordion.Item value="billing">    <Accordion.Header>      <Accordion.Trigger>Billing</Accordion.Trigger>    </Accordion.Header>    <Accordion.Content>Invoices and payment methods.</Accordion.Content>  </Accordion.Item></Accordion.Root>

Root uses the same neutral card surface, border, and radius as Collapsible when variant="default". Trigger matches Collapsible interaction states (hover, open, focus ring, chevron). Content animates height and renders a top divider with padded body text in text-text-subtle.

variant="default" is the contained card used in settings panels and docs previews. variant="plain" removes the outer border and fill so the accordion sits flush on the page background—only horizontal dividers separate items, triggers have no hover fill, and content flows directly under the title without an inner divider. The preview at the top compares both side by side.

TSX
import { Accordion } from "@zentara-co/zenos-ui";

By default, opening one item closes the others. Pass multiple when several sections may stay open, such as notification and session settings on the same page.

Choose which workspace events send notifications.

Review devices currently signed in to this account.

Control expansion with value and onValueChange, or use defaultValue for uncontrolled usage. Values are string arrays even when only one panel is open.

Disable an item when its content is unavailable. The trigger stays visible; Base UI sets aria-disabled and blocks activation.

Use Accordion for a related set of labeled sections where heading structure and choosing among panels matters. Use Collapsible for a single optional region such as advanced settings or secondary metadata.

Default parts provide the design-system surface, chevron, dividers between items, and content spacing. Use showChevron={false} when another indicator shows state. Apply contentClassName on the inner wrapper so custom styling does not affect the animated panel height.

Audiences, budgets, and scheduling for the current quarter.

Pass className on Root or Item to tint the surface and borders. Style Trigger hover and open fills the same way as Collapsible. Trigger supports Base UI’s render prop when a specialized element must own the control—keep a clear accessible name and visible expanded state.

Variants

defaultplain
Accordion.Root
Accordion.Item
Accordion.Header
Accordion.Trigger
Accordion.Content

API

PropTypeDefaultDescription
Root.variant default | plain default Default uses a bordered card surface; plain is a flat list with horizontal dividers only.
value string[] — Controlled expanded items.
defaultValue string[] — Initial uncontrolled expanded items.
onValueChange (value: string[]) => void — Runs when expansion changes.
multiple boolean false Allows multiple open items.
disabled (Item / Trigger) boolean false Disables an item and its trigger.
Trigger.showChevron boolean true Shows the built-in disclosure chevron.
Content.contentClassName string — Classes on the inner content wrapper; panel height animation is unchanged.
Root.className string — Merged on the root. Uses bg-background-neutral-card by default, matching Collapsible.

Unless narrowed above, each DOM-rendering part also accepts its underlying native or Base UI props, including className, style, aria-*, and data-*.

Triggers expose button semantics with aria-expanded. Enter and Space toggle the focused section; arrow keys move between triggers in the group. Keep trigger labels concise and unique. Disabled items expose aria-disabled. Motion-reduction preferences disable height and chevron transitions.