# m3e/button_group

ButtonGroup is organizes buttons and adds interactions between them.

This file was generated: By: m3e/generator version 0.1.0 At: 2026-05-05T14:38:23+10:00

         DO NOT EDIT

# Types

## ButtonGroup

opaque </>

ButtonGroup is a View Model for this component

## Fields:

- multi: Whether multiple toggle buttons can be selected.
- size: The size of the group.
- variant: The appearance variant of the group.

    pub opaque type ButtonGroup

## Config

</>

Config is a public record for configuring this component.

    pub type Config {
      Config(
        multi: Multi,
        size: button_group_size.ButtonGroupSize,
        variant: button_group_variant.ButtonGroupVariant,
      )
    }

### Constructors

-     Config(
        multi: Multi,
        size: button_group_size.ButtonGroupSize,
        variant: button_group_variant.ButtonGroupVariant,
      )

## Multi

</>

Multi is whether multiple toggle buttons can be selected.

    pub type Multi {
      IsMulti
      IsNotMulti
    }

### Constructors

-     IsMulti

-     IsNotMulti

# Values

## default_config

</>

    pub fn default_config() -> Config

default_config is the default configuration for this component.

## default_multi

</>

    pub const default_multi: Multi

## default_size

</>

    pub const default_size: button_group_size.ButtonGroupSize

## default_variant

</>

    pub const default_variant: button_group_variant.ButtonGroupVariant

## from_config

</>

    pub fn from_config(config: Config) -> ButtonGroup

from_config creates a new ButtonGroup from the given configuration.

## multi

</>

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

multi sets the value of multi for this ButtonGroup.

## new

</>

    pub fn new() -> ButtonGroup

new creates a new ButtonGroup with the default configuration.

## render

</>

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

render creates a Lustre Element for a ButtonGroup

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

## size

</>

    pub fn size(
      record: ButtonGroup,
      size: button_group_size.ButtonGroupSize,
    ) -> ButtonGroup

size sets the value of size for this ButtonGroup.

## variant

</>

    pub fn variant(
      record: ButtonGroup,
      variant: button_group_variant.ButtonGroupVariant,
    ) -> ButtonGroup

variant sets the value of variant for this ButtonGroup.

✨