Skip to main content
239

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Themes
React Native docs
LayoutReact Native

Accordion

Stack disclosure sections with single or multiple expansion.

Public APILumenAccordionReact Native

Native example

Use Accordion

Use single mode for one open section at a time. Keep titles short and put detail in the body.

Accordion rendered in the Expo web renderer Lumen playground

Captured exampleExpo web renderer

Open interactive preview
Open the Accordion demo
tsx
import { LumenAccordion } from '@santi020k/lumen-react-native'
import { useState } from 'react'

const answers: Record<string, string> = {
  shipping: 'Orders arrive within three business days.',
  returns: 'Return an unused item within 30 days for a full refund.',
  warranty: 'Every device includes a two-year limited warranty.'
}

export function OrderFaq() {
  const [open, setOpen] = useState<string[]>(['shipping'])

  return (
    <LumenAccordion
      type="single"
      value={open}
      onValueChange={setOpen}
      items={[
        { value: 'shipping', title: 'Shipping', description: 'When your order arrives' },
        { value: 'returns', title: 'Returns' },
        { value: 'warranty', title: 'Warranty' }
      ]}
      renderContent={item => answers[item.value]}
    />
  )
}
React Native
A controlled single-mode FAQ accordion that keeps one answer open at a time.

Reference

Public API

The primary shared and platform-specific options exposed by LumenAccordion.

APIValues or typeDefaultDescription
items / type / variantsections / single or multiple / card, flush, or hairlinerequired / multiple / defaultUse single mode for one open section at a time.

Native behavior

Design and accessibility

When to use it

Use single mode for one open section at a time. Keep titles short and put detail in the body.

Accessibility

Each header is a button with expanded state; collapsed content is hidden.

Shared component

Available on other platforms

Apple / SwiftUIAndroid / Compose Web
React Native docsNative primitives