Question Card
A multiple-choice question card with lettered options, single or multiple select, an optional free-text Other, and keyboard shortcuts to pick, submit and skip.
Preview
Question 1 of 3Pick one
When should the weekly digest go out?
I'll send it to the channel you pick next.
AMonday, 9:00Start the week with last week's numbers
BFriday, 16:00Wrap up before the weekend
CEnd of each sprintEvery second Thursday
Focus the card, then press a letter, Enter or Esc
QuestionPick one
Which environment should I deploy to?
APreview
BStaging
CProduction
QuestionPick any
Which checks can I skip on this hotfix?
The fix touches one file in the billing worker.
AEnd-to-end suiteAbout 14 min
BVisual snapshotsAbout 6 min
CNone, run everything
Install
Pro source requires Pebble Pro. Try the full preview above.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| title | string | — | The question; names the region and the option group. |
| description | string | — | Optional context under the title. |
| options | QuestionOption[] | — | Options { id, label, description? }, lettered A, B, C. |
| multiple | boolean | false | Checkboxes instead of radios. |
| allowOther | boolean | false | Add a free-text Other option. |
| otherLabel | string | "Other" | Other option text and field label. |
| otherPlaceholder | string | "Type your answer" | Placeholder of the Other field. |
| defaultValue | string[] | — | Initially selected option ids. |
| onValueChange | (answer: QuestionAnswer) => void | — | Called on every selection or Other text change. |
| step | number | — | Current question number; with totalSteps shows "Question N of M". |
| totalSteps | number | — | Total number of questions. |
| status | "open" | "answered" | "skipped" | — | Controlled status; pair with onStatusChange. |
| defaultStatus | "open" | "answered" | "skipped" | "open" | Initial status when uncontrolled. |
| onStatusChange | (status: QuestionCardStatus) => void | — | Called on submit and skip. |
| onSubmit | (answer: QuestionAnswer) => void | — | Receives { selected: string[]; other?: string }. |
| onSkip | () => void | — | Called by Skip; omit to hide Skip. |
| submitLabel | string | "Next" | Label of the primary key. |
| skipLabel | string | "Skip" | Label of the skip action. |
Pro component
Try the full preview above. Editable source and build guides require Pebble Pro.
