m3e/slider
Slider is allows for the selection of numeric values from a range.
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,
discrete: Discrete,
labelled: Labelled,
max: Float,
min: Float,
step: Float,
size: slider_size.SliderSize,
)
}
Constructors
-
Config( disabled: Disabled, discrete: Discrete, labelled: Labelled, max: Float, min: Float, step: Float, size: slider_size.SliderSize, )
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_size: slider_size.SliderSize
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 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.