SegmentedControl
Description
Use a segmented control to let users select an option from a short list and immediately apply the selection
Accessibility
A SegmentedControl should not be used in a form as a replacement for something like a radio group or select.
See the Accessibility section of the SegmentedControl interface guidelines for more details.
Arguments
| Name | Default | Description |
|---|---|---|
hide_labels | BooleanWhether to hide the labels and only show the icons | |
full_width | BooleanIf the component should be full width | |
size | SymbolOne of | |
system_arguments | Hash |
Slots
items
Use to render an item in the segmented control
| Name | Default | Description |
|---|---|---|
system_arguments | Hash |
SegmentedControl::Item
SegmentedControl::Item is a private component that is only used by SegmentedControl It wraps the Button and IconButton components to provide the correct styles
Arguments
| Name | Default | Description |
|---|---|---|
label | StringThe label to use | |
selected | BooleanWhether the item is selected | |
icon | SymbolThe icon to use | |
hide_labels | SymbolWhether to only show the icon |
Slots
trailing_visual_label
Optional trailing Label
| Name | Default | Description |
|---|---|---|
system_arguments | HashThe arguments accepted by |
Methods
with_trailing_visual_label(system_arguments: Hash)
Optional trailing label.
Parameters
| Name | Default | Description |
|---|---|---|
system_arguments | HashThe arguments accepted by |