Noora.Toggle (noora v0.76.0)

Copy Markdown

A toggle switch input.

Example

<.toggle label="Enable notifications" />
<.toggle />

Summary

Functions

toggle(assigns)

Attributes

  • label (:string) - The label of the toggle. Defaults to nil.
  • description (:string) - An optional description. Defaults to nil.
  • checked (:boolean) - Whether the toggle is checked. Defaults to false.
  • disabled (:boolean) - Whether the toggle is disabled. Defaults to false.
  • id (:string) - The id of the toggle. Defaults to nil.
  • name (:string) - The name of the toggle. Defaults to nil.
  • field (Phoenix.HTML.FormField) - A Phoenix form field. Defaults to nil.
  • tabindex (:integer) - Tabindex to add to the toggle control. Defaults to nil.
  • Global attributes are accepted. Additional attributes.