Radio input
Form element for picking one of many choices
Demo
See more examples
API
Tag
Name | Type | Content | |||||||
---|---|---|---|---|---|---|---|---|---|
input |
Native element | None |
Attributes
Name | Value | Description | |||||||
---|---|---|---|---|---|---|---|---|---|
name required |
String | All radios in a group use the same name. |
Guidelines
Radio, checkbox, or select?
If only one of the options can be selected, don't use checkbox. There are no hard rules, but generally radio is best for 2-4 choices and select (or Autocomplete) is better for more.
Accessibility
Like other input elements, be sure to use for
and id
.