Accordion

A vertically stacked set of collapsible sections. Triggers share group focus (arrow keys move between them) and, by default, only one section is open at a time.

Examples

Single (default)

Rogo is an AI analyst that automates research, modelling, and reporting workflows for financial services teams.

Multiple

Rogo is an AI analyst that automates research, modelling, and reporting workflows for financial services teams.

Single-tenant deployments on your cloud or hosted by Rogo. See your account team for the rollout plan.

Controlled

Open: data-sources

Public filings, internal documents, market data providers, and custom connectors via MCP. Permissions are enforced per data source.

Overview

Accordion wraps Base UI Accordion. It comes with light default styling — a bordered container, divided rows, a chevron that rotates when its section is open. Pass multiple to allow more than one section open at a time.

Use Accordion when triggers are siblings the user would expect to navigate between with arrow keys (FAQ lists, settings groups, expandable nav). For a one-off toggle, use Collapsible.

tsx
import {
  Accordion,
  AccordionContent,
  AccordionItem,
  AccordionTrigger,
} from "@rogo-technologies/ui/accordion";

<Accordion defaultValue={["a"]}>
  <AccordionItem value="a">
    <AccordionTrigger>Section A</AccordionTrigger>
    <AccordionContent></AccordionContent>
  </AccordionItem>
</Accordion>;

Usage

Single

Only one section open at a time. Opening one closes the others.

tsx
<Accordion defaultValue={["intro"]}>
  <AccordionItem value="intro">
    <AccordionTrigger>Intro</AccordionTrigger>
    <AccordionContent></AccordionContent>
  </AccordionItem>
  <AccordionItem value="details">
    <AccordionTrigger>Details</AccordionTrigger>
    <AccordionContent></AccordionContent>
  </AccordionItem>
</Accordion>

Multiple

Any number of sections can be open at the same time.

tsx
<Accordion multiple defaultValue={["a", "c"]}>
</Accordion>

Controlled

tsx
const [value, setValue] = useState<string[]>(["a"]);

<Accordion value={value} onValueChange={(next) => setValue(next as string[])}>
</Accordion>;

API

Accordion

PropTypeDefaultDescription
valuestring[]Controlled list of open item values.
defaultValuestring[]Uncontrolled initial open items.
onValueChange(value: string[]) => voidFired when the open set changes.
multiplebooleanfalseAllow multiple items open at once.
orientation"horizontal" | "vertical""vertical"Arrow-key navigation direction between triggers.
loopFocusbooleantrueLoop arrow-key focus past the first / last trigger.
disabledbooleanfalseDisables all items.
classNamestringAdditional CSS classes on the root.

AccordionItem

PropTypeDefaultDescription
valuestringIdentifier used in value / defaultValue.
disabledbooleanfalseDisables just this item.

AccordionTrigger

Renders a native <button>. Includes a default rotating chevron at the end. Replace it by passing your own icon as a child after the label.

AccordionContent

Renders a <div> with a height transition. Padding lives on an inner div so the animation doesn't clip — apply your own className for typography or color overrides.

Guidelines

Do

  • Use Accordion when triggers are siblings users would expect to navigate between with arrow keys.
  • Use multiple for settings or filter panels where independent toggling makes sense.
  • Give each AccordionItem a stable value so controlled state and analytics stay consistent.

Don't

  • Don't use Accordion for a single, isolated toggle — use Collapsible so you don't imply group navigation that doesn't exist.
  • Don't nest Accordions deeply — arrow-key focus rings get confusing past one level.
  • Don't put padding directly on AccordionContent — the inner wrapper already handles it; overriding can cause animation clip.
Made in NYC© 2026 Rogo Technologies Inc.