shiny.ui.input_switch#

shiny.ui.input_switch(id, label, value=False, *, width=None)#

Create a switch that can be used to specify logical values. Similar to ~shiny.ui.input_checkbox, but implies to the user that the change will take effect immediately.

Parameters
  • id (str) – An input id.

  • label (Union[Tagifiable, Tag, MetadataNode, str, TagList, float, None, Dict[str, Union[str, float, bool, None]], Sequence[Union[Tagifiable, Tag, MetadataNode, str, TagList, float, None, Dict[str, Union[str, float, bool, None]], Sequence[ForwardRef]]]]) – An input label.

  • value (bool) – Initial value.

  • width (Optional[str]) – The CSS width, e.g. ‘400px’, or ‘100%’

Return type

A UI element.

Notes

Server value

True if checked, False otherwise.