mirror of
https://github.com/adoyle0/thaw.git
synced 2025-01-23 14:29:22 -05:00
1.7 KiB
1.7 KiB
Slider
let value = RwSignal::new(0.0);
view! {
<Slider value/>
}
Step
let value = RwSignal::new(0.0);
view! {
<Slider step=25.0 value/>
}
Slider Label
let value = RwSignal::new(0.0);
view! {
<Slider value max=10.0 step=5.0>
<SliderLabel value=0.0>
"0"
</SliderLabel>
<SliderLabel value=5.0>
"5"
</SliderLabel>
<SliderLabel value=10.0>
"10"
</SliderLabel>
</Slider>
}
Slider Props
Name | Type | Default | Description |
---|---|---|---|
class | OptionalProp<MaybeSignal<String>> |
Default::default() |
Addtional classes for the slider element. |
value | MaybeSignal<f64> |
Default::default() |
Value of the slider. |
max | MaybeSignal<f64> |
100 |
Max value of the slider. |
step | MaybeSignal<f64> |
Default::default() |
The step in which value is incremented. |
children | Option<Children> |
None |
Slider's content. |
SliderLabel props
Name | Type | Default | Description |
---|---|---|---|
value | MaybeSignal<f64> |
Value at which label will be placed. | |
children | Children |
Content of the lable. |