# 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

</>

Config is a public record for configuring this component.

    pub type Config {
      Config(
        variant: split_button_variant.SplitButtonVariant,
        size: button_size.ButtonSize,
      )
    }

### Constructors

-     Config(
        variant: split_button_variant.SplitButtonVariant,
        size: button_size.ButtonSize,
      )

## Slot

</>

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

    pub type Slot {
      LeadingButton
      TrailingButton
    }

### Constructors

-     LeadingButton

-     TrailingButton

## SplitButton

opaque </>

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

## default_config

</>

    pub fn default_config() -> Config

default_config is the default configuration for this component.

## default_size

</>

    pub const default_size: button_size.ButtonSize

## default_variant

</>

    pub const default_variant: split_button_variant.SplitButtonVariant

## from_config

</>

    pub fn from_config(config: Config) -> SplitButton

from_config creates a new SplitButton from the given configuration.

## new

</>

    pub fn new() -> SplitButton

new creates a new SplitButton with the default configuration.

## render

</>

    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

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

## size

</>

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

size sets the value of size for this SplitButton.

## slot

</>

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

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

## variant

</>

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

variant sets the value of variant for this SplitButton.

✨