# 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

</>

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

### Constructors

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

## Disabled

</>

Disabled is whether the element is disabled.

    pub type Disabled {
      IsDisabled
      IsNotDisabled
    }

### Constructors

-     IsDisabled

-     IsNotDisabled

## Radio

opaque </>

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

## checked

</>

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

checked sets the value of checked for this Radio.

## 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_name

</>

    pub const default_name: String

## default_required

</>

    pub const default_required: String

## default_value

</>

    pub const default_value: String

## disabled

</>

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

disabled sets the value of disabled for this Radio.

## from_config

</>

    pub fn from_config(config: Config) -> Radio

from_config creates a new Radio from the given configuration.

## name

</>

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

name sets the value of name for this Radio.

## new

</>

    pub fn new() -> Radio

new creates a new Radio with the default configuration.

## render

</>

    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

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

## required

</>

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

required sets the value of required for this Radio.

## value

</>

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

value sets the value of value for this Radio.

✨