m3e/slider_thumb

slider_thumb provides Lustre support for the M3E Slider Thumb component

Types

Config holds the configuration for a SliderThumb

pub type Config {
  Config(
    interaction: state.Interaction,
    name: option.Option(String),
    value: option.Option(Float),
  )
}

Constructors

SliderThumb provides Lustre support for the M3E Slider Thumb component

Fields:

  • interaction: Whether the element is enabled or disabled
  • name - The name that identifies the element when submitting the associated form
  • value - The value of the thumb
pub opaque type SliderThumb

Values

pub fn default_config() -> Config

default_config creates a new Config with default values

pub fn disabled(
  s: SliderThumb,
  interaction: state.Interaction,
) -> SliderThumb

disabled sets the interaction field

pub fn from_config(c: Config) -> SliderThumb

from_config creates a SliderThumb from a Config record

pub fn name(
  s: SliderThumb,
  name: option.Option(String),
) -> SliderThumb

name sets the name field

pub fn new() -> SliderThumb

new creates a new SliderThumb with default values

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

render creates a Lustre Element(msg) from a SliderThumb

Parameters:

  • s: a SliderThumb
  • attributes: additional attributes
pub fn render_config(
  config: Config,
  attributes: List(attribute.Attribute(msg)),
) -> element.Element(msg)

render_config creates a Lustre Element directly from a Config

pub fn value(
  s: SliderThumb,
  value: option.Option(Float),
) -> SliderThumb

value sets the value field

Search Document