View source: R/segmented-control.R
| calcite_segmented_control_item | R Documentation |
Creates an individual item within a segmented control. Must be used as a child
of calcite_segmented_control().
calcite_segmented_control_item(
value,
label = value,
checked = NULL,
icon_start = NULL,
icon_end = NULL,
icon_flip_rtl = NULL,
...
)
value |
The value this item represents (required) |
label |
Text label displayed for the item (defaults to |
checked |
Whether this item is initially selected (default: FALSE) |
icon_start |
Icon to display at the start of the item |
icon_end |
Icon to display at the end of the item |
icon_flip_rtl |
Whether to flip the icon in RTL languages (default: FALSE) |
... |
Additional content or attributes (text label if provided as unnamed argument) |
An object of class calcite_component
# Item with text label
calcite_segmented_control_item(value = "option1")
# Item with icon
calcite_segmented_control_item(
value = "list",
icon_start = "list"
)
# Initially selected item
calcite_segmented_control_item(
value = "default",
checked = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.