m3e/toc
Toc is a table of contents that provides in-page scroll navigation.
This file was generated: By: m3e/generator version 0.1.0 At: 2026-05-05T14:38:23+10:00
DO NOT EDIT
Types
Config is a public record for configuring this component.
pub type Config {
Config(for: option.Option(String), max_depth: Float)
}
Constructors
-
Config(for: option.Option(String), max_depth: Float)
Slots are used in child elements to insert content into this component
pub type Slot {
Overline
Title
}
Constructors
-
Overline -
Title
Values
pub fn default_config() -> Config
default_config is the default configuration for this component.
pub const default_for: option.Option(String)
pub const default_max_depth: Float
pub fn for(record: Toc, for: option.Option(String)) -> Toc
for sets the value of for for this Toc.
pub fn from_config(config: Config) -> Toc
from_config creates a new Toc from the given configuration.
pub fn max_depth(record: Toc, max_depth: Float) -> Toc
max_depth sets the value of max_depth for this Toc.
pub fn render(
model: Toc,
attributes: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
render creates a Lustre Element for a Toc
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 Toc Config
pub fn slot(s: Slot) -> attribute.Attribute(msg)
slot returns a Lustre Attribute(msg) for the given slot name