# m3e/suggestion_chip

SuggestionChip is a chip used to help narrow a user’s intent by presenting dynamically generated suggestions, such as //// suggested responses or search filters.

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(
        disabled: Disabled,
        disabled_interactive: DisabledInteractive,
        download: option.Option(String),
        href: String,
        name: String,
        rel: String,
        target: option.Option(link_target.LinkTarget),
        type_: form_submitter_type.FormSubmitterType,
        value: String,
        variant: chip_variant.ChipVariant,
      )
    }

### Constructors

-     Config(
        disabled: Disabled,
        disabled_interactive: DisabledInteractive,
        download: option.Option(String),
        href: String,
        name: String,
        rel: String,
        target: option.Option(link_target.LinkTarget),
        type_: form_submitter_type.FormSubmitterType,
        value: String,
        variant: chip_variant.ChipVariant,
      )

## Disabled

</>

Disabled is a value indicating whether the element is disabled.

    pub type Disabled {
      IsDisabled
      IsNotDisabled
    }

### Constructors

-     IsDisabled

-     IsNotDisabled

## DisabledInteractive

</>

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

    pub type DisabledInteractive {
      IsDisabledInteractive
      IsNotDisabledInteractive
    }

### Constructors

-     IsDisabledInteractive

-     IsNotDisabledInteractive

## Slot

</>

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

    pub type Slot {
      Icon
      TrailingIcon
    }

### Constructors

-     Icon

-     TrailingIcon

## SuggestionChip

opaque </>

SuggestionChip 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.
- download: A value indicating whether the `target` of the link button will be downloaded, optionally specifying the new name of the file.
- href: The URL to which the link button points.
- name: The name of the element, submitted as a pair with the element’s `value` as part of form data, when the element is used to submit a form.
- rel: The relationship between the `target` of the link button and the document.
- target: The target of the link button.
- type_: The type of the element.
- value: A string representing the value of the chip.
- variant: The appearance variant of the chip.

    pub opaque type SuggestionChip

# Values

## default_config

</>

    pub fn default_config() -> Config

default_config is the default configuration for this component.

## default_disabled

</>

    pub const default_disabled: Disabled

## default_disabled_interactive

</>

    pub const default_disabled_interactive: DisabledInteractive

## default_download

</>

    pub const default_download: option.Option(String)

## default_href

</>

    pub const default_href: String

## default_name

</>

    pub const default_name: String

## default_rel

</>

    pub const default_rel: String

## default_target

</>

    pub const default_target: option.Option(link_target.LinkTarget)

## default_type_

</>

    pub const default_type_: form_submitter_type.FormSubmitterType

## default_value

</>

    pub const default_value: String

## default_variant

</>

    pub const default_variant: chip_variant.ChipVariant

## disabled

</>

    pub fn disabled(
      record: SuggestionChip,
      disabled: Disabled,
    ) -> SuggestionChip

disabled sets the value of disabled for this SuggestionChip.

## disabled_interactive

</>

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

disabled_interactive sets the value of disabled_interactive for this SuggestionChip.

## download

</>

    pub fn download(
      record: SuggestionChip,
      download: option.Option(String),
    ) -> SuggestionChip

download sets the value of download for this SuggestionChip.

## from_config

</>

    pub fn from_config(config: Config) -> SuggestionChip

from_config creates a new SuggestionChip from the given configuration.

## href

</>

    pub fn href(
      record: SuggestionChip,
      href: String,
    ) -> SuggestionChip

href sets the value of href for this SuggestionChip.

## name

</>

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

name sets the value of name for this SuggestionChip.

## new

</>

    pub fn new() -> SuggestionChip

new creates a new SuggestionChip with the default configuration.

## rel

</>

    pub fn rel(record: SuggestionChip, rel: String) -> SuggestionChip

rel sets the value of rel for this SuggestionChip.

## render

</>

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

render creates a Lustre Element for a SuggestionChip

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

## slot

</>

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

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

## target

</>

    pub fn target(
      record: SuggestionChip,
      target: option.Option(link_target.LinkTarget),
    ) -> SuggestionChip

target sets the value of target for this SuggestionChip.

## type_

</>

    pub fn type_(
      record: SuggestionChip,
      type_: form_submitter_type.FormSubmitterType,
    ) -> SuggestionChip

type_ sets the value of type_ for this SuggestionChip.

## value

</>

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

value sets the value of value for this SuggestionChip.

## variant

</>

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

variant sets the value of variant for this SuggestionChip.

✨