Skip to content
Design System
GitHub

Questionnaire

v0.23.1Beta

A short set of questions, one per page or all on one form: single and multiple choice, scales and text, required checks and a review page.

Question 1 of 425 %
Which area are you patrolling? (required)

Questionnaire paged

Install
npx shadcn add @syncrobotic/questionnaire

Also installs: radix-ui, @syncrobotic/cn, @syncrobotic/button, @syncrobotic/checkbox, @syncrobotic/choice-field, @syncrobotic/radio-group, @syncrobotic/textarea

Overview

A short form of questions with choice, scale and text answers, paged or on one page, that checks required answers.

When to use

  • Pre-shift checklists.
  • Incident follow-up questions.
  • Feedback and site surveys.

Use something else

  • A form of named fields (name, address): Field.
  • Only showing progress through steps: Stepper.

More examples

States and real uses. Each example is also a Storybook story and a visual regression test.

Question 1 of 425 %
Which area are you patrolling? (required)

Questionnaire with review

Review100 %
  • Which area are you patrolling?Hall B
  • Which checks did you do?Battery above 80 %, Emergency stop tested
  • How ready is the robot?4 of 5
  • Anything the next shift should know?Not answered

Questionnaire review page

Which area are you patrolling? (required)
Which checks did you do? (required)Tick each one you did yourself.
How ready is the robot? (required)
Not readyFully ready
Anything the next shift should know?

Questionnaire list

How likely are you to recommend the patrol service?
Not likelyVery likely
What worked well?

Up to 2.

What should we improve?

Questionnaire feedback

What caused the stop?Saved with incident #2041.

Questionnaire single question

How ready is the robot? (required)
Not readyFully ready

Answer this question to continue.

Questionnaire required error

Question 1 of 333 %
What happened? (required)In a sentence or two.

Questionnaire incident

Question 1 of 1100 %
How likely are you to recommend us to a colleague? (required)
Not at allCertainly

Questionnaire scale only

Question 2 of 450 %
Which checks did you do? (required)Tick each one you did yourself.

Questionnaire resume

How should the robot handle a closed door?

Questionnaire described options

Why are you stopping the patrol early? (required)

Answer this question to continue.

Questionnaire text required

Usage rules

  • Paged for up to about eight questions on a phone; list when people need to see them all.
  • Required questions block Next with a message under the question, never a shake.
  • review lets people check and edit before sending.

Changelog

  • 0.23.12026-11-21A paged form with no questions renders and Next does nothing, instead of throwing. Compiles with noUncheckedIndexedAccess.
  • 0.23.02026-11-20Every word it says can be translated without editing the source: labels (QuestionnaireLabels: the counter, progress, review list, Back, Next, Submit, "Not answered", the required mark…). QuestionField takes them too. submitLabel and requiredMessage still work and win.
  • 0.17.32026-11-19Tracks and quiet shapes use the new --track token, so they read in dark mode (1.5:1 on their surface; they were near invisible). The percentage follows the counter (question 1 of 4 is 25 %).

How to upgrade