# m3e/app_bar

AppBar is a bar, placed a the top of a screen, used to help users navigate through an application.

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

         DO NOT EDIT

# Types

## AppBar

opaque </>

AppBar is a View Model for this component

## Fields:

- centered: Whether the title and subtitle are centered.
- for: The identifier of the interactive control to which this element is attached.
- size: The size of the bar.

    pub opaque type AppBar

## Centered

</>

Centered is whether the title and subtitle are centered.

    pub type Centered {
      IsCentered
      IsNotCentered
    }

### Constructors

-     IsCentered

-     IsNotCentered

## Config

</>

Config is a public record for configuring this component.

    pub type Config {
      Config(
        centered: Centered,
        for: option.Option(String),
        size: app_bar_size.AppBarSize,
      )
    }

### Constructors

-     Config(
        centered: Centered,
        for: option.Option(String),
        size: app_bar_size.AppBarSize,
      )

## Slot

</>

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

    pub type Slot {
      Leading
      Subtitle
      Title
      Trailing
      LeadingIcon
      TrailingIcon
    }

### Constructors

-     Leading

-     Subtitle

-     Title

-     Trailing

-     LeadingIcon

-     TrailingIcon

# Values

## centered

</>

    pub fn centered(record: AppBar, centered: Centered) -> AppBar

centered sets the value of centered for this AppBar.

## default_centered

</>

    pub const default_centered: Centered

## default_config

</>

    pub fn default_config() -> Config

default_config is the default configuration for this component.

## default_for

</>

    pub const default_for: option.Option(String)

## default_size

</>

    pub const default_size: app_bar_size.AppBarSize

## for

</>

    pub fn for(record: AppBar, for: option.Option(String)) -> AppBar

for sets the value of for for this AppBar.

## from_config

</>

    pub fn from_config(config: Config) -> AppBar

from_config creates a new AppBar from the given configuration.

## new

</>

    pub fn new() -> AppBar

new creates a new AppBar with the default configuration.

## render

</>

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

render creates a Lustre Element for a AppBar

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

## size

</>

    pub fn size(
      record: AppBar,
      size: app_bar_size.AppBarSize,
    ) -> AppBar

size sets the value of size for this AppBar.

## slot

</>

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

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

✨