# 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

</>

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

-     Config(
        filled: Filled,
        grade: icon_grade.IconGrade,
        optical_size: Float,
        name: String,
        variant: icon_variant.IconVariant,
        weight: icon_weight.IconWeight,
      )

## Filled

</>

Filled is whether the icon is filled.

    pub type Filled {
      IsFilled
      IsNotFilled
    }

### Constructors

-     IsFilled

-     IsNotFilled

## Icon

opaque </>

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

## default_config

</>

    pub fn default_config() -> Config

default_config is the default configuration for this component.

## default_filled

</>

    pub const default_filled: Filled

## default_grade

</>

    pub const default_grade: icon_grade.IconGrade

## default_name

</>

    pub const default_name: String

## default_optical_size

</>

    pub const default_optical_size: Float

## default_variant

</>

    pub const default_variant: icon_variant.IconVariant

## default_weight

</>

    pub const default_weight: icon_weight.IconWeight

## filled

</>

    pub fn filled(record: Icon, filled: Filled) -> Icon

filled sets the value of filled for this Icon.

## from_config

</>

    pub fn from_config(config: Config) -> Icon

from_config creates a new Icon from the given configuration.

## grade

</>

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

grade sets the value of grade for this Icon.

## name

</>

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

name sets the value of name for this Icon.

## new

</>

    pub fn new() -> Icon

new creates a new Icon with the default configuration.

## optical_size

</>

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

optical_size sets the value of optical_size for this Icon.

## render

</>

    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

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

## variant

</>

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

variant sets the value of variant for this Icon.

## weight

</>

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

weight sets the value of weight for this Icon.

✨