Native checkbox with explicit boolean or repeated-value submission semantics.
Boolean mode emits Phoenix's same-name hidden unchecked sentinel immediately
before the visible checkbox. Multiple mode normalizes the name to [], uses
the explicit option value, and emits no sentinel. Checked state is a rendered
snapshot; the browser and consuming application own changes and submission.
Summary
Functions
Renders one native boolean or repeated-value checkbox field.
Functions
Renders one native boolean or repeated-value checkbox field.
Attributes
field(:any) - Defaults tonil.id(:string) - Defaults tonil.name(:string) - Defaults tonil.mode(:atom) - Defaults to:boolean. Must be one of:boolean, or:multiple.value(:any) - Defaults to{:shadcn_ui, :not_provided}.checked(:boolean) - Defaults tonil.checked_value(:string) - Defaults to"true".unchecked_value(:string) - Defaults to"false".errors(:any) - Defaults to{:shadcn_ui, :not_provided}.error_mode(:atom) - Defaults to:used_input. Must be one of:used_input,:always, or:hidden.used(:boolean) - Defaults tofalse.translate_error(:any) - Defaults tonil.pending(:boolean) - Defaults tofalse.required(:boolean) - Defaults tofalse.optional(:boolean) - Defaults tofalse.disabled(:boolean) - Defaults tofalse.form(:string) - Defaults tonil.describedby(:any) - Defaults tonil.class(:any) - Defaults tonil.field_class(:any) - Defaults tonil.label_class(:any) - Defaults tonil.- Global attributes are accepted. Supports all globals plus:
["autofocus"].
Slots
label(required)help