2024-05-22 17:28:20 +08:00
|
|
|
# SpinButton
|
|
|
|
|
|
|
|
```rust demo
|
|
|
|
let value = RwSignal::new(0);
|
|
|
|
let value_f64 = RwSignal::new(0.0);
|
|
|
|
|
|
|
|
view! {
|
|
|
|
<Space vertical=true>
|
|
|
|
<SpinButton value step_page=1/>
|
2024-05-22 23:17:27 +08:00
|
|
|
<SpinButton value=value_f64 step_page=1.2/>
|
2024-05-22 17:28:20 +08:00
|
|
|
</Space>
|
|
|
|
}
|
2024-05-22 23:17:27 +08:00
|
|
|
```
|
|
|
|
|
|
|
|
### Min / Max
|
|
|
|
|
|
|
|
```rust demo
|
|
|
|
let value = RwSignal::new(0);
|
|
|
|
|
|
|
|
view! {
|
|
|
|
<SpinButton value step_page=1 min=-1 max=2/>
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### Disabled
|
|
|
|
|
|
|
|
```rust demo
|
|
|
|
let value = RwSignal::new(0);
|
|
|
|
|
|
|
|
view! {
|
|
|
|
<SpinButton value step_page=1 disabled=true/>
|
|
|
|
}
|
2024-05-22 17:28:20 +08:00
|
|
|
```
|