m3e/slider

Slider is allows for the selection of numeric values from a range.

This file was generated by m3e/generator

     DO NOT EDIT

Types

Config is a public record for configuring this component.

pub type Config {
  Config(
    disabled: Disabled,
    discrete: Discrete,
    labelled: Labelled,
    max: Float,
    min: Float,
    step: Float,
    size: slider_size.SliderSize,
  )
}

Constructors

Disabled is whether the element is disabled.

pub type Disabled {
  IsDisabled
  IsNotDisabled
}

Constructors

  • IsDisabled
  • IsNotDisabled

Discrete is whether to show tick marks.

pub type Discrete {
  IsDiscrete
  IsNotDiscrete
}

Constructors

  • IsDiscrete
  • IsNotDiscrete

Labelled is whether to show value labels when activated.

pub type Labelled {
  IsLabelled
  IsNotLabelled
}

Constructors

  • IsLabelled
  • IsNotLabelled

Slider is a View Model for this component

Fields:

  • disabled: Whether the element is disabled.
  • discrete: Whether to show tick marks.
  • labelled: Whether to show value labels when activated.
  • max: The maximum allowable value.
  • min: The minimum allowable value.
  • step: The value at which the thumb will snap.
  • size: The size of the slider.
pub opaque type Slider

Values

pub fn default_config() -> Config

default_config is the default configuration for this component.

pub const default_disabled: Disabled
pub const default_discrete: Discrete
pub const default_labelled: Labelled
pub const default_max: Float
pub const default_min: Float
pub const default_step: Float
pub fn disabled(record: Slider, disabled: Disabled) -> Slider

disabled sets the value of disabled for this Slider.

pub fn discrete(record: Slider, discrete: Discrete) -> Slider

discrete sets the value of discrete for this Slider.

pub fn from_config(config: Config) -> Slider

from_config creates a new Slider from the given configuration.

pub fn labelled(record: Slider, labelled: Labelled) -> Slider

labelled sets the value of labelled for this Slider.

pub fn max(record: Slider, max: Float) -> Slider

max sets the value of max for this Slider.

pub fn min(record: Slider, min: Float) -> Slider

min sets the value of min for this Slider.

pub fn new() -> Slider

new creates a new Slider with the default configuration.

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

render creates a Lustre Element for a Slider

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

pub fn size(
  record: Slider,
  size: slider_size.SliderSize,
) -> Slider

size sets the value of size for this Slider.

pub fn step(record: Slider, step: Float) -> Slider

step sets the value of step for this Slider.

Search Document