m3e/expansion_header

ExpansionHeader is a button used to toggle the expanded state of an expansion panel.

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(
    hide_toggle: HideToggle,
    toggle_direction: expansion_toggle_direction.ExpansionToggleDirection,
    toggle_position: expansion_toggle_position.ExpansionTogglePosition,
    disabled: Disabled,
  )
}

Constructors

Disabled is whether the element is disabled.

pub type Disabled {
  IsDisabled
  IsNotDisabled
}

Constructors

  • IsDisabled
  • IsNotDisabled

ExpansionHeader is a View Model for this component

Fields:

  • hide_toggle: Whether to hide the expansion toggle.
  • toggle_direction: The direction of the expansion toggle.
  • toggle_position: The position of the expansion toggle.
  • disabled: Whether the element is disabled.
pub opaque type ExpansionHeader

HideToggle is whether to hide the expansion toggle.

pub type HideToggle {
  IsHideToggle
  IsNotHideToggle
}

Constructors

  • IsHideToggle
  • IsNotHideToggle

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

pub type Slot {
  ToggleIcon
}

Constructors

  • ToggleIcon

Values

pub fn default_config() -> Config

default_config is the default configuration for this component.

pub const default_disabled: Disabled
pub const default_hide_toggle: HideToggle
pub fn disabled(
  record: ExpansionHeader,
  disabled: Disabled,
) -> ExpansionHeader

disabled sets the value of disabled for this ExpansionHeader.

pub fn from_config(config: Config) -> ExpansionHeader

from_config creates a new ExpansionHeader from the given configuration.

pub fn hide_toggle(
  record: ExpansionHeader,
  hide_toggle: HideToggle,
) -> ExpansionHeader

hide_toggle sets the value of hide_toggle for this ExpansionHeader.

pub fn new() -> ExpansionHeader

new creates a new ExpansionHeader with the default configuration.

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

render creates a Lustre Element for a ExpansionHeader

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

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

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

pub fn toggle_direction(
  record: ExpansionHeader,
  toggle_direction: expansion_toggle_direction.ExpansionToggleDirection,
) -> ExpansionHeader

toggle_direction sets the value of toggle_direction for this ExpansionHeader.

pub fn toggle_position(
  record: ExpansionHeader,
  toggle_position: expansion_toggle_position.ExpansionTogglePosition,
) -> ExpansionHeader

toggle_position sets the value of toggle_position for this ExpansionHeader.

Search Document