Heading fonts

Choose a Google Fonts family. The selected font loads from Google Fonts; Inter and Geist Serif are bundled locally.

Search Reflow

Keyboard shortcuts

Use these keys while you are not typing in a field.

Search⌘K
Cycle themeT
Cycle accentA
Cycle heading fontF
Cycle radiusR
Cycle sizeS
Cycle iconsI
Cycle hoverH
Toggle navigation[
Toggle properties]
Previous / next demo slide←→
Show shortcuts?
Skip to content
Open navigationClose navigation

Make them yours

Theme
SystemT
Accent
BlueA
Heading font
InterF
Radius
RoundedR
Size
DefaultS
Icons
LucideI
Hover
FluidH

Playground variant

AskUserQuestions

AskUserQuestions

A guided flow with choices, custom answers, skipping, and back navigation.

Installation

Import from the Reflow workspace package.

Playground

Open demo
Question 1 of 3

How do you plan to use Reflow?

Example

Question 1 of 8

How do you plan to use Reflow?

Multiple questions

Question 1 of 4

What's your role?

Multi-select

Question 1 of 3

Which features should we prioritize?

With other

Question 1 of 3

What's blocking you most right now?

Free text

Question 1 of 3

What should we call your workspace?

Free text validation

Question 1 of 1

Your work email?

Skippable

Question 1 of 3

How long have you been using the product?

Chip on left

Question 1 of 5

Pick your role

Stacked layout

Question 1 of 8

Which starting template fits your project?

Controlled

The parent owns the active question and answers. Load sample answers, switch questions, or clear the state from outside the component.

Question 1 of 2

What is your role?

Parent state
{}

API Reference

Public props for the Reflow implementation. Native controls also accept their standard HTML attributes and Remix event mixes.

AskUserQuestions

PropTypeDefaultDescription
questions*readonly AskUserQuestion[]—Questions presented in order.
currentIndexnumber—Zero-based active question index when controlled by the parent.
defaultCurrentIndexnumber0Initial question index for an uncontrolled flow.
onCurrentIndexChange((index: number) => void)—Receives the next question index after navigation.
answersRecord<string, AskUserAnswer>—Answer record controlled by the parent, keyed by question identifier.
defaultAnswersRecord<string, AskUserAnswer>{}Initial answers for an uncontrolled flow.
onAnswersChange((answers: Record<string, AskUserAnswer>) => void)—Receives the proposed complete answer record after edits, choices, or skipping.
onComplete((answers: Record<string, AskUserAnswer>) => void)—Receives answers when the flow is completed.
onSkip((questionId: string, index: number) => void)—Called when a question is skipped.
skipLabelstring—Label of the skip action.

AskUserQuestion

PropTypeDefaultDescription
idstring—Stable question identifier. A position-based identifier is used when omitted.
title*string—Heading displayed by the component.
optionsreadonly AskUserOption[]—Choices shown for this question.
multiSelectboolean—Allows more than one answer.
allowOtherboolean—Adds a custom answer option.
otherPlaceholderstring—Hint for a custom answer.
skippableboolean—Allows this question to be skipped.
nextLabelstring—Label of the next action.
layout"inline" | "stacked"—Layout of question choices.
chipPosition"left" | "right"—Position of the option shortcut.
freeTextboolean—Uses text input instead of choices.
freeTextPlaceholderstring—Hint for the text answer.
freeTextMultilineboolean—Uses a multiline text answer.
freeTextValidate((value: string) => string | null)—Returns a validation message, or no message for a valid answer.

AskUserOption

PropTypeDefaultDescription
idstring—Stable option identifier. A position-based identifier is used when omitted.
title*string—Main text of the answer option.
descriptionstring—Supporting text below the option title.

AskUserAnswer

PropTypeDefaultDescription
questionId*string—Identifier of the question that was answered.
selectedIds*string[]—Identifiers of the selected options.
otherTextstring—Text supplied as a custom or free-text answer.
skippedboolean—Whether this question was skipped.