Range
Quasar Range is a great way to make the user specify a Number value between an interval, with optional steps between valid values.
Also check its “sibling”, the Double Range component.
Basic Usage
|
Error State
Add has-error
CSS class:
Vue Properties
Vue Property | Type | Description |
---|---|---|
min | Number | Minimum value of the model |
max | Number | Maximum value of the model |
label | Boolean | Popup a label when user clicks/taps on the Range |
labelAlways | Boolean | Always display the label |
step | Number | Specify step amount between valid values |
snap | Boolean | Range handler will snap on values, rather than walking freely; good to use along step ; also displays step markers on the Range |
markers | Boolean | Display markers on background, one for each possible value for the model. |
disable | Boolean | When true user cannot change model value. |
Example with step
, label
and snap
:
IMPORTANT
Make sure you choose themin
,max
andstep
value correctly.step
must be a divisor ofmax - min
, otherwise it might mess things up. This is because all valid steps must be able to hold an equal position within themin
-max
interval.
Vue Events
Vue Event | Description |
---|---|
@input | Triggered on model value change with the new value. |
Coloring
Use one of the Quasar colors from the Color Palette, like primary
, secondary
, orange
, teal
as CSS class:
Inside of a List Usage
|