Module zng::slider

source ·
Expand description

Slider widget, styles and properties.

This widget allows selecting a value or range by dragging a selector thumb over a range line.

let value = var(0u8);
zng::slider::Slider! {
    // declare slider with single thumb
    selector = zng::slider::Selector::value(value.clone(), 0, 100);
    // show selected value
    zng::container::child_out_bottom = Text!(value.map_debug()), 5;
}

The example above creates a a slider with a single thumb that selects a u8 value in the 0..=100 range. The Selector type also supports creating multiple thumbs and custom range conversions.

§Full API

See zng_wgt_slider for the full widget API.

Modules§

  • Slider thumb widget, styles and properties.

Structs§

  • W Default slider style.
  • Defines the values and ranges selected by a slider.
  • W Value selector from a range of values.
  • W Slider track container widget.
  • Arguments for a slider thumb widget generator.

Enums§

Statics§

Traits§