# m3e/tree

Tree is presents hierarchical data in a tree structure.

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

         DO NOT EDIT

# Types

## Cascade

</>

Cascade is whether multiple item selection cascades to child items.

    pub type Cascade {
      IsCascade
      IsNotCascade
    }

### Constructors

-     IsCascade

-     IsNotCascade

## Config

</>

Config is a public record for configuring this component.

    pub type Config {
      Config(multi: Multi, cascade: Cascade)
    }

### Constructors

-     Config(multi: Multi, cascade: Cascade)

## Multi

</>

Multi is whether multiple items can be selected.

    pub type Multi {
      IsMulti
      IsNotMulti
    }

### Constructors

-     IsMulti

-     IsNotMulti

## Tree

opaque </>

Tree is a View Model for this component

## Fields:

- multi: Whether multiple items can be selected.
- cascade: Whether multiple item selection cascades to child items.

    pub opaque type Tree

# Values

## cascade

</>

    pub fn cascade(record: Tree, cascade: Cascade) -> Tree

cascade sets the value of cascade for this Tree.

## default_cascade

</>

    pub const default_cascade: Cascade

## default_config

</>

    pub fn default_config() -> Config

default_config is the default configuration for this component.

## default_multi

</>

    pub const default_multi: Multi

## from_config

</>

    pub fn from_config(config: Config) -> Tree

from_config creates a new Tree from the given configuration.

## multi

</>

    pub fn multi(record: Tree, multi: Multi) -> Tree

multi sets the value of multi for this Tree.

## new

</>

    pub fn new() -> Tree

new creates a new Tree with the default configuration.

## render

</>

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

render creates a Lustre Element for a Tree

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

✨