Attribute Type Documentation Default Value
error :boolean

Error state toggle

false
label :string

The label for the input

label_left :boolean

If true - label is shown on the left side of the input

false
name :any

Name for the checkbox input

checked_value :string

Value to be sent in form-data when checked

"true"
unchecked_value :string

Value to be sent in form-data when not checked. Will create a separate hidden input if set.

class :string

Additional style classes for the checkbox

""
readonly :boolean

Makes element readonly by setting onclick=”return false”

false
field %FormField{}

a form field struct retrieved from the form, for example: @form[:email]

indeterminate :boolean

If true - minus icon is shown instead of check to indicate checked state

false
rest :global

Additional attributes for the checkbox

trailing :slot

Slot for additional content

leading :slot

Slot for additional content

icon :slot

Slot for replacing the icon