Slider
El componente v-slider
es una mejor visualización para el input de números. Se utiliza para recolectar datos numéricos del usuario.
Uso
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
Components.Sliders.
Components.Sliders.
Components.Sliders.
Aplica el color especificado al control.
Aplica la variante del tema dark
Components.Sliders.
Pone el input en un estado de error manual
Components.Sliders.
Pone el input en un estado de error y pasa los mensajes de error personalizados. Se combinará con cualquier validación que ocurra desde la prop rules. Este campo no propicia ninguna validación.
Configura la altura del componente
Components.Sliders.
Components.Sliders.
Components.Sliders.
Components.Sliders.
Aplica la variante del tema light
Components.Sliders.
Configura el ancho máximo
Components.Sliders.
Configura el ancho mínimo
Components.Sliders.
Components.Sliders.
Components.Sliders.
Arreglo de funciones que regresa ya sea True o un String con el mensaje de error
Si es mayor que 0, configura los tamaños de intervalos para los pasos.
Components.Sliders.
Components.Sliders.
Configura la etiqueta y su color
Mostrar el marcador
Components.Sliders.
Components.Sliders.
Components.Sliders.
Components.Sliders.
Configura el color de la barra
Retrasa la validación hasta el evento blur
Controla la visibilidad
Ejemplos
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.