Learn R Programming

calcite (version 0.1.0)

calcite_switch: Create a Switch component

Description

Create a Switch component

Usage

calcite_switch(...)

Value

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

Arguments

...

named attributes passed to htmltools::tag()

Details

Properties

The following properties are provided by this component:

NameAttributeDescriptionValuesReflects to Attribute
checkedcheckedWhen true, the component is checked.booleanTRUE
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
labellabelAccessible name for the component.stringFALSE
namenameSpecifies the name of the component. Required to pass the component's value on form submission.stringTRUE
scalescaleSpecifies the size of the component."l" | "m" | "s"TRUE
valuevalueThe component's value.anyFALSE

Events

The following events are observed by shiny:

EventDescription
calciteSwitchChangeFires when the checked value has changed.

References

Official Documentation

Examples

Run this code
calcite_switch()

Run the code above in your browser using DataLab