m3e/segmented_button

SegmentedButton is a button that allows a user to select from a limited 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

Config is a public record for configuring this component.

pub type Config {
  Config(
    disabled: Disabled,
    hide_selection_indicator: HideSelectionIndicator,
    multi: Multi,
    name: String,
  )
}

Constructors

Disabled is whether the element is disabled.

pub type Disabled {
  IsDisabled
  IsNotDisabled
}

Constructors

  • IsDisabled
  • IsNotDisabled

HideSelectionIndicator is whether to hide the selection indicator.

pub type HideSelectionIndicator {
  IsHideSelectionIndicator
  IsNotHideSelectionIndicator
}

Constructors

  • IsHideSelectionIndicator
  • IsNotHideSelectionIndicator

Multi is whether multiple options can be selected.

pub type Multi {
  IsMulti
  IsNotMulti
}

Constructors

  • IsMulti
  • IsNotMulti

SegmentedButton is a View Model for this component

Fields:

  • disabled: Whether the element is disabled.
  • hide_selection_indicator: Whether to hide the selection indicator.
  • multi: Whether multiple options can be selected.
  • name: The name that identifies the element when submitting the associated form.
pub opaque type SegmentedButton

Values

pub fn default_config() -> Config

default_config is the default configuration for this component.

pub const default_disabled: Disabled
pub const default_hide_selection_indicator: HideSelectionIndicator
pub const default_multi: Multi
pub const default_name: String
pub fn disabled(
  record: SegmentedButton,
  disabled: Disabled,
) -> SegmentedButton

disabled sets the value of disabled for this SegmentedButton.

pub fn from_config(config: Config) -> SegmentedButton

from_config creates a new SegmentedButton from the given configuration.

pub fn hide_selection_indicator(
  record: SegmentedButton,
  hide_selection_indicator: HideSelectionIndicator,
) -> SegmentedButton

hide_selection_indicator sets the value of hide_selection_indicator for this SegmentedButton.

pub fn multi(
  record: SegmentedButton,
  multi: Multi,
) -> SegmentedButton

multi sets the value of multi for this SegmentedButton.

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

name sets the value of name for this SegmentedButton.

pub fn new() -> SegmentedButton

new creates a new SegmentedButton with the default configuration.

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

render creates a Lustre Element for a SegmentedButton

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

Search Document