m3e/selection_indicator

SelectionIndicator is provides selection, focus, and hover state layer treatment for an interactive element that supports selection.

This file was generated by m3e/generator

     DO NOT EDIT

Types

Bounce is whether the indicator presents a bounce animation when selected.

pub type Bounce {
  IsBounce
  IsNotBounce
}

Constructors

  • IsBounce
  • IsNotBounce

Centered is whether the selection animation always originates from the center of the element’s bounds, rather than originating from the location of the click event.

pub type Centered {
  IsCentered
  IsNotCentered
}

Constructors

  • IsCentered
  • IsNotCentered

Config is a public record for configuring this component.

pub type Config {
  Config(
    bounce: Bounce,
    centered: Centered,
    disabled: Disabled,
    selected: Selected,
    for: option.Option(String),
  )
}

Constructors

Disabled is whether hover and focus events will not trigger the indicator’s state layer. State layers can still be controlled manually using the show and hide methods.

pub type Disabled {
  IsDisabled
  IsNotDisabled
}

Constructors

  • IsDisabled
  • IsNotDisabled

Selected is whether the indicator is selected.

pub type Selected {
  IsSelected
  IsNotSelected
}

Constructors

  • IsSelected
  • IsNotSelected

SelectionIndicator is a View Model for this component

Fields:

  • bounce: Whether the indicator presents a bounce animation when selected.
  • centered: Whether the selection animation always originates from the center of the element’s bounds, rather than originating from the location of the click event.
  • disabled: Whether hover and focus events will not trigger the indicator’s state layer. State layers can still be controlled manually using the show and hide methods.
  • selected: Whether the indicator is selected.
  • for: The identifier of the interactive control to which this element is attached.
pub opaque type SelectionIndicator

Values

pub fn bounce(
  record: SelectionIndicator,
  bounce: Bounce,
) -> SelectionIndicator

bounce sets the value of bounce for this SelectionIndicator.

pub fn centered(
  record: SelectionIndicator,
  centered: Centered,
) -> SelectionIndicator

centered sets the value of centered for this SelectionIndicator.

pub const default_bounce: Bounce
pub const default_centered: Centered
pub fn default_config() -> Config

default_config is the default configuration for this component.

pub const default_disabled: Disabled
pub const default_for: option.Option(String)
pub const default_selected: Selected
pub fn disabled(
  record: SelectionIndicator,
  disabled: Disabled,
) -> SelectionIndicator

disabled sets the value of disabled for this SelectionIndicator.

pub fn for(
  record: SelectionIndicator,
  for: option.Option(String),
) -> SelectionIndicator

for sets the value of for for this SelectionIndicator.

pub fn from_config(config: Config) -> SelectionIndicator

from_config creates a new SelectionIndicator from the given configuration.

pub fn new() -> SelectionIndicator

new creates a new SelectionIndicator with the default configuration.

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

render creates a Lustre Element for a SelectionIndicator

pub fn render_config(
  c: Config,
  attributes: List(attribute.Attribute(msg)),
) -> element.Element(msg)

render_config creates a Lustre Element from a SelectionIndicator Config

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

selected sets the value of selected for this SelectionIndicator.

Search Document