Kinetik UI

Expand Card

.md

A row that opens into a card: the thumbnail grows into a wide picture and the details rise in beneath it.

v1.0.0Live on webreact-native-gesture-handlerreact-native-reanimatedreact-native-worklets
Component preview

Installation

Kinetik CLI
npx kinetik-ui add expand-card

The CLI copies the source and installs native dependencies with npx expo install, so versions match your Expo SDK. With shadcn: npx shadcn@latest add https://kinetik-ui.dev/r/expand-card.json

Install manually

  1. Install dependencies
    npx expo install react-native-gesture-handler react-native-reanimated react-native-worklets
  2. Copy the source files
    • components/kinetik/expand-card.tsx
    View source files

Usage

import { ExpandCard } from '@/components/kinetik/expand-card';

<ExpandCard image={{ uri: trip.photo }} title={trip.name} subtitle={trip.dates}>
  <Text>{trip.summary}</Text>
</ExpandCard>;

Uncontrolled by default. Pass expanded and onExpandedChange to drive it, for example to keep only one card of a list open at a time.

When to use

  • Lists where each row has a picture and a little more to say: trips, recipes, events, artworks.
  • Settings or FAQs that benefit from a visual anchor.

When not to use

  • Long content. Navigate to a detail screen instead.
  • Rows without an image; a plain disclosure row is clearer.

Notes

  • The card measures its title and body, so the open height always fits the content.
  • Children are laid out at the card's width; keep interactive content out of the body, since a tap on the card toggles it.
  • A light tap plays as it opens and closes.

Props

ExpandCardProps

PropTypeDefaultDescription
imagerequiredImageSourcePropType—
titlerequiredstring—
subtitlestring—
childrenReactNode—Shown under the title once the card is open.
expandedboolean—Controlled open state.
defaultExpandedbooleanfalseInitial state when uncontrolled. Defaults to false.
onExpandedChange(expanded: boolean) => void—
imageAspectnumber0.62Image height divided by width when open. Defaults to 0.62.
thumbSizenumber64Size of the closed thumbnail. Defaults to 64.
hapticsbooleantrueA light tap when it opens or closes. Defaults to true.
styleStyleProp<ViewStyle>—

Performance and accessibility

Performance

Budget
One spring drives the card height, picture size and title position on the UI thread; nothing runs at rest.
Measured

Pixel 9 emulator, API 35, release build · interaction median 1.00× the system Settings app on the same emulator (indicative only) · no frames drawn at rest · 153 MB app memory

Real-device measurement pending.

Accessibility

Reduced motion
Opens and closes in one step, without the morph.
Screen readers
A button named by the title and subtitle with an expanded state; the body is hidden from screen readers while closed.
Touch target
The whole row, at least 88 pt tall.

Source files

components/kinetik/expand-card.tsx is in the Code tab of the preview above.