m3e/filter_chip

FilterChip is a chip users interact with to select/deselect options.

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(
    disabled: Disabled,
    disabled_interactive: DisabledInteractive,
    selected: Selected,
    value: String,
    variant: chip_variant.ChipVariant,
  )
}

Constructors

Disabled is a value indicating whether the element is disabled.

pub type Disabled {
  IsDisabled
  IsNotDisabled
}

Constructors

  • IsDisabled
  • IsNotDisabled

DisabledInteractive is a value indicating whether the element is disabled and interactive.

pub type DisabledInteractive {
  IsDisabledInteractive
  IsNotDisabledInteractive
}

Constructors

  • IsDisabledInteractive
  • IsNotDisabledInteractive

FilterChip is a View Model for this component

Fields:

  • disabled: A value indicating whether the element is disabled.
  • disabled_interactive: A value indicating whether the element is disabled and interactive.
  • selected: A value indicating whether the element is selected.
  • value: A string representing the value of the chip.
  • variant: The appearance variant of the chip.
pub opaque type FilterChip

Selected is a value indicating whether the element is selected.

pub type Selected {
  IsSelected
  IsNotSelected
}

Constructors

  • IsSelected
  • IsNotSelected

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

pub type Slot {
  Icon
  TrailingIcon
}

Constructors

  • Icon
  • TrailingIcon

Values

pub fn default_config() -> Config

default_config is the default configuration for this component.

pub const default_disabled: Disabled
pub const default_disabled_interactive: DisabledInteractive
pub const default_selected: Selected
pub const default_value: String
pub fn disabled(
  record: FilterChip,
  disabled: Disabled,
) -> FilterChip

disabled sets the value of disabled for this FilterChip.

pub fn disabled_interactive(
  record: FilterChip,
  disabled_interactive: DisabledInteractive,
) -> FilterChip

disabled_interactive sets the value of disabled_interactive for this FilterChip.

pub fn from_config(config: Config) -> FilterChip

from_config creates a new FilterChip from the given configuration.

pub fn new() -> FilterChip

new creates a new FilterChip with the default configuration.

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

render creates a Lustre Element for a FilterChip

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

pub fn selected(
  record: FilterChip,
  selected: Selected,
) -> FilterChip

selected sets the value of selected for this FilterChip.

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

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

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

value sets the value of value for this FilterChip.

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

variant sets the value of variant for this FilterChip.

Search Document