[WIP] Add stepper input component#1719
[WIP] Add stepper input component#1719colinrotherham wants to merge 12 commits intocomponent-button-iconfrom
Conversation
|
This is awesome to see @colinrotherham! Some thoughts:
|
51816a9 to
5f7c97b
Compare
5f7c97b to
9a5e8dd
Compare
8effd08 to
712298d
Compare
9a5e8dd to
4db278c
Compare
031ffa6 to
5606c8d
Compare
4db278c to
21f77d7
Compare
|
Very cool and works well. Agree with the decision to centre the number in the input, to better relate to to both stepper buttons. Being able to use arrow keys is a nice touch, guessing that's just the underlying input type number though. Struggle to think of many use-cases for this though, don't think we have many services where you fill a basket of items. I suppose it helps in situations where the user is primarily using a mouse and can avoid breaking flow to use the keyboard? Or on touch devices where the keyboard is a little more unwieldy? |
5606c8d to
dfee34d
Compare
21f77d7 to
5ca77c0
Compare
|
There was a good article by Nielson Norman group about them. Agree the usages are limited. Besides the mouse/tablet only scenario, I'd see them as being most effective where users may need to make small adjustments to a value relative to a current value. You could speculate for NHS that might be adjusting dosages - 0, 25ml, 50ml, 75ml, etc. Or 'how many times a week do you do x' type surveys. Agreed it's probably not that common though! |
dfee34d to
16d706c
Compare
5ca77c0 to
109239e
Compare
16d706c to
660669f
Compare
109239e to
53e434b
Compare
53e434b to
2c5438a
Compare
660669f to
1946f3e
Compare
995132d to
c0cd997
Compare
c6f8831 to
821c059
Compare
fa979ec to
bae5e02
Compare
821c059 to
f91a4be
Compare
bae5e02 to
0f36d50
Compare
f91a4be to
ecf2fb4
Compare
|
|
A stepper in the wild: https://ukhsa-dashboard.data.gov.uk/cover/childhood-vaccinations
|
0f36d50 to
3cfc62b
Compare
ecf2fb4 to
399e9c4
Compare
3cfc62b to
f935d94
Compare
When min is set to 0 and the input is blank, then step up sets it to 1, not 0.
399e9c4 to
18bb0ee
Compare





Description
This PR adds a new stepper input component with +/- stepper buttons
It was built using prototype from @edwardhorsford and utilises:
To do: Add screen reader status announcements (see prototype code)
Checklist