A Material Design checkbox (pp_checkbox/1).
Accepts either a Phoenix Phoenix.HTML.FormField via field= (idiomatic
to_form/2 usage, same as the default core_components.ex input) or plain
name/checked attrs.
When paperize is false this renders a bare native <input type="checkbox"> (no hidden-input trick, no custom box) so it never fights
a caller's own CSS — class targets that bare input directly in this
case (not the wrapping <label>, which keeps its own unconditional
layout classes regardless of paperize; see
PhoenixPaper.Helpers.toggle_label_classes/1), so e.g.
class="size-5" sizes the checkbox itself as expected.
ripple={true} adds the Material ripple effect on click/tap, wired to
the small box rather than the whole label — off by default (unlike
Button/Fab/ToggleButton), since a checkbox's own instant
fill/border-color change already reads as clear feedback on a target
this small — see PhoenixPaper.Ripple.
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 (default: false) — see PhoenixPaper.Ripple. Defaults tofalse.disabled(:boolean) - Defaults tofalse.class(:any) - Defaults tonil.- Global attributes are accepted. Supports all globals plus:
["form", "autofocus", "phx-click"].