MindeesUI
ComponentsDisplay

Accordion

Single collapsible section with a chevron-led header and body, supporting both controlled and uncontrolled open state.

Accordion is a single expand/collapse section. It supports both uncontrolled (defaultOpen) and controlled (open + onOpenChange) state and exposes the expanded state to screen readers through accessibilityState.

Import

import { Accordion } from '@mindees/ui';

Usage

<Accordion title="Shipping details" defaultOpen>
  <Text>Orders ship within 1–2 business days.</Text>
</Accordion>
const [open, setOpen] = useState(false);

<Accordion title="Advanced" open={open} onOpenChange={setOpen}>
  <Text>Controlled body content.</Text>
</Accordion>;

Props

PropTypeDefaultDescription
titleReactNodeHeader content. Strings render as semibold Text; nodes render as-is.
childrenReactNodeBody content shown when expanded.
defaultOpenbooleanfalseInitial open state when uncontrolled.
openbooleanControlled open state. When set, internal state is ignored.
onOpenChange(next: boolean) => voidFires whenever the user toggles the header.

Accessibility

The header is a Pressable with accessibilityRole="button" and accessibilityState.expanded reflecting the current open state. The chevron icon swaps between right (collapsed) and down (expanded) for a redundant visual cue.

On this page