Applies to every preview on the site.
Installation
One command copies the source into your app — you own the code and can change anything.
After you add the file, import it like any local component:
import { Accordion } from "@/components/ui/accordion";Or add it with the CLI (installs any missing peers):
Usage
useKit(). Wrap your app in <KitProvider accent="#6366f1" radius={14}> to re-skin every component at once.Like this? There's a lot more in Pro Pro
12 full screens built from the same kit — install them the same way.
Props
| Prop | Type | Default |
|---|---|---|
| type One open item at a time, or any number. | "single" | "multiple" | "single" |
| value / defaultValue Open item values (controlled / uncontrolled). | string[] | [] |
| onValueChange Called when items open or close. | (value: string[]) => void | — |
| collapsible Single mode: allow closing the open item. | boolean | true |
| variant Divided list, one bordered box, or separate cards. | "default" | "bordered" | "separated" | "default" |
| accent Chevron colour of open items. | string | theme accent |
| AccordionItem.value Identifies the item in the Accordion's value array. | string | — |
| AccordionItem.title / subtitle Header text. | ReactNode / string | — |
| AccordionItem.icon Leading icon; content indents to line up with the title. | ReactNode | — |
| AccordionItem.disabled Can't be toggled. | boolean | false |
| style Style for the Accordion's root view (the card in the bordered variant); AccordionItem takes its own. | StyleProp<ViewStyle> | — |
| className Tailwind classes on the root when using NativeWind or Uniwind. Prefer style for StyleSheet overrides. | string | — |
Customization
You own the source file — tune appearance with props (no fork required for most tweaks). For brand-wide colours and radius, wrap your app in KitProvider; for one-off looks, use the style props below.
Design theme
Open Design theme on the live preview — accent, corner radius and font update every variant instantly (same as KitProvider in your app).
Variants
Pick the Variants chip above the preview, or set variant=… — "default" | "bordered" | "separated".
Style props
React Native style and typed slots like fieldStyle, plus optional root className when you use NativeWind or Uniwind (cnProps from kit).
- variant
- "default" | "bordered" | "separated" · default "default"Divided list, one bordered box, or separate cards.
- accent
- string · default theme accentChevron colour of open items.
- style
- StyleProp<ViewStyle>Style for the Accordion's root view (the card in the bordered variant); AccordionItem takes its own.
- className
- stringTailwind classes on the root when using NativeWind or Uniwind. Prefer style for StyleSheet overrides.
Map tokens from your design system on Bring your design system or read Theming for KitProvider and NativeWind / Uniwind setup.
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.
Source
FAQ
How do I make a collapsible section in React Native?
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?
react-native-svg) are all included in Expo Go.How do I add Accordion to my Expo app?
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?
Can I change how Accordion looks?
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.