pub struct SliderProps {Show 16 fields
pub value: Option<SliderValue>,
pub default_value: Option<SliderValue>,
pub range: bool,
pub min: f64,
pub max: f64,
pub step: Option<f64>,
pub precision: Option<u32>,
pub reverse: bool,
pub vertical: bool,
pub disabled: bool,
pub dots: bool,
pub marks: Option<Vec<SliderMark>>,
pub class: Option<String>,
pub style: Option<String>,
pub on_change: Option<EventHandler<SliderValue>>,
pub on_change_complete: Option<EventHandler<SliderValue>>,
}Expand description
Slider component supporting single and range values.
Fields§
§value: Option<SliderValue>Controlled value; use Range(_, _) when range = true.
default_value: Option<SliderValue>Default value in uncontrolled mode.
range: boolWhether to render two handles.
min: f64§max: f64§step: Option<f64>Step granularity; when None the slider is continuous.
precision: Option<u32>Decimal precision used for snapping.
reverse: boolReverse the visual direction (RTL or top-down).
vertical: boolVertical orientation.
disabled: boolDisable interactions.
dots: boolRender tick dots for marks.
marks: Option<Vec<SliderMark>>Optional labeled marks along the track.
class: Option<String>§style: Option<String>§on_change: Option<EventHandler<SliderValue>>Fired on every value change (drag/keyboard/track click).
on_change_complete: Option<EventHandler<SliderValue>>Fired when user finishes interaction (pointer up / Enter / blur).
Implementations§
Source§impl SliderProps
impl SliderProps
Sourcepub fn builder() -> SliderPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> SliderPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building SliderProps.
On the builder, call .value(...)(optional), .default_value(...)(optional), .range(...)(optional), .min(...)(optional), .max(...)(optional), .step(...)(optional), .precision(...)(optional), .reverse(...)(optional), .vertical(...)(optional), .disabled(...)(optional), .dots(...)(optional), .marks(...)(optional), .class(...)(optional), .style(...)(optional), .on_change(...)(optional), .on_change_complete(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of SliderProps.
Trait Implementations§
Source§impl Clone for SliderProps
impl Clone for SliderProps
Source§fn clone(&self) -> SliderProps
fn clone(&self) -> SliderProps
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more