Boxes to tick and options to pick, as the canvas draws them: the checkbox (with the partial state of "select
all"), the radio with its description and the choice card. They are real <input>s, so the browser, the form
and the keyboard do the work; the look comes from the checkbox, radio and choice-card classes.
Summary
Functions
A whole card that is the option: it gains the border and the wash of the choice when ticked.
The state of a "select all" box: :none, :some (partial) or :all, from how many of total are ticked.
Functions
Attributes
id(:string) (required)name(:string) - Defaults tonil.value(:string) - Defaults to"true".checked(:boolean) - Defaults tofalse.partial(:boolean) - the dash of a "select all" with only some ticked. Defaults tofalse.label(:string) - Defaults tonil.description(:string) - Defaults tonil.class(:any) - Defaults tonil.- Global attributes are accepted. Supports all globals plus:
["disabled", "required", "phx-click", "phx-change", "phx-value-id"].
A whole card that is the option: it gains the border and the wash of the choice when ticked.
Attributes
id(:string) (required)name(:string) (required)value(:string) (required)type(:string) - Defaults to"radio". Must be one of"radio", or"checkbox".checked(:boolean) - Defaults tofalse.label(:string) (required)description(:string) - Defaults tonil.class(:any) - Defaults tonil.- Global attributes are accepted. Supports all globals plus:
["disabled", "required", "phx-click", "phx-value-choice"].
Slots
icon- a mark at the start of the card.
Attributes
id(:string) (required)name(:string) (required)value(:string) (required)checked(:boolean) - Defaults tofalse.label(:string) (required)description(:string) - Defaults tonil.class(:any) - Defaults tonil.- Global attributes are accepted. Supports all globals plus:
["disabled", "required", "phx-click", "phx-value-choice"].
@spec select_all_state(non_neg_integer(), non_neg_integer()) :: :none | :some | :all
The state of a "select all" box: :none, :some (partial) or :all, from how many of total are ticked.