Generated wrapper for the Web Awesome wa-switch component. When used
as a Shiny input, input$<input_id> reflects the component's current
value value. The Shiny value is returned as a logical value.
Generated from Web Awesome metadata.
Usage
wa_switch(
input_id,
...,
class = NULL,
style = NULL,
value = NULL,
checked = NULL,
disabled = NULL,
hint = NULL,
name = NULL,
custom_error = NULL,
dir = NULL,
lang = NULL,
required = NULL,
size = NULL,
title = NULL,
with_hint = NULL,
hint_slot = NULL
)Arguments
- input_id
Shiny input id for the component. This is also used as the rendered DOM
idattribute.- ...
Child content for the component's default slot.
- class
Optional CSS class string.
- style
Optional inline CSS style string.
- value
String. The value of the switch, submitted as a name/value pair with form data.
- checked
Boolean. Default:
FALSE. The default value of the form control. Primarily used for resetting the form control. This wrapper argument sets the HTMLcheckedattribute, which maps to the component'sdefaultCheckedfield/property rather than its livecheckedproperty.- disabled
Boolean. Default:
FALSE. Disables the switch.- hint
String. Default:
"". The switch's hint. If you need to display HTML, use thehintslot instead.- name
String. Default:
null. The name of the switch, submitted as a name/value pair with form data.- custom_error
String. Default:
null. Optional Web Awesome attribute.- dir
String. Optional Web Awesome attribute.
- lang
String. Optional Web Awesome attribute.
- required
Boolean. Default:
FALSE. Makes the switch a required field.- size
Enumerated string. Allowed values:
large,medium,small. Default:medium. The switch's size.- title
String. Default:
"". Optional Web Awesome attribute.- with_hint
Boolean. Default:
FALSE. Only required for SSR. Set toTRUEif you're slotting in ahintelement so the server-rendered markup includes the hint before the component hydrates on the client.- hint_slot
Text that describes how to use the switch. Alternatively, you can use the
hintattribute.