Skip to contents

Create a SegmentedControl component

Usage

calcite_segmented_control(...)

Arguments

...

named attributes passed to htmltools::tag()

Value

an object of class calcite_component which is a subclass of shiny.tag

Details

Properties

The following properties are provided by this component:

NameAttributeDescriptionValuesReflects to Attribute
appearanceappearanceSpecifies the appearance style of the component."outline" | "outline-fill" | "solid"TRUE
disableddisabledWhen true, interaction is prevented and the component is displayed with lower opacity.booleanTRUE
formformThe id of the form that will be associated with the component. When not set, the component will be associated with its ancestor form element, if any.stringTRUE
layoutlayoutDefines the layout of the component."horizontal" | "vertical"TRUE
namenameSpecifies the name of the component. Required to pass the component's value on form submission.stringTRUE
requiredrequiredWhen true and the component resides in a form, the component must have a value in order for the form to submit.booleanTRUE
scalescaleSpecifies the size of the component."l" | "m" | "s"TRUE
selectedItemNAThe component's selected item HTMLElement.HTMLCalciteSegmentedControlItemElementFALSE
statusstatusSpecifies the status of the validation message."idle" | "invalid" | "valid"TRUE
validationIconvalidation-iconSpecifies the validation icon to display under the component.boolean | stringTRUE
validationMessagevalidation-messageSpecifies the validation message to display under the component.stringFALSE
validityNAThe current validation state of the component.Check API referenceFALSE
valuevalueThe component's selectedItem value.stringFALSE
widthwidthCheck API reference"auto" | "full"TRUE

Events

The following events are observed by shiny:

EventDescription
calciteSegmentedControlChangeFires when the calcite-segmented-control-item selection changes.

Slots

The following slots are provided by this component:

SlotDescription
Default (unnamed)A slot for adding calcite-segmented-control-items.

Examples

calcite_segmented_control()
#> <calcite-segmented-control></calcite-segmented-control>