# m3e/option

Option is an option that can be selected.

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,
        disable_highlight: DisableHighlight,
        highlight_mode: text_highlight_mode.TextHighlightMode,
        selected: Selected,
        term: String,
        value: String,
      )
    }

### Constructors

-     Config(
        disabled: Disabled,
        disable_highlight: DisableHighlight,
        highlight_mode: text_highlight_mode.TextHighlightMode,
        selected: Selected,
        term: String,
        value: String,
      )

## DisableHighlight

</>

DisableHighlight is whether text highlighting is disabled.

    pub type DisableHighlight {
      IsDisableHighlight
      IsNotDisableHighlight
    }

### Constructors

-     IsDisableHighlight

-     IsNotDisableHighlight

## Disabled

</>

Disabled is whether the element is disabled.

    pub type Disabled {
      IsDisabled
      IsNotDisabled
    }

### Constructors

-     IsDisabled

-     IsNotDisabled

## Option

opaque </>

Option is a View Model for this component

## Fields:

- disabled: Whether the element is disabled.
- disable_highlight: Whether text highlighting is disabled.
- highlight_mode: The mode in which to highlight a term.
- selected: Whether the element is selected.
- term: The search term to highlight.
- value: A string representing the value of the option.

    pub opaque type Option

## Selected

</>

Selected is whether the element is selected.

    pub type Selected {
      IsSelected
      IsNotSelected
    }

### Constructors

-     IsSelected

-     IsNotSelected

# Values

## default_config

</>

    pub fn default_config() -> Config

default_config is the default configuration for this component.

## default_disable_highlight

</>

    pub const default_disable_highlight: DisableHighlight

## default_disabled

</>

    pub const default_disabled: Disabled

## default_highlight_mode

</>

    pub const default_highlight_mode: text_highlight_mode.TextHighlightMode

## default_selected

</>

    pub const default_selected: Selected

## default_term

</>

    pub const default_term: String

## default_value

</>

    pub const default_value: String

## disable_highlight

</>

    pub fn disable_highlight(
      record: Option,
      disable_highlight: DisableHighlight,
    ) -> Option

disable_highlight sets the value of disable_highlight for this Option.

## disabled

</>

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

disabled sets the value of disabled for this Option.

## from_config

</>

    pub fn from_config(config: Config) -> Option

from_config creates a new Option from the given configuration.

## highlight_mode

</>

    pub fn highlight_mode(
      record: Option,
      highlight_mode: text_highlight_mode.TextHighlightMode,
    ) -> Option

highlight_mode sets the value of highlight_mode for this Option.

## new

</>

    pub fn new() -> Option

new creates a new Option with the default configuration.

## render

</>

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

render creates a Lustre Element for a Option

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

## selected

</>

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

selected sets the value of selected for this Option.

## term

</>

    pub fn term(record: Option, term: String) -> Option

term sets the value of term for this Option.

## value

</>

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

value sets the value of value for this Option.

✨