Skip to content
On this page

Slider

A slider to select a value or range from a given range

Base

Show code

Customize

Show code

Tick and label

3
5
8
Off
Low
High
Auto
Show code

Range

Show code

Class props


1
2
3
4
5
6
7
8
9
How does Class props inspector work?
Class propDescriptionPropsSuffixes
disabledClassClass when slider is disabled.disabled
fillClassClass of the filled part of the slider.
rootClassRoot class of the element.
thumbClassClass of the thumb.
thumbDraggingClassClass when the thumb gets dragged.
👉 Drag the thumb to see it in action!
thumbRoundedClassClass when the slider is rounded.rounded
thumbWrapperClassClass of the thumb wrapper.
tickClassClass of slider tick.ticks
tickHiddenClassClass when slider tick is hidden.ticks
tickLabelClassClass of tick label.ticks
trackClassClass of the slider track.
variantClassClass of the slider variant.variantprimary
info
warning
danger


Props

Prop nameDescriptionTypeValuesDefault
ariaLabelstring|array-
biggerSliderFocusIncreases slider size on focusboolean-false
customFormatterFunction to format the tooltip label for displayfunc-
disabledboolean-false
formatstring-'raw'
indicatorboolean-false
lazyUpdate v-model only when dragging is finishedboolean-false
localestring|array-
From config

{
   locale: undefined
}
maxMaximum valuenumber-100
minMinimum valuenumber-0
overrideboolean-
roundedRounded thumbboolean-
From config

slider: {
  rounded: false
}
sizeVertical size of slider, optionalstringsmall, medium, large
stepStep interval of ticksnumber-1
ticksShow tick marksboolean-false
tooltipShow tooltip when thumb is being draggedboolean-
From config

slider: {
  tooltip: true
}
tooltipAlwaysTooltip displays alwaysboolean-false
tooltipVariantColor of the tooltipstringprimary, info, success, warning, danger, and any other custom color
v-modelnumber|array-0
variantColor of the sliderstringprimary, info, success, warning, danger, and any other custom color

Events

Event namePropertiesDescription
update:modelValue
change
dragging
dragstart
dragend

Slots

NameDescriptionBindings
default

Slider Tick

Props

Prop nameDescriptionTypeValuesDefault
overrideboolean-
valueValue of single ticknumber-0

Slots

NameDescriptionBindings
default

Style

📄 Full scss file

CSS VariableSASS VariableDefault
--oruga-slider-background$slider-backgroundtransparent
--oruga-slider-margin$slider-margin1em 0
--oruga-slider-mark-size$slider-mark-size0.75rem
--oruga-slider-font-size$slider-font-size$base-font-size
--oruga-slider-rounded-borded-radius$slider-rounded-borded-radius$base-rounded-border-radius
--oruga-slider-thumb-background$slider-thumb-background$white
--oruga-slider-thumb-border$slider-thumb-border1px solid $grey-light
--oruga-slider-thumb-radius$slider-thumb-radius$base-border-radius
--oruga-slider-thumb-shadow$slider-thumb-shadownone
--oruga-slider-thumb-to-track-ratio$slider-thumb-to-track-ratio2
--oruga-slider-thumb-transform$slider-thumb-transformscale(1.25)
--oruga-slider-tick-background$slider-tick-background$primary
--oruga-slider-tick-radius$slider-tick-radius$base-border-radius
--oruga-slider-tick-to-track-ratio$slider-tick-to-track-ratio0.5
--oruga-slider-tick-width$slider-tick-width3px
--oruga-slider-track-background$slider-track-background$grey-lighter
--oruga-slider-fill-background$slider-fill-background$primary
--oruga-slider-track-border-radius$slider-track-border-radius$base-border-radius
--oruga-slider-track-border$slider-track-border0px solid $grey
--oruga-slider-track-disabled$slider-track-disabled0.5
--oruga-slider-track-radius$slider-track-radius$base-border-radius
--oruga-slider-track-shadow$slider-track-shadow0px 0px 0px $grey

Released under the MIT License.