# `FrappeUIPhx.Components.Switch`
[🔗](https://github.com/moacirbishopcamata/frappe_ui_phx/blob/v0.3.1/lib/frappe_ui_phx/components/switch.ex#L1)

Interruptor. É um checkbox nativo (`peer`), então funciona em formulários sem JS.

# `switch`

## Attributes

* `field` (`Phoenix.HTML.FormField`) - Defaults to `nil`.
* `id` (`:any`) - Defaults to `nil`.
* `name` (`:any`)
* `value` (`:any`)
* `checked` (`:boolean`)
* `label` (`:string`) - Defaults to `nil`.
* `size` (`:atom`) - Defaults to `:sm`. Must be one of `:sm`, or `:md`.
* `errors` (`:list`) - Defaults to `[]`.
* `disabled` (`:boolean`) - Defaults to `false`.
* `class` (`:any`) - Defaults to `nil`.
* Global attributes are accepted. Supports all globals plus: `["form"]`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
