Did you know?dyk.si

Radio Button

Small circles in a group where only one can be chosen.

<input type="radio" name="…">

When to use it

When there are two to six options and all should be visible.

Common mistake

Past six options, a select saves space.

Accessibility

Wrap the group in a <fieldset> with a <legend>.

Name in code

HTML/CSS<input type="radio" name="…">
React<RadioGroup>
Jetpack ComposeRadioButton + Modifier.selectableGroup()
SwiftUIPicker().pickerStyle(.radioGroup)

Ready prompt for your coding agent

Add a Radio Button to this screen. What it is: Small circles in a group where only one can be chosen. Implement with: <input type="radio" name="…"> (HTML/CSS). Accessibility: Wrap the group in a <fieldset> with a <legend>. When to use it: When there are two to six options and all should be visible. Avoid: Past six options, a select saves space. Reuse the project's existing design tokens, spacing and component conventions.

Or compose a whole page from this element and others →

Prompts are in English for the most precise results with coding agents.

Often confused with others?

⇄ Switch vs. Checkbox vs. Radio