Slider

The v-slider component is a better visualization of the number input. It is used for gathering numerical user data.

Utilização

Sliders reflect a range of values along a bar, from which users may select a single value. They are ideal for adjusting settings such as volume, brightness, or applying image filters.

API

v-slider
Nome
always-dirty New in — v1.1
Padrão
false
Tipos
boolean

Components.Sliders.

Nome
append-icon
Padrão
undefined
Tipos
string

Components.Sliders.

Nome
background-color
Padrão
undefined
Tipos
string

Components.Sliders.

Nome
color
Padrão
undefined
Tipos
string

Components.Sliders.

Nome
dark
Padrão
false
Tipos
boolean

Components.Sliders.

Nome
disabled
Padrão
false
Tipos
boolean

Components.Sliders.

Nome
error
Padrão
false
Tipos
boolean

Components.Sliders.

Nome
error-count
Padrão
1
Tipos
number | string

Components.Sliders.

Nome
error-messages
Padrão
[]
Tipos
string | array

Components.Sliders.

Nome
height
Padrão
undefined
Tipos
number | string

Define a altura do componente

Nome
hide-details
Padrão
false
Tipos
boolean

Components.Sliders.

Nome
hint
Padrão
undefined
Tipos
string

Components.Sliders.

Nome
inverse-label New in — v1.1
Padrão
false
Tipos
boolean

Components.Sliders.

Nome
label
Padrão
undefined
Tipos
string

Components.Sliders.

Nome
light
Padrão
false
Tipos
boolean

Components.Sliders.

Nome
loading
Padrão
false
Tipos
boolean | string

Components.Sliders.

Nome
max
Padrão
100
Tipos
number | string

Define a largura máxima

Nome
messages
Padrão
[]
Tipos
string | array

Components.Sliders.

Nome
min
Padrão
0
Tipos
number | string

Define a largura mínima

Nome
persistent-hint
Padrão
false
Tipos
boolean

Components.Sliders.

Nome
prepend-icon
Padrão
undefined
Tipos
string

Components.Sliders.

Nome
readonly
Padrão
false
Tipos
boolean

Components.Sliders.

Nome
rules
Padrão
[]
Tipos
array

Components.Sliders.

Nome
step
Padrão
1
Tipos
number | string

Components.Sliders.

Nome
success New in — v1.1
Padrão
false
Tipos
boolean

Components.Sliders.

Nome
success-messages New in — v1.1
Padrão
[]
Tipos
string | array

Components.Sliders.

Nome
thumb-color
Padrão
undefined
Tipos
string

Components.Sliders.

Nome
thumb-label
Padrão
undefined
Tipos
boolean | string

Components.Sliders.

Nome
thumb-size New in — v1.1
Padrão
32
Tipos
number | string

Components.Sliders.

Nome
tick-labels New in — v1.1
Padrão
[]
Tipos
array

Components.Sliders.

Nome
tick-size New in — v1.1
Padrão
1
Tipos
number | string

Components.Sliders.

Nome
ticks
Padrão
false
Tipos
boolean | string

Components.Sliders.

Nome
track-color
Padrão
undefined
Tipos
string

Components.Sliders.

Nome
validate-on-blur
Padrão
false
Tipos
boolean

Components.Sliders.

Nome
value
Padrão
undefined
Tipos
number | string

Controla visibilidade

Exemplos

Thumb

You can display a thumb-label while sliding or always. It It can have a custom color by setting thumb-color and a custom size with thumb-size. With always-dirty its color will never change, even when on min value.

Custom Range slider

Using the tick-labels prop along with a scoped slot, you can create a very customized solution.

Ticks

Tick marks represent predetermined values to which the user can move the slider.

Discrete

Discrete sliders offer a thumb label that displays the exact current amount. Using the step prop you can disallow selecting values outside of steps.

Icons

You can add icons to the slider with the append-icon and prepend-icon props. With @click:append and @click:prepend you can trigger a callback function when click the icon.

With an editable numeric value

Sliders can be combined with other components for a better display.

Custom colors

You can set the colors of the slider using the props color, track-color and thumb-color.

Validation

Vuetify includes simple validation through the rules prop. The prop accepts an array of callbacks. While validating rules, the current v-model value will be passed to the callback. This callback should return either true or a String, the error message.

Range

Range sliders.

Min & Max values

You can set min and max values of sliders.

Metronome

Use slotted prepend and append icons to easily customize the v-slider to fit any situation.

Edit this page | language on Github
Vuetify 3 is now available!The latest version of Vuetify is now available!
Learn about Vuetify 3's new features and functionality for modern Vue applications
Start exploringExplore