Leave Yamada UI a star

Star
Yamada UIYamada UIv1.5.1

Radio

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

Source@yamada-ui/radio

The Radio follows theWAI-ARIA - Radio Pattern for accessibility.

If not using FormControl, set aria-labelledby on the RadioGroup.

<VStack gap="sm">
<Text as="h3" id="group">
キャラクター
</Text>
<RadioGroup aria-labelledby="group">
<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

PreviousTextareaNextCheckbox