# m3e/menu

Menu is presents a list of choices on a temporary surface.

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(
        position_x: menu_position_x.MenuPositionX,
        position_y: menu_position_y.MenuPositionY,
        variant: menu_variant.MenuVariant,
        submenu: Submenu,
      )
    }

### Constructors

-     Config(
        position_x: menu_position_x.MenuPositionX,
        position_y: menu_position_y.MenuPositionY,
        variant: menu_variant.MenuVariant,
        submenu: Submenu,
      )

## Menu

opaque </>

Menu is a View Model for this component

## Fields:

- position_x: The position of the menu, on the x-axis.
- position_y: The position of the menu, on the y-axis.
- variant: The appearance variant of the menu.
- submenu: A value indicating whether the menu is a submenu.

    pub opaque type Menu

## Submenu

</>

Submenu is a value indicating whether the menu is a submenu.

    pub type Submenu {
      IsSubmenu
      IsNotSubmenu
    }

### Constructors

-     IsSubmenu

-     IsNotSubmenu

# Values

## default_config

</>

    pub fn default_config() -> Config

default_config is the default configuration for this component.

## default_position_x

</>

    pub const default_position_x: menu_position_x.MenuPositionX

## default_position_y

</>

    pub const default_position_y: menu_position_y.MenuPositionY

## default_submenu

</>

    pub const default_submenu: Submenu

## default_variant

</>

    pub const default_variant: menu_variant.MenuVariant

## from_config

</>

    pub fn from_config(config: Config) -> Menu

from_config creates a new Menu from the given configuration.

## new

</>

    pub fn new() -> Menu

new creates a new Menu with the default configuration.

## position_x

</>

    pub fn position_x(
      record: Menu,
      position_x: menu_position_x.MenuPositionX,
    ) -> Menu

position_x sets the value of position_x for this Menu.

## position_y

</>

    pub fn position_y(
      record: Menu,
      position_y: menu_position_y.MenuPositionY,
    ) -> Menu

position_y sets the value of position_y for this Menu.

## render

</>

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

render creates a Lustre Element for a Menu

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

## submenu

</>

    pub fn submenu(record: Menu, submenu: Submenu) -> Menu

submenu sets the value of submenu for this Menu.

## variant

</>

    pub fn variant(
      record: Menu,
      variant: menu_variant.MenuVariant,
    ) -> Menu

variant sets the value of variant for this Menu.

✨