Closed id2359 closed 5 years ago
Figure: Initial State Figure: value selected Figure: value selected Figure: Step size 0.25
API Name: rc-slider Slider UI Component for React Supports IE9, IE9+, Chrome, Firefox & Safari
Some of the key properties:
name | type | default | description |
---|---|---|---|
min | number | 0 | the minimum value of the slider |
max | number | 100 | the maximum value of the slider |
marks | object{number: string} or object {number:{ style, label }} | {} | Mark on the slider. The key determines the position, and the value determines what will show. If you want to set the style of a specific mark point, the value should be an object which contains style and label properties. |
step | number or null | 1 | Value to be added or subtracted on each step the slider makes. Must be greater than zero. max - min should be evenly divisible by the step value. support decimal value |
range | boolean | false | Determines the type of slider. If range is true , two handles will be rendered in order to select a range. |
vertical | boolean | false | If vertical is true , the slider will be vertical. |
value | number or [number, number] | set current positions of handles. If range isfalse , the type of defaultValue should be number . Otherwise, [number, number] |
|
dot | boolean | false | When the step value is greater than 1, you can set the dots to true if you want to render the slider with dots. |
What is achievable: To make the slider look and feel like EQ5D, we can mark the slider with values which is configurable (within the code) and therefore the slider can have marks 0, 10, 20, 30, 40 and so on. Here is a screen shot -
Include information ( text) as comment to this ticket detailing exact behaviour of the control.