Leave Yamada UI a star

Star
Yamada UIYamada UIv1.7.2

SegmentedControl

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

Source@yamada-ui/segmented-control

When using only icons in SegmentedControlButton, set aria-label for the SegmentedControlButton.

<Wrap gap="md">
<SegmentedControl>
<SegmentedControlButton aria-label="plus" value="plus">
<PlusIcon />
</SegmentedControlButton>
<SegmentedControlButton aria-label="minus" value="minus">
<MinusIcon />
</SegmentedControlButton>
</SegmentedControl>
</Wrap>
Copied!

Keyboard Navigation

KeyDescriptionState
TabFocuses the selected item.-
ArrowLeftFocuses the previous item that is not disabled. If it's the first item, it focuses the last item that is not disabled.-
ArrowRightFocuses the next item that is not disabled. If it's the last item, it focuses the first item that is not disabled.-

ARIA Roles and Attributes

ComponentRoles and AttributesUsage
SegmentedControlrole="radiogroup"Indicates that this is a radio group.
SegmentedControlButtonrole="radio"Indicates that this is a radio.
aria-disabled="true"Sets "true" if isDisabled is set to "true".

Edit this page on GitHub

PreviousRatingNextData Display