Skip to content

Commit f12ee15

Browse files
committed
docs: Add Min / Max section into InputNumber
1 parent b5cd9cf commit f12ee15

File tree

1 file changed

+13
-1
lines changed
  • demo_markdown/docs/input_number

1 file changed

+13
-1
lines changed

demo_markdown/docs/input_number/mod.md

+13-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,16 @@ view! {
3232
}
3333
```
3434

35+
### Min / Max
36+
37+
```rust demo
38+
let value = create_rw_signal(0);
39+
40+
view! {
41+
<InputNumber value step=1 min=-1 max=2/>
42+
}
43+
```
44+
3545
### InputNumber Props
3646

3747
| Name | Type | Default | Description |
@@ -43,10 +53,12 @@ view! {
4353
| disabled | `MaybeSignal<bool>` | `false` | Whether the input is disabled. |
4454
| invalid | `MaybeSignal<bool>` | `false` | Whether the input is invalid. |
4555
| attr: | `Vec<(&'static str, Attribute)>` | `Default::default()` | The dom attrs of the input element inside the component. |
56+
| min | `MaybeSignal<T>` | `T::min_value()` | The minimum number that the input value can take. |
57+
| max | `MaybeSignal<T>` | `T::max_value()` | The max number that the input value can take. |
4658

4759
#### T impl
4860

49-
`T: Add<Output = T> + Sub<Output = T> + Default + Clone + FromStr + ToString + 'static`
61+
`T: Add<Output = T> + Sub<Output = T> + PartialOrd + num_traits::Bounded + Default + Clone + FromStr + ToString + 'static`
5062

5163
### InputNumber Ref
5264

0 commit comments

Comments
 (0)