Kinetik UI

Question Deck

.md

A questionnaire card on a loose stack: answers spring in, questions slide and the cards behind shuffle.

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

Installation

Kinetik CLI
npx kinetik-ui add question-deck

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/question-deck.json

Install manually

  1. Install dependencies
    npx expo install react-native-reanimated react-native-worklets
  2. Copy the source files
    • components/kinetik/question-deck.tsx
    View source files

Usage

import { QuestionDeck } from '@/components/kinetik/question-deck';

<QuestionDeck
  questions={[
    {
      id: 'how',
      title: 'How would you like to make change happen?',
      options: ['D.I.Y.', 'Contractor', 'Property Manager'],
    },
    { id: 'when', title: 'When would you like to start?', options: ['This month', 'Later'] },
  ]}
  onComplete={(answers) => saveProfile(answers)}
  onClose={() => router.back()}
/>;

When to use

  • Short onboarding or intake questionnaires: two to eight single-choice questions.

When not to use

  • Long forms or questions that need typing: use a form.
  • Multiple choice: each question takes exactly one answer.

Notes

  • Next stays disabled until an option is picked; Back keeps earlier answers.
  • onComplete receives every answer keyed by question id.
  • The Next button uses accent (the theme success green by default).

Props

QuestionDeckProps

PropTypeDefaultDescription
questionsrequiredreadonly DeckQuestion[]—
onCompleterequired(answers: Record<string, string>) => void—Called from the last question with every answer, by question id.
onClose() => void—Shows a close button.
accentstring—Colour of the Next button. Defaults to the theme success green.
nextLabelstring'Next'
finishLabelstring'Finish'
backLabelstring'Back'
hapticsbooleantrueA tick on each choice and step. Defaults to true.
styleStyleProp<ViewStyle>—

Performance and accessibility

Performance

Budget
Each step runs one layout animation and a shuffle spring on the UI thread; at rest nothing animates.
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 · 208 MB app memory. Most janky frames are the step slide; at rest nothing animates.

Real-device measurement pending.

Accessibility

Reduced motion
Questions cross-fade and the stack does not shuffle.
Screen readers
Progress reads "Question 2 of 6"; the question is a header; options are radios; Next is disabled until something is picked.
Touch target
Options, Back, Next and Close are at least 44 pt.

Source files

components/kinetik/question-deck.tsx is in the Code tab of the preview above.