# Accordion — React Native component for Expo

> Sections spring open to their measured height while the chevron turns.

Collapsible sections whose content is measured, so any height springs open smoothly — with a rotating chevron, fade-and-drop content, single or multiple mode, and default, bordered or separated-card styles.

- Docs: https://expokit.in/docs/components/accordion
- Tier: Free
- Also called: collapsible section, expandable list, FAQ accordion
- Category: Display
- Platforms: iOS, Android, web
- Expo Go: yes, no development build needed
- npm dependencies: react-native-svg
- Uses ExpoKit items: kit
- Variants: Default, Bordered, Separated Cards, Controlled

## Installation

Run once per project: `npx @expokit/cli@latest init` (shared theme + KitProvider). Then:

```bash
npx @expokit/cli@latest add accordion
```

The CLI copies the source into your project (you own the code) and installs react-native-svg.

Import: `import { Accordion } from "@/components/ui/accordion";`

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `type` | `"single" \| "multiple"` | `"single"` | One open item at a time, or any number. |
| `value / defaultValue` | `string[]` | `[]` | Open item values (controlled / uncontrolled). |
| `onValueChange` | `(value: string[]) => void` | — | Called when items open or close. |
| `collapsible` | `boolean` | `true` | Single mode: allow closing the open item. |
| `variant` | `"default" \| "bordered" \| "separated"` | `"default"` | Divided list, one bordered box, or separate cards. |
| `accent` | `string` | `theme accent` | Chevron colour of open items. |
| `AccordionItem.value` | `string` | — | Identifies the item in the Accordion's value array. |
| `AccordionItem.title / subtitle` | `ReactNode / string` | — | Header text. |
| `AccordionItem.icon` | `ReactNode` | — | Leading icon; content indents to line up with the title. |
| `AccordionItem.disabled` | `boolean` | `false` | Can't be toggled. |
| `style` | `StyleProp<ViewStyle>` | — | Style for the Accordion's root view (the card in the bordered variant); AccordionItem takes its own. |
| `className` | `string` | — | Tailwind classes on the root when using NativeWind or Uniwind. Prefer style for StyleSheet overrides. |

## Behaviour & accessibility

- **Touch**: Tap a header to open or close its section. In single mode, opening one closes the other; disabled items don't respond.
- **Motion**: Content height springs to its measured size, so any content animates smoothly. The chevron turns 180° on the native driver.
- **Screen readers**: Each header is a button with expanded and disabled state. Content of closed sections is hidden from assistive tech.

## FAQ

### How do I make a collapsible section in React Native?

Use ExpoKit's Accordion: run npx @expokit/cli@latest add accordion in your Expo or React Native project and it copies a ready-made collapsible section into your app as plain TypeScript you can edit. It works on iOS, Android and web, and in Expo Go.

### Does Accordion work in Expo Go?

Yes. Accordion runs in Expo Go on iOS and Android with no development build — its packages (react-native-svg) are all included in Expo Go.

### How do I add Accordion to my Expo app?

Run npx @expokit/cli@latest add accordion in your project. The CLI copies the component's source into your app and installs react-native-svg, so the code is yours to change.

### Is Accordion free?

Yes. Accordion is free: its full source is on this page and the CLI installs it without an account.

### Can I change how Accordion looks?

Yes. It takes its colours, radius and light / dark mode from useKit(), so wrapping your app in <KitProvider accent radius> re-skins it with every other ExpoKit component. The code lives in your project, so you can also edit anything directly.

## More

- Live preview, variants and code: https://expokit.in/docs/components/accordion
- Every ExpoKit component, screen, template and chart: https://expokit.in/llms.txt
- Install commands and props for every free component: https://expokit.in/llms-full.txt
- Pricing: https://expokit.in/pricing
