A Material Design switch (pp_switch/1) — an on/off toggle, structured
like PhoenixPaper.Checkbox but rendered as a sliding track/thumb.
Accepts either a Phoenix Phoenix.HTML.FormField via field= or plain
name/checked attrs.
When paperize is false this renders a bare native <input type="checkbox"> (no hidden-input trick, no custom track/thumb) —
class targets that bare input directly in this case, same as
PhoenixPaper.Checkbox.
Summary
Functions
Attributes
id(:any) - Defaults tonil.name(:any) - Defaults tonil.value(:any) - Defaults to"true".label(:string) - Defaults tonil.field(Phoenix.HTML.FormField) - Defaults tonil.checked(:boolean) - Defaults tonil.paperize(:boolean) - Defaults totrue.ripple(:boolean) - the Material ripple effect on click/tap — off whenever paperize is false, see PhoenixPaper.Ripple. Defaults totrue.disabled(:boolean) - Defaults tofalse.class(:any) - Defaults tonil.- Global attributes are accepted. Supports all globals plus:
["form", "autofocus", "phx-click"].