# Create a `wa-switch` component

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

``` r
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 `id` attribute.

- ...:

  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 HTML `checked` attribute, which maps to the component's
  `defaultChecked` field/property rather than its live `checked`
  property.

- disabled:

  Boolean. Default: `FALSE`. Disables the switch.

- hint:

  String. Default: `""`. The switch's hint. If you need to display HTML,
  use the `hint` slot 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 to `TRUE` if
  you're slotting in a `hint` element 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 `hint` attribute.

## Value

An HTML tag for the component.

## Shiny Bindings

`input$<input_id>` reflects the component's current `value` value. The
Shiny value is returned as a logical value.
