Skip to content
Native Animation
Auto Height Accordion animation preview

Auto Height Accordion

A measured FAQ accordion that accommodates any answer length.

$9 for this animation

Checkout opens soon. Leave your email and we will tell you the moment you can buy it.

One email when checkout opens. No spam.

Add to your project

Copy the component and its assets into your app with the Native Animation CLI, or paste the agent prompt into Claude Code, Codex or Cursor once the MCP server is connected.

npx nativeanimation add auto-height-accordion

About this animation

A measured FAQ accordion that accommodates any answer length.

How it works

  1. Each answer measures its natural content height.
  2. A spring-derived UI value drives its clip height, fade, and chevron.
  3. Controlled and uncontrolled open ids support product state or local use.

Install

npx expo install react-native-reanimated

Usage

<AutoHeightAccordion items={[{ id: 'delivery', title: 'When?', content: 'Within two days.' }]} allowMultiple />

Props

PropTypeDefaultDescription
itemsAccordionItem[]—Questions and answers.
valuestring[]—Controlled ids.
defaultValuestring[][]Initial ids.
allowMultiplebooleanfalseKeep several answers open.
accentColorstring'#645BFF'Active color.

Compatibility

Expo SDK 57, React Native 0.86, and Reanimated 4.5; iOS, Android, and web supported but unverified on devices.

Accessibility

Headers expose button and expanded states. Reduced Motion preserves state changes with a stiffer, short spring.