# m3e/chip

Chip is a non-interactive chip used to convey small pieces of information.

This file was generated: By: m3e/generator version 0.1.0 At: 2026-05-05T14:38:23+10:00

         DO NOT EDIT

# Types

## Chip

opaque </>

Chip is a View Model for this component

## Fields:

- value: A string representing the value of the chip.
- variant: The appearance variant of the chip.

    pub opaque type Chip

## Config

</>

Config is a public record for configuring this component.

    pub type Config {
      Config(value: String, variant: chip_variant.ChipVariant)
    }

### Constructors

-     Config(value: String, variant: chip_variant.ChipVariant)

## Slot

</>

Slots are used in child elements to insert content into this component

    pub type Slot {
      Icon
      TrailingIcon
    }

### Constructors

-     Icon

-     TrailingIcon

# Values

## default_config

</>

    pub fn default_config() -> Config

default_config is the default configuration for this component.

## default_value

</>

    pub const default_value: String

## default_variant

</>

    pub const default_variant: chip_variant.ChipVariant

## from_config

</>

    pub fn from_config(config: Config) -> Chip

from_config creates a new Chip from the given configuration.

## new

</>

    pub fn new() -> Chip

new creates a new Chip with the default configuration.

## render

</>

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

render creates a Lustre Element for a Chip

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

## slot

</>

    pub fn slot(s: Slot) -> attribute.Attribute(msg)

slot returns a Lustre Attribute(msg) for the given slot name

## value

</>

    pub fn value(record: Chip, value: String) -> Chip

value sets the value of value for this Chip.

## variant

</>

    pub fn variant(
      record: Chip,
      variant: chip_variant.ChipVariant,
    ) -> Chip

variant sets the value of variant for this Chip.

✨