Switch presentation of the native boolean Checkbox contract.
Switch delegates identity, checked state, hidden sentinel, relationships, and submission to Checkbox. It adds only track-and-thumb presentation. There is no role-only substitute, event API, synchronized state, or toggle method.
Summary
Functions
Renders a native boolean checkbox with switch presentation.
Functions
Renders a native boolean checkbox with switch presentation.
Attributes
field(:any) - Defaults tonil.id(:string) - Defaults tonil.name(:string) - Defaults tonil.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.label_visibility(:atom) - Defaults to:visible. Must be one of:visible, or:hidden.accessible_label(: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