m3e/checkbox
Checkbox is a checkbox that allows a user to select one or more options from a limited number of choices.
This file was generated: By: m3e/generator version 0.1.0 At: 2026-05-05T14:38:23+10:00
DO NOT EDIT
Types
Checkbox is a View Model for this component
Fields:
- checked: Whether the element is checked.
- disabled: Whether the element is disabled.
- indeterminate: Whether the element’s checked state is indeterminate.
- name: The name that identifies the element when submitting the associated form.
- required: Whether the element is required.
- value: A string representing the value of the checkbox.
pub opaque type Checkbox
Checked is whether the element is checked.
pub type Checked {
IsChecked
IsNotChecked
}
Constructors
-
IsChecked -
IsNotChecked
Config is a public record for configuring this component.
pub type Config {
Config(
checked: Checked,
disabled: Disabled,
indeterminate: Indeterminate,
name: String,
required: Required,
value: String,
)
}
Constructors
-
Config( checked: Checked, disabled: Disabled, indeterminate: Indeterminate, name: String, required: Required, value: String, )
Disabled is whether the element is disabled.
pub type Disabled {
IsDisabled
IsNotDisabled
}
Constructors
-
IsDisabled -
IsNotDisabled
Indeterminate is whether the element’s checked state is indeterminate.
pub type Indeterminate {
IsIndeterminate
IsNotIndeterminate
}
Constructors
-
IsIndeterminate -
IsNotIndeterminate
Values
pub fn checked(record: Checkbox, checked: Checked) -> Checkbox
checked sets the value of checked for this Checkbox.
pub const default_checked: Checked
pub fn default_config() -> Config
default_config is the default configuration for this component.
pub const default_disabled: Disabled
pub const default_indeterminate: Indeterminate
pub const default_name: String
pub const default_required: Required
pub const default_value: String
pub fn disabled(record: Checkbox, disabled: Disabled) -> Checkbox
disabled sets the value of disabled for this Checkbox.
pub fn from_config(config: Config) -> Checkbox
from_config creates a new Checkbox from the given configuration.
pub fn indeterminate(
record: Checkbox,
indeterminate: Indeterminate,
) -> Checkbox
indeterminate sets the value of indeterminate for this Checkbox.
pub fn name(record: Checkbox, name: String) -> Checkbox
name sets the value of name for this Checkbox.
pub fn render(
model: Checkbox,
attributes: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
render creates a Lustre Element for a Checkbox
pub fn render_config(
c: Config,
attributes: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
render_config creates a Lustre Element from a Checkbox Config