Overview Button Copy button Field Input Number field Textarea Select Combobox Multiselect Date picker Date range picker Date-time picker Checkbox Radio group Position picker Switch Slider Dropzone Device controls Avatar Badge Card Collapsible Kbd Map Matrix Proportion bar Separator Stat Table Timeline Chat Playback Pagination Charts Chart theming Profile chart Time series chart Bar chart Isopleth chart TS diagram Box plot Rose chart Calendar chart Banner Toast Loader Progress Skeleton Empty state Error state Dropdown menu Tooltip Info tooltip Dialog Sheet Resizable Confirm dialog Breadcrumbs Command palette Mobile menu Navigation list Outline Scroll rail Sidebar Tabs
Radio group
Pick one of a few options, all in view. The choice waits for Save. The picked option is tinted with the primary: a soft fill, a primary edge and a filled dot.
Playground
Click or arrow through the options.
Variant
<RadioGroup variant="rows" bind:value>
<RadioGroupItem value="survey" label="Seabed mapping" description="A depth map and 3D model…" />
<RadioGroupItem value="monitoring" label="Environmental monitoring" />
<RadioGroupItem value="other" label="Something else" />
</RadioGroup> Cards with images
A picture tells deliverables apart faster than a name. The dot sits on the image's corner.
Columns
<RadioGroup variant="cards" columns={2} bind:value>
<RadioGroupItem value="depth" label="Depth map" description="With contours, as PDF or DWG" image={src} />
<RadioGroupItem value="model" label="3D model" description="Terrain model of the seabed" image={src} />
</RadioGroup> Cards
Without images, side by side. Anything extra, like a price, goes under the description.
Chips and a line
columns="auto" wraps cards as chips; on a list it lays the radios out in a line.
Which one
List A short choice inside a form, where the labels say it all. Two to five options.
Rows Options that need a line or two to explain, read top to bottom. The common one for a form that orders or configures something.
Cards Options compared side by side, or told apart by a picture: deliverables, plans, map styles.
Chips Cards with columns="auto": short label-only options in a line, like a file format or an interval.
Segmented tabs A choice that applies at once, like a view switch. Not saved with a form.
Select More than about six options, or too little room to show them all.
Rules
- Labels are short nouns. The description says what picking it means, in a line or two.
- Pick a sensible default when there is one. Leave none picked only when the choice must be made on purpose.
- In a Field, the group takes the Field's label as its name. Outside one, pass aria-label.
- Images are decorative: the label names the option. Same height and crop across a group.
- For any number of picks, the same variants exist as a CheckboxGroup.