Accordion

Expandable sections that grow in place and gently push the content below. Allows single or multiple open items, with an optional mode that highlights the section you open.

Guide: How to build an accordion in React Native →

Preview

Installation

npx
npx @lumioui/cli add accordion

Usage

import { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from "@/components/ui/accordion/accordion";
<Accordion />

Also exported: AccordionItem, AccordionTrigger, AccordionContent.

Examples

Multiple

The product-page habitat: Details, Materials and Shipping sections under a sneaker, several open at once, hairlines between them.

Single

A help screen for a pet-insurance app: one answer open at a time (opening a question closes the last), long questions wrap to two lines instead of truncating.

API reference

Accordion

Prop Type Default
type "single" | "multiple"

Single = only one open at a time.

"single"
value string[]

Controlled open items.

—
defaultValue string[]

Initial open items (uncontrolled).

—
onValueChange (value: string[]) => void

Called when the open set changes.

—
collapsible boolean

Allow collapsing the last open item in single mode. Default true.

true
lit boolean

Lumio light (opt-in): closed questions sit at 70% ink, the open item lights with a faint accent wash before its panel grows, and the copy switches on once the surface has started to open. Default false.

false
className string —

AccordionItem

Prop Type Default
value* string —
disabled boolean

Disable this item's trigger.

false
className string —

AccordionTrigger

Prop Type Default
icon IconName

Optional leading icon name.

—
accessibilityLabel string

Accessible label (defaults to children text).

—
accessibilityHint string

Hint announced after the label.

—
className string —
textClassName string —
iconClassName string —
children React.ReactNode —

AccordionContent

Prop Type Default
description string

Optional description shown above the main content.

—
className string —
textClassName string —
descriptionClassName string —
children React.ReactNode —