Skip to content
Calm motion: animations on this site only fade, with no movement

Questionnaire ​

Multi-step single/multiple/freeform

A short survey, one question at a time: onboarding questions, feedback, a quiz. For a form people fill in at once, use Form with Fields.

It handles the step header, the input for each question type, required answers, skipping and the progress bar. Answers collect into one object bound with v-model. For a wizard with arbitrary panels, Stepper.

Basic
1 / 3
Who is the main heroine?

One answer.

{}
  • Questions are single, multiple or freeform. required (default) blocks Next with a message. On each step focus moves to the new question, so it is read.
  • With shortcuts, 1–9 pick choices (Ctrl / ⌘ / Alt + digit stay with the browser).

Usage ​

ts
import { BlessQuestionnaire } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
questions*BlessQuestion[]—
shortcutsbooleantrue1-based shortcut keys for choices
labelsPartial<{ next: string; previous: string; skip: string; submit: string; required: string; }>—
modelValueBlessAnswers{}
stepnumber0

Events

NamePayloadDescription
update:modelValue[value: BlessAnswers]
submit[answers: BlessAnswers]
skip[question: BlessQuestion]
update:step[value: number]

Released under the MIT License. Character names and artwork belong to their owners.