m3e/radio

Radio is a radio button that allows a user to select one option from a set of options.

This file was generated: By: m3e/generator version 0.1.0 At: 2026-05-05T14:38:23+10:00

     DO NOT EDIT

Types

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,
    name: String,
    required: String,
    value: String,
  )
}

Constructors

  • Config(
      checked: Checked,
      disabled: Disabled,
      name: String,
      required: String,
      value: String,
    )

Disabled is whether the element is disabled.

pub type Disabled {
  IsDisabled
  IsNotDisabled
}

Constructors

  • IsDisabled
  • IsNotDisabled

Radio is a View Model for this component

Fields:

  • checked: Whether the element is checked.
  • disabled: Whether the element is disabled.
  • 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 radio.
pub opaque type Radio

Values

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

checked sets the value of checked for this Radio.

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_name: String
pub const default_required: String
pub const default_value: String
pub fn disabled(record: Radio, disabled: Disabled) -> Radio

disabled sets the value of disabled for this Radio.

pub fn from_config(config: Config) -> Radio

from_config creates a new Radio from the given configuration.

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

name sets the value of name for this Radio.

pub fn new() -> Radio

new creates a new Radio with the default configuration.

pub fn render(
  model: Radio,
  attributes: List(attribute.Attribute(msg)),
  children: List(element.Element(msg)),
) -> element.Element(msg)

render creates a Lustre Element for a Radio

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 Radio Config

pub fn required(record: Radio, required: String) -> Radio

required sets the value of required for this Radio.

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

value sets the value of value for this Radio.

Search Document