# m3e/drawer_container

DrawerContainer is a container for one or two sliding drawers.

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(
        end: End,
        end_mode: drawer_mode.DrawerMode,
        end_divider: EndDivider,
        start: Start,
        start_mode: drawer_mode.DrawerMode,
        start_divider: StartDivider,
      )
    }

### Constructors

-     Config(
        end: End,
        end_mode: drawer_mode.DrawerMode,
        end_divider: EndDivider,
        start: Start,
        start_mode: drawer_mode.DrawerMode,
        start_divider: StartDivider,
      )

## DrawerContainer

opaque </>

DrawerContainer is a View Model for this component

## Fields:

- end: Whether the end drawer is open.
- end_mode: The behavior mode of the end drawer.
- end_divider: Whether to show a divider between the end drawer and content for `side` mode.
- start: Whether the start drawer is open.
- start_mode: The behavior mode of the start drawer.
- start_divider: Whether to show a divider between the start drawer and content for `side` mode.

    pub opaque type DrawerContainer

## End

</>

End is whether the end drawer is open.

    pub type End {
      IsEnd
      IsNotEnd
    }

### Constructors

-     IsEnd

-     IsNotEnd

## EndDivider

</>

EndDivider is whether to show a divider between the end drawer and content for `side` mode.

    pub type EndDivider {
      IsEndDivider
      IsNotEndDivider
    }

### Constructors

-     IsEndDivider

-     IsNotEndDivider

## Slot

</>

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

    pub type Slot {
      Start
      End
    }

### Constructors

-     Start

-     End

## Start

</>

Start is whether the start drawer is open.

    pub type Start {
      IsStart
      IsNotStart
    }

### Constructors

-     IsStart

-     IsNotStart

## StartDivider

</>

StartDivider is whether to show a divider between the start drawer and content for `side` mode.

    pub type StartDivider {
      IsStartDivider
      IsNotStartDivider
    }

### Constructors

-     IsStartDivider

-     IsNotStartDivider

# Values

## default_config

</>

    pub fn default_config() -> Config

default_config is the default configuration for this component.

## default_end

</>

    pub const default_end: End

## default_end_divider

</>

    pub const default_end_divider: EndDivider

## default_end_mode

</>

    pub const default_end_mode: drawer_mode.DrawerMode

## default_start

</>

    pub const default_start: Start

## default_start_divider

</>

    pub const default_start_divider: StartDivider

## default_start_mode

</>

    pub const default_start_mode: drawer_mode.DrawerMode

## end

</>

    pub fn end(record: DrawerContainer, end: End) -> DrawerContainer

end sets the value of end for this DrawerContainer.

## end_divider

</>

    pub fn end_divider(
      record: DrawerContainer,
      end_divider: EndDivider,
    ) -> DrawerContainer

end_divider sets the value of end_divider for this DrawerContainer.

## end_mode

</>

    pub fn end_mode(
      record: DrawerContainer,
      end_mode: drawer_mode.DrawerMode,
    ) -> DrawerContainer

end_mode sets the value of end_mode for this DrawerContainer.

## from_config

</>

    pub fn from_config(config: Config) -> DrawerContainer

from_config creates a new DrawerContainer from the given configuration.

## new

</>

    pub fn new() -> DrawerContainer

new creates a new DrawerContainer with the default configuration.

## render

</>

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

render creates a Lustre Element for a DrawerContainer

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

## slot

</>

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

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

## start

</>

    pub fn start(
      record: DrawerContainer,
      start: Start,
    ) -> DrawerContainer

start sets the value of start for this DrawerContainer.

## start_divider

</>

    pub fn start_divider(
      record: DrawerContainer,
      start_divider: StartDivider,
    ) -> DrawerContainer

start_divider sets the value of start_divider for this DrawerContainer.

## start_mode

</>

    pub fn start_mode(
      record: DrawerContainer,
      start_mode: drawer_mode.DrawerMode,
    ) -> DrawerContainer

start_mode sets the value of start_mode for this DrawerContainer.

✨