lustre/prefab/checkbox
Checkbox component for lustre_prefab.
A checkbox with a label to the right of the checkbox.
Values
pub fn view(
extra_attrs: List(@internal Attribute(@internal Aligned, msg)),
config: input.CheckboxConfig(msg),
) -> stylish.Element(msg)
A checkbox with a label to the right of the checkbox.
Example
checkbox.view(
[],
input.CheckboxConfig(
on_change: fn(checked) { ToggleCheckbox(checked) },
icon: fn(checked) { input.default_checkbox(checked) },
checked: False,
label: input.label_right([], text("Accept terms")),
)
)