Multiple-choice question

Multiple-choice question

A question with radio buttons in a form — ideal for yes/no questions, tests and quizzes.

Multiple-choice question

A question with radio buttons in a form: the visitor picks exactly one answer. Ideal for yes/no questions and longer questionnaires such as tests and quizzes — the buttons can be stacked or side by side. The technical name is RadioField.

Use RadioField instead of a dropdown or checkboxes whenever a question has a small, fixed set of mutually exclusive answers — it shows every option at once, which reduces clicks and makes the choice more obvious than a select box. The orientation prop switches between a stacked list for longer labels and a horizontal row for short yes/no answers.

It's a building block inside a Form, alongside fields like FormField for open text answers. Together they cover most survey and application-form needs without custom form logic.

Typical use cases

A webshop checkout commonly uses RadioField for a shipping-method choice — standard, express, pickup — where exactly one option must be picked before the order can proceed. A professional-services intake form often uses it for a handful of qualifying questions, such as 'How did you hear about us?' or 'What's your budget range?', where a dropdown would hide the options and checkboxes would wrongly allow more than one. A scored quiz or test benefits from it most directly: each question is naturally a RadioField, and the stored value per submission is exactly the answer chosen.

Common mistakes

Give every RadioField a unique name that matches its underlying form field — if two questions in the same form share a name, their options are treated as one group and selecting an answer to one silently clears the other. On mobile, a horizontal orientation with more than two or three options tends to wrap awkwardly or crowd together; switch to the stacked orientation once labels or option counts grow. Mark a question as required when an answer is mandatory to complete the form, rather than relying on visitors noticing an unlabelled expectation.

Keep each option's stored value a stable, short machine value ('yes', 'express') separate from its visible label. That way, rewording a label for clarity later — like changing 'Are you 18 or older?' to 'Are you an adult?' — doesn't change what's actually stored against past submissions, keeping exported data consistent over time.

See forms and validation for how required fields and error states work across all form field types, not just RadioField.

Example

Are you 18 or older?

The prompt for this example

prompt
Add the yes/no question 'Are you 18 or older?' to the form, with the answers side by side.