Leave Yamada UI a star

Star
Yamada UIYamada UIv1.7.2

Radio

Radio is a component used for allowing users to select one option from multiple choices.

Source@yamada-ui/radio

The Radio follows the WAI-ARIA - Radio Pattern for accessibility.

If you are not using Fieldset, set aria-label or aria-labelledby to RadioGroup.

<RadioGroup aria-label="キャラクター">
<Radio value="孫悟空">孫悟空</Radio>
<Radio value="ベジータ">ベジータ</Radio>
<Radio value="フリーザ">フリーザ</Radio>
</RadioGroup>
Copied!
<VStack gap="sm">
<Text as="h3" id="label">
キャラクター
</Text>
<RadioGroup aria-labelledby="label">
<Radio value="孫悟空">孫悟空</Radio>
<Radio value="ベジータ">ベジータ</Radio>
<Radio value="フリーザ">フリーザ</Radio>
</RadioGroup>
</VStack>
Copied!

Keyboard Navigation

KeyDescriptionState
TabMoves focus to the checked radio button within the radio group. If no radio button is checked, moves focus to the first radio button.-
SpaceChecks the focused radio button.-
ArrowLeftChecks the previous enabled radio button.-
ArrowRightChecks the next enabled radio button.-
ArrowUpChecks the previous enabled radio button.-
ArrowDownChecks the next enabled radio button.-

ARIA Roles and Attributes

ComponentRoles and AttributesUsage
RadioGrouprole="radiogroup"Indicates that this is a radio group.
aria-labelledbyIf RadioGroup is within a FormControl and FormControl has a label or Label, set its id.
Radioaria-checkedSets to "true" if the radio button is checked, and "false" if it is not checked.

Edit this page on GitHub

PreviousTextareaNextRadioCard