4.2.0
Core

Accordion

A vertical stack of headings that each reveal one panel — for content most readers will skip.

Accordion

One panel at a time, and `collapsible` so the open one can be closed again. Radix requires `type`, which discriminates the value — `single` takes a string, `multiple` an array. The panel expands and collapses on the owned motion scale (@OCE-1779).

Two were missing an email address and one duplicated a contact already in this workspace.

Usage

import {
  Accordion,
  AccordionContent,
  AccordionItem,
  AccordionTrigger,
} from '@oceanic-hub/brand-system'
<Accordion type="single">
  <AccordionItem value="…">
    <AccordionTrigger>…</AccordionTrigger>
    <AccordionContent>…</AccordionContent>
  </AccordionItem>
</Accordion>

Composition

Use the following composition to build an Accordion:

Accordion
└── AccordionItem ×3
    ├── AccordionTrigger
    └── AccordionContent

Reach for it when the page is still usable with everything closed: an FAQ, a group of advanced settings, the detail behind a summary. If a reader needs what is inside to make the decision the page is asking for, an accordion has hidden it rather than tidied it.

It is not a tab strip. Tabs switch between views of one thing and exactly one is always showing; an accordion reveals independent sections and may show none. For a single panel with a single trigger, use Collapsible — it is the same disclosure without the roving stack.

type discriminates the value: single takes a string, multiple an array. single alone keeps one panel open at all times — right for a stepper, wrong for an FAQ, where you want collapsible so the last open panel can be closed. An AccordionItem's value is the id the open state is keyed on, so it must be stable and must not be the index.

The panel expands and collapses on the owned motion scale — animate-oc-expand and animate-oc-collapse, 200ms and 150ms from tokens.source.mjs (@OCE-1779). Collapsible is the same disclosure with no transition applied, so a caller who wants one there adds the same two classes by hand.

RTL is not supported. Radix's dir prop reaches the root and upstream ships an RTL demo; we do not, because nothing in this package has ever been laid out or measured right-to-left. The refusal is written down in pairings.json under direction — advertising support we have not measured is the failure mode this repo refuses everywhere else.

Multiple

Reach for type="multiple" when the panels are independent and a reader may want two of them side by side — comparing two settings, not answering one question. The value is an ARRAY here; that is the Radix shape, and Base UI's multiple boolean is the mis-port the contract test pins against.

Sends between 09:00 and 17:00 in the contact's timezone.

Ramps to 200/day over the first two weeks.

Disabled

disabled on an AccordionItem makes its trigger inert and fades it. Reach for it when the section should still be visible — a plan-gated feature a reader ought to know exists; drop the item entirely when it should not.

Every run is listed under Imports, with the file it came from and the rows it skipped.

Borders

Give each item its own rounded border border-hairline box — the same 1px elevation Card uses — when the sections are peers a reader scans rather than one list they read down. Composition only: cn() is tailwind-merge, so the item's default bottom rule is replaced, not fought.

Seats are counted on the first of the month and charged in arrears. Adding a seat mid-cycle is prorated; removing one takes effect at the next renewal.

In a card

When the set needs a title and a boundary, let Card carry both and the accordion carry neither. The last item drops its rule with border-b-0, so nothing draws a line just above the card's own padding.

Plan and billing

The questions support answers most often.

Team, renewing annually. Your seat count and next renewal date are at the top of Settings → Billing.

API Reference

See the Accordion API page for every prop of every part, with types, defaults and the contract that pins them.

On this page