m3e/input_chip
InputChip is a chip which represents a discrete piece of information entered by a user.
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,
removable: Removable,
remove_label: String,
value: String,
variant: chip_variant.ChipVariant,
)
}
Constructors
-
Config( disabled: Disabled, disabled_interactive: DisabledInteractive, removable: Removable, remove_label: String, value: String, variant: chip_variant.ChipVariant, )
Disabled is whether the element is disabled.
pub type Disabled {
IsDisabled
IsNotDisabled
}
Constructors
-
IsDisabled -
IsNotDisabled
DisabledInteractive is whether the element is disabled and interactive.
pub type DisabledInteractive {
IsDisabledInteractive
IsNotDisabledInteractive
}
Constructors
-
IsDisabledInteractive -
IsNotDisabledInteractive
InputChip is a View Model for this component
Fields:
- disabled: Whether the element is disabled.
- disabled_interactive: Whether the element is disabled and interactive.
- removable: Whether the chip is removable.
- remove_label: The accessible label given to the button used to remove the chip.
- value: A string representing the value of the chip.
- variant: The appearance variant of the chip.
pub opaque type InputChip
Removable is whether the chip is removable.
pub type Removable {
IsRemovable
IsNotRemovable
}
Constructors
-
IsRemovable -
IsNotRemovable
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_removable: Removable
pub const default_remove_label: String
pub const default_value: String
pub const default_variant: chip_variant.ChipVariant
pub fn disabled(
record: InputChip,
disabled: Disabled,
) -> InputChip
disabled sets the value of disabled for this InputChip.
pub fn disabled_interactive(
record: InputChip,
disabled_interactive: DisabledInteractive,
) -> InputChip
disabled_interactive sets the value of disabled_interactive for this InputChip.
pub fn from_config(config: Config) -> InputChip
from_config creates a new InputChip from the given configuration.
pub fn removable(
record: InputChip,
removable: Removable,
) -> InputChip
removable sets the value of removable for this InputChip.
pub fn remove_label(
record: InputChip,
remove_label: String,
) -> InputChip
remove_label sets the value of remove_label for this InputChip.
pub fn render(
model: InputChip,
attributes: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
render creates a Lustre Element for a InputChip
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 InputChip Config
pub fn slot(s: Slot) -> attribute.Attribute(msg)
slot returns a Lustre Attribute(msg) for the given slot name
pub fn value(record: InputChip, value: String) -> InputChip
value sets the value of value for this InputChip.
pub fn variant(
record: InputChip,
variant: chip_variant.ChipVariant,
) -> InputChip
variant sets the value of variant for this InputChip.