Learn R Programming

calcite (version 1.0.0)

calcite_segmented_control_item: Create a Calcite Segmented Control Item Component

Description

Creates an individual item within a segmented control. Must be used as a child of calcite_segmented_control().

Usage

calcite_segmented_control_item(
  value,
  label = value,
  checked = NULL,
  icon_start = NULL,
  icon_end = NULL,
  icon_flip_rtl = NULL,
  ...
)

Value

An object of class calcite_component

Arguments

value

The value this item represents (required)

label

Text label displayed for the item (defaults to value)

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)

References

Official Documentation

Examples

Run this code
# 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
)

Run the code above in your browser using DataLab