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 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 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)
Values
pub fn default_config() -> Config
default_config is the default configuration for this component.
pub const default_value: String
pub const default_variant: chip_variant.ChipVariant
pub fn from_config(config: Config) -> Chip
from_config creates a new Chip from the given configuration.
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
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
pub fn slot(s: Slot) -> attribute.Attribute(msg)
slot returns a Lustre Attribute(msg) for the given slot name
pub fn variant(
record: Chip,
variant: chip_variant.ChipVariant,
) -> Chip
variant sets the value of variant for this Chip.