# 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

</>

Config is a public record for configuring this component.

    pub type Config {
      Config(
        disabled: Disabled,
        disable_hover: DisableHover,
        for: option.Option(String),
      )
    }

### Constructors

-     Config(
        disabled: Disabled,
        disable_hover: DisableHover,
        for: option.Option(String),
      )

## DisableHover

</>

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

</>

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

opaque </>

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

## default_config

</>

    pub fn default_config() -> Config

default_config is the default configuration for this component.

## default_disable_hover

</>

    pub const default_disable_hover: DisableHover

## default_disabled

</>

    pub const default_disabled: Disabled

## default_for

</>

    pub const default_for: option.Option(String)

## disable_hover

</>

    pub fn disable_hover(
      record: StateLayer,
      disable_hover: DisableHover,
    ) -> StateLayer

disable_hover sets the value of disable_hover for this StateLayer.

## disabled

</>

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

disabled sets the value of disabled for this StateLayer.

## for

</>

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

for sets the value of for for this StateLayer.

## from_config

</>

    pub fn from_config(config: Config) -> StateLayer

from_config creates a new StateLayer from the given configuration.

## new

</>

    pub fn new() -> StateLayer

new creates a new StateLayer with the default configuration.

## render

</>

    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

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

✨