# m3e/expansion_panel

ExpansionPanel is an expandable details-summary view.

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

### Constructors

-     Config(
        disabled: Disabled,
        hide_toggle: HideToggle,
        open: Open,
        toggle_direction: expansion_toggle_direction.ExpansionToggleDirection,
        toggle_position: expansion_toggle_position.ExpansionTogglePosition,
      )

## Disabled

</>

Disabled is whether the element is disabled.

    pub type Disabled {
      IsDisabled
      IsNotDisabled
    }

### Constructors

-     IsDisabled

-     IsNotDisabled

## ExpansionPanel

opaque </>

ExpansionPanel is a View Model for this component

## Fields:

- disabled: Whether the element is disabled.
- hide_toggle: Whether to hide the expansion toggle.
- open: Whether the panel is expanded.
- toggle_direction: The direction of the expansion toggle.
- toggle_position: The position of the expansion toggle.

    pub opaque type ExpansionPanel

## HideToggle

</>

HideToggle is whether to hide the expansion toggle.

    pub type HideToggle {
      IsHideToggle
      IsNotHideToggle
    }

### Constructors

-     IsHideToggle

-     IsNotHideToggle

## Open

</>

Open is whether the panel is expanded.

    pub type Open {
      IsOpen
      IsNotOpen
    }

### Constructors

-     IsOpen

-     IsNotOpen

## Slot

</>

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

    pub type Slot {
      Actions
      Header
      ToggleIcon
    }

### Constructors

-     Actions

-     Header

-     ToggleIcon

# Values

## default_config

</>

    pub fn default_config() -> Config

default_config is the default configuration for this component.

## default_disabled

</>

    pub const default_disabled: Disabled

## default_hide_toggle

</>

    pub const default_hide_toggle: HideToggle

## default_open

</>

    pub const default_open: Open

## default_toggle_direction

</>

    pub const default_toggle_direction: expansion_toggle_direction.ExpansionToggleDirection

## default_toggle_position

</>

    pub const default_toggle_position: expansion_toggle_position.ExpansionTogglePosition

## disabled

</>

    pub fn disabled(
      record: ExpansionPanel,
      disabled: Disabled,
    ) -> ExpansionPanel

disabled sets the value of disabled for this ExpansionPanel.

## from_config

</>

    pub fn from_config(config: Config) -> ExpansionPanel

from_config creates a new ExpansionPanel from the given configuration.

## hide_toggle

</>

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

hide_toggle sets the value of hide_toggle for this ExpansionPanel.

## new

</>

    pub fn new() -> ExpansionPanel

new creates a new ExpansionPanel with the default configuration.

## open

</>

    pub fn open(record: ExpansionPanel, open: Open) -> ExpansionPanel

open sets the value of open for this ExpansionPanel.

## render

</>

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

render creates a Lustre Element for a ExpansionPanel

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

## slot

</>

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

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

## toggle_direction

</>

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

toggle_direction sets the value of toggle_direction for this ExpansionPanel.

## toggle_position

</>

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

toggle_position sets the value of toggle_position for this ExpansionPanel.

✨