m3e/state_layer

StateLayer is provides focus and hover state layer treatment for an interactive element.

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(
    disabled: Disabled,
    disable_hover: DisableHover,
    for: option.Option(String),
  )
}

Constructors

DisableHover is whether hover events will not trigger the state layer. State layers can still be controlled manually using the show and hide methods.

pub type DisableHover {
  IsDisableHover
  IsNotDisableHover
}

Constructors

  • IsDisableHover
  • IsNotDisableHover

Disabled is whether hover and focus events will not trigger the state layer. State layers can still be controlled manually using the show and hide methods.

pub type Disabled {
  IsDisabled
  IsNotDisabled
}

Constructors

  • IsDisabled
  • IsNotDisabled

StateLayer is a View Model for this component

Fields:

  • disabled: Whether hover and focus events will not trigger the state layer. State layers can still be controlled manually using the show and hide methods.
  • disable_hover: Whether hover events will not trigger the state layer. State layers can still be controlled manually using the show and hide methods.
  • for: The identifier of the interactive control to which this element is attached.
pub opaque type StateLayer

Values

pub fn default_config() -> Config

default_config is the default configuration for this component.

pub const default_disable_hover: DisableHover
pub const default_disabled: Disabled
pub const default_for: option.Option(String)
pub fn disable_hover(
  record: StateLayer,
  disable_hover: DisableHover,
) -> StateLayer

disable_hover sets the value of disable_hover for this StateLayer.

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

disabled sets the value of disabled for this StateLayer.

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

for sets the value of for for this StateLayer.

pub fn from_config(config: Config) -> StateLayer

from_config creates a new StateLayer from the given configuration.

pub fn new() -> StateLayer

new creates a new StateLayer with the default configuration.

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

render creates a Lustre Element for a StateLayer

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 StateLayer Config

Search Document