# m3e/list_option

ListOption is a selectable option in a list.

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

         DO NOT EDIT

# Types

## Config

</>

Config is a public record for configuring this component.

    pub type Config {
      Config(disabled: Disabled, selected: Selected, value: String)
    }

### Constructors

-     Config(disabled: Disabled, selected: Selected, value: String)

## Disabled

</>

Disabled is whether the element is disabled.

    pub type Disabled {
      IsDisabled
      IsNotDisabled
    }

### Constructors

-     IsDisabled

-     IsNotDisabled

## ListOption

opaque </>

ListOption is a View Model for this component

## Fields:

- disabled: Whether the element is disabled.
- selected: Whether the element is selected.
- value: A string representing the value of the option.

    pub opaque type ListOption

## Selected

</>

Selected is whether the element is selected.

    pub type Selected {
      IsSelected
      IsNotSelected
    }

### Constructors

-     IsSelected

-     IsNotSelected

## Slot

</>

Slots are used in child elements to insert content into this component

    pub type Slot {
      Leading
      Overline
      SupportingText
      Trailing
    }

### Constructors

-     Leading

-     Overline

-     SupportingText

-     Trailing

# Values

## default_config

</>

    pub fn default_config() -> Config

default_config is the default configuration for this component.

## default_disabled

</>

    pub const default_disabled: Disabled

## default_selected

</>

    pub const default_selected: Selected

## default_value

</>

    pub const default_value: String

## disabled

</>

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

disabled sets the value of disabled for this ListOption.

## from_config

</>

    pub fn from_config(config: Config) -> ListOption

from_config creates a new ListOption from the given configuration.

## new

</>

    pub fn new() -> ListOption

new creates a new ListOption with the default configuration.

## render

</>

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

render creates a Lustre Element for a ListOption

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

## selected

</>

    pub fn selected(
      record: ListOption,
      selected: Selected,
    ) -> ListOption

selected sets the value of selected for this ListOption.

## slot

</>

    pub fn slot(s: Slot) -> attribute.Attribute(msg)

slot returns a Lustre Attribute(msg) for the given slot name

## value

</>

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

value sets the value of value for this ListOption.

✨