m3e/icon

Icon is a small symbol used to easily identify an action or category.

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(
    filled: Filled,
    grade: icon_grade.IconGrade,
    optical_size: Float,
    name: String,
    variant: icon_variant.IconVariant,
    weight: icon_weight.IconWeight,
  )
}

Constructors

Filled is whether the icon is filled.

pub type Filled {
  IsFilled
  IsNotFilled
}

Constructors

  • IsFilled
  • IsNotFilled

Icon is a View Model for this component

Fields:

  • filled: Whether the icon is filled.
  • grade: The grade of the icon.
  • optical_size: A value from 20 to 48 indicating the optical size of the icon.
  • name: The name of the icon.
  • variant: The appearance variant of the icon.
  • weight: A value from 100 to 700 indicating the weight of the icon.
pub opaque type Icon

Values

pub fn default_config() -> Config

default_config is the default configuration for this component.

pub const default_filled: Filled
pub const default_name: String
pub const default_optical_size: Float
pub fn filled(record: Icon, filled: Filled) -> Icon

filled sets the value of filled for this Icon.

pub fn from_config(config: Config) -> Icon

from_config creates a new Icon from the given configuration.

pub fn grade(record: Icon, grade: icon_grade.IconGrade) -> Icon

grade sets the value of grade for this Icon.

pub fn name(record: Icon, name: String) -> Icon

name sets the value of name for this Icon.

pub fn new() -> Icon

new creates a new Icon with the default configuration.

pub fn optical_size(record: Icon, optical_size: Float) -> Icon

optical_size sets the value of optical_size for this Icon.

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

render creates a Lustre Element for a Icon

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

pub fn variant(
  record: Icon,
  variant: icon_variant.IconVariant,
) -> Icon

variant sets the value of variant for this Icon.

pub fn weight(
  record: Icon,
  weight: icon_weight.IconWeight,
) -> Icon

weight sets the value of weight for this Icon.

Search Document