Skip to content

Commit fab86d4

Browse files
authored
Update README.md
1 parent 96dc881 commit fab86d4

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

src/components/form-spinbutton/README.md

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
}
2727
</script>
2828

29-
<!-- b-spin-botton-demo.vue -->
29+
<!-- b-form-spinbotton-demo.vue -->
3030
```
3131

3232
## Overview
@@ -53,6 +53,26 @@ values allowed).
5353

5454
When `step` is set, the value will always be a multiple of the step size plus the minimum value.
5555

56+
## Number wrapping
57+
58+
By default, when the value is increased to the `max` value, it pressing the increment button will
59+
have no effect. Similarily when the value is as the `min` value, pressing the decrement button
60+
will ahve no effect.
61+
62+
To allow the spin button to wrap from max to min when incrementing (or min to max when decremening),
63+
set the `wrap` prop to `true`.
64+
65+
```html
66+
<template>
67+
<div>
68+
<label for="sb-wrap">Wrapping value spin button</label>
69+
<b-form-spinbutton id="sb-wrap" wrap min="1" max="25"></b-form-spinbutton>
70+
</div>
71+
</template>
72+
73+
<!-- b-form-spinbotton-wrap.vue -->
74+
```
75+
5676
## Styling
5777

5878
### Size
@@ -74,7 +94,7 @@ As with other form controls, `<b-form-spinbutton>` supports small and large sizi
7494
</div>
7595
</template>
7696

77-
<!-- b-spin-botton-size.vue -->
97+
<!-- b-form-spinbotton-size.vue -->
7898
```
7999

80100
### Inline
@@ -93,7 +113,7 @@ Spinbuttons can be oriented in vertical mode:
93113
</div>
94114
</template>
95115

96-
<!-- b-spin-botton-vertical.vue -->
116+
<!-- b-form-spinbotton-vertical.vue -->
97117
```
98118

99119
Vertical spinbuttons can also be sized.

0 commit comments

Comments
 (0)