FrappeUIPhx.Components.Switch (frappe_ui_phx v0.3.1)

Copy Markdown View Source

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

Summary

Functions

switch(assigns)

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"].