# 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

opaque </>

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

</>

Checked is whether the element is checked.

    pub type Checked {
      IsChecked
      IsNotChecked
    }

### Constructors

-     IsChecked

-     IsNotChecked

## Config

</>

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

</>

Disabled is whether the element is disabled.

    pub type Disabled {
      IsDisabled
      IsNotDisabled
    }

### Constructors

-     IsDisabled

-     IsNotDisabled

## Indeterminate

</>

Indeterminate is whether the element’s checked state is indeterminate.

    pub type Indeterminate {
      IsIndeterminate
      IsNotIndeterminate
    }

### Constructors

-     IsIndeterminate

-     IsNotIndeterminate

## Required

</>

Required is whether the element is required.

    pub type Required {
      IsRequired
      IsNotRequired
    }

### Constructors

-     IsRequired

-     IsNotRequired

# Values

## checked

</>

    pub fn checked(record: Checkbox, checked: Checked) -> Checkbox

checked sets the value of checked for this Checkbox.

## default_checked

</>

    pub const default_checked: Checked

## default_config

</>

    pub fn default_config() -> Config

default_config is the default configuration for this component.

## default_disabled

</>

    pub const default_disabled: Disabled

## default_indeterminate

</>

    pub const default_indeterminate: Indeterminate

## default_name

</>

    pub const default_name: String

## default_required

</>

    pub const default_required: Required

## default_value

</>

    pub const default_value: String

## disabled

</>

    pub fn disabled(record: Checkbox, disabled: Disabled) -> Checkbox

disabled sets the value of disabled for this Checkbox.

## from_config

</>

    pub fn from_config(config: Config) -> Checkbox

from_config creates a new Checkbox from the given configuration.

## indeterminate

</>

    pub fn indeterminate(
      record: Checkbox,
      indeterminate: Indeterminate,
    ) -> Checkbox

indeterminate sets the value of indeterminate for this Checkbox.

## name

</>

    pub fn name(record: Checkbox, name: String) -> Checkbox

name sets the value of name for this Checkbox.

## new

</>

    pub fn new() -> Checkbox

new creates a new Checkbox with the default configuration.

## render

</>

    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

## render_config

</>

    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

## required

</>

    pub fn required(record: Checkbox, required: Required) -> Checkbox

required sets the value of required for this Checkbox.

## value

</>

    pub fn value(record: Checkbox, value: String) -> Checkbox

value sets the value of value for this Checkbox.

✨