# m3e/theme

Theme is a non-visual element responsible for application-level theming.

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(
        color: String,
        contrast: contrast_level.ContrastLevel,
        density: Float,
        scheme: color_scheme.ColorScheme,
        strong_focus: StrongFocus,
        motion: motion_scheme.MotionScheme,
      )
    }

### Constructors

-     Config(
        color: String,
        contrast: contrast_level.ContrastLevel,
        density: Float,
        scheme: color_scheme.ColorScheme,
        strong_focus: StrongFocus,
        motion: motion_scheme.MotionScheme,
      )

## StrongFocus

</>

StrongFocus is whether to enable strong focus indicators.

    pub type StrongFocus {
      IsStrongFocus
      IsNotStrongFocus
    }

### Constructors

-     IsStrongFocus

-     IsNotStrongFocus

## Theme

opaque </>

Theme is a View Model for this component

## Fields:

- color: The hex color from which to derive dynamic color palettes.
- contrast: The contrast level of the theme.
- density: The density scale (0, -1, -2).
- scheme: The color scheme of the theme.
- strong_focus: Whether to enable strong focus indicators.
- motion: The motion scheme.

    pub opaque type Theme

# Values

## color

</>

    pub fn color(record: Theme, color: String) -> Theme

color sets the value of color for this Theme.

## contrast

</>

    pub fn contrast(
      record: Theme,
      contrast: contrast_level.ContrastLevel,
    ) -> Theme

contrast sets the value of contrast for this Theme.

## default_color

</>

    pub const default_color: String

## default_config

</>

    pub fn default_config() -> Config

default_config is the default configuration for this component.

## default_contrast

</>

    pub const default_contrast: contrast_level.ContrastLevel

## default_density

</>

    pub const default_density: Float

## default_motion

</>

    pub const default_motion: motion_scheme.MotionScheme

## default_scheme

</>

    pub const default_scheme: color_scheme.ColorScheme

## default_strong_focus

</>

    pub const default_strong_focus: StrongFocus

## density

</>

    pub fn density(record: Theme, density: Float) -> Theme

density sets the value of density for this Theme.

## from_config

</>

    pub fn from_config(config: Config) -> Theme

from_config creates a new Theme from the given configuration.

## motion

</>

    pub fn motion(
      record: Theme,
      motion: motion_scheme.MotionScheme,
    ) -> Theme

motion sets the value of motion for this Theme.

## new

</>

    pub fn new() -> Theme

new creates a new Theme with the default configuration.

## render

</>

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

render creates a Lustre Element for a Theme

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

## scheme

</>

    pub fn scheme(
      record: Theme,
      scheme: color_scheme.ColorScheme,
    ) -> Theme

scheme sets the value of scheme for this Theme.

## strong_focus

</>

    pub fn strong_focus(
      record: Theme,
      strong_focus: StrongFocus,
    ) -> Theme

strong_focus sets the value of strong_focus for this Theme.

✨