# m3e/nav_menu_item

NavMenuItem is an expandable item, selectable item within a navigation menu.

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, open: Open, selected: Selected)
    }

### Constructors

-     Config(disabled: Disabled, open: Open, selected: Selected)

## Disabled

</>

Disabled is whether the element is disabled.

    pub type Disabled {
      IsDisabled
      IsNotDisabled
    }

### Constructors

-     IsDisabled

-     IsNotDisabled

## NavMenuItem

opaque </>

NavMenuItem is a View Model for this component

## Fields:

- disabled: Whether the element is disabled.
- open: Whether the item is expanded.
- selected: Whether the item is selected.

    pub opaque type NavMenuItem

## Open

</>

Open is whether the item is expanded.

    pub type Open {
      IsOpen
      IsNotOpen
    }

### Constructors

-     IsOpen

-     IsNotOpen

## Selected

</>

Selected is whether the item is selected.

    pub type Selected {
      IsSelected
      IsNotSelected
    }

### Constructors

-     IsSelected

-     IsNotSelected

## Slot

</>

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

    pub type Slot {
      Label
      Icon
      Badge
      SelectedIcon
      ToggleIcon
    }

### Constructors

-     Label

-     Icon

-     Badge

-     SelectedIcon

-     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_open

</>

    pub const default_open: Open

## default_selected

</>

    pub const default_selected: Selected

## disabled

</>

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

disabled sets the value of disabled for this NavMenuItem.

## from_config

</>

    pub fn from_config(config: Config) -> NavMenuItem

from_config creates a new NavMenuItem from the given configuration.

## new

</>

    pub fn new() -> NavMenuItem

new creates a new NavMenuItem with the default configuration.

## open

</>

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

open sets the value of open for this NavMenuItem.

## render

</>

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

render creates a Lustre Element for a NavMenuItem

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

## selected

</>

    pub fn selected(
      record: NavMenuItem,
      selected: Selected,
    ) -> NavMenuItem

selected sets the value of selected for this NavMenuItem.

## slot

</>

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

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

✨