Magoo Component UI logo Magoo Component UI
← Catalog

Survey Question

survey-question molecule experimental

A single survey question with selectable option rows for single, multi, or scale answers.

The width preview needs a screen wider than the chosen width — use a larger device (or a desktop browser) to see the desktop and tablet layouts.

Default
How satisfied are you with our support?
Multi
Which features do you use most? Select all that apply.

Props

NameTypeReq
question string ✓
kind enum (single | multi | scale)
options array

Related components

How to use

Because the directive language cannot branch on an enum value, the options always render as selectable rows and the kind is carried as data-kind on the root for the host. Each option's data-selected drives its highlight (data-[selected=true]:...), so a preset selection renders in screenshots with no JavaScript. behavior.js reads data-kind: "single" clears the other options when one is chosen, while "multi" and "scale" toggle each independently; every change syncs aria-pressed and dispatches a bubbling "survey:answer" CustomEvent with { value, selected, values }. The portable self-init reads no props object.

Use cases

list-itemhighlight WCAG AA SEO 20 dir: both ai-generated