m3e/split_button

SplitButton is a button used to show an action with a menu of related actions.

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(
    variant: split_button_variant.SplitButtonVariant,
    size: button_size.ButtonSize,
  )
}

Constructors

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

pub type Slot {
  LeadingButton
  TrailingButton
}

Constructors

  • LeadingButton
  • TrailingButton

SplitButton is a View Model for this component

Fields:

  • variant: The appearance variant of the button.
  • size: The size of the button.
pub opaque type SplitButton

Values

pub fn default_config() -> Config

default_config is the default configuration for this component.

pub fn from_config(config: Config) -> SplitButton

from_config creates a new SplitButton from the given configuration.

pub fn new() -> SplitButton

new creates a new SplitButton with the default configuration.

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

render creates a Lustre Element for a SplitButton

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

pub fn size(
  record: SplitButton,
  size: button_size.ButtonSize,
) -> SplitButton

size sets the value of size for this SplitButton.

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

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

pub fn variant(
  record: SplitButton,
  variant: split_button_variant.SplitButtonVariant,
) -> SplitButton

variant sets the value of variant for this SplitButton.

Search Document