PtahUi.Components.Checkbox (PtahUI v0.1.0)

Copy Markdown View Source

Standalone styled checkbox input with size and color variants.

For use inside Phoenix forms with label and error support, see checkbox_field/1 in PtahUi.Components.Form.

Examples

<.checkbox />
<.checkbox checked size="lg" color="success" />
<.checkbox color="error" disabled />

Summary

Functions

checkbox(assigns)

Attributes

  • color (:string) - Defaults to nil.
  • size (:string) - Defaults to "md".
  • checked (:boolean) - Defaults to false.
  • disabled (:boolean) - Defaults to false.
  • id (:string) - Defaults to nil.
  • name (:string) - Defaults to nil.
  • value (:string) - Defaults to nil.
  • class (:string) - Defaults to nil.
  • Global attributes are accepted.