m3e/tab

Tab is an interactive element that, when activated, presents an associated tab 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(
    disabled: Disabled,
    for: option.Option(String),
    selected: Selected,
  )
}

Constructors

Disabled is whether the element is disabled.

pub type Disabled {
  IsDisabled
  IsNotDisabled
}

Constructors

  • IsDisabled
  • IsNotDisabled

Selected is whether the element is selected.

pub type Selected {
  IsSelected
  IsNotSelected
}

Constructors

  • IsSelected
  • IsNotSelected

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

pub type Slot {
  Icon
}

Constructors

  • Icon

Tab is a View Model for this component

Fields:

  • disabled: Whether the element is disabled.
  • for: The identifier of the interactive control to which this element is attached.
  • selected: Whether the element is selected.
pub opaque type Tab

Values

pub fn default_config() -> Config

default_config is the default configuration for this component.

pub const default_disabled: Disabled
pub const default_for: option.Option(String)
pub const default_selected: Selected
pub fn disabled(record: Tab, disabled: Disabled) -> Tab

disabled sets the value of disabled for this Tab.

pub fn for(record: Tab, for: option.Option(String)) -> Tab

for sets the value of for for this Tab.

pub fn from_config(config: Config) -> Tab

from_config creates a new Tab from the given configuration.

pub fn new() -> Tab

new creates a new Tab with the default configuration.

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

render creates a Lustre Element for a Tab

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

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

selected sets the value of selected for this Tab.

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

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

Search Document