Skip to content

Conversation

@brandonpham13
Copy link

Updated Slider.json documentation to reflect new behavior.
Modified VSliderThumb component to show label on hover and adjusted prop validation for thumbLabel.

fixes #19167

Markup:

<template> <v-app> <v-container class="pa-8"> <h1 class="text-h4 mb-4">Slider Thumb Label Hover Demo</h1> <p class="text-body-1 mb-6"> Hover over the slider thumbs to see their values. </p> <div class="mb-6"> <v-label class="mb-2">Volume</v-label> <v-slider v-model="volume" min="0" max="100" thumb-label="hover" /> </div> <div class="mb-6"> <v-label class="mb-2">Brightness</v-label> <v-slider v-model="brightness" min="0" max="100" thumb-label="hover" /> </div> <div class="mb-6"> <v-label class="mb-2">Contrast</v-label> <v-slider v-model="contrast" min="0" max="100" thumb-label="hover" /> </div> <div class="mb-6"> <v-label class="mb-2">Saturation</v-label> <v-slider v-model="saturation" min="0" max="100" thumb-label="hover" /> </div> </v-container> </v-app> </template> <script> export default {  name: 'SliderHoverDemo',  data: () => ({  volume: 75,  brightness: 60,  contrast: 80,  saturation: 40,  }), } </script>
…pdated Slider.json documentation to reflect new behavior. Modified VSliderThumb component to show label on hover and adjusted prop validation for thumbLabel.
@J-Sek
Copy link
Contributor

J-Sek commented Dec 6, 2025

It is a feature, not a fix, right? Could you change target to dev instead of master and rebase if necessary?

v-show={ (thumbLabel.value && props.focused) || thumbLabel.value === 'always' }
v-show={
thumbLabel.value === 'always' ||
(thumbLabel.value === true && props.focused) ||
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should still show on focus too with thumbLabel="hover"

indexFromEnd,
} = slider

const isHovered = ref(false)
Copy link
Member

@KaelWD KaelWD Dec 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use shallowRef for primitives

@KaelWD KaelWD changed the title fix(VSlider): show thumb slider value on hover feat(VSlider): show thumb slider value on hover Dec 9, 2025
@KaelWD KaelWD changed the base branch from master to dev December 9, 2025 08:05
@KaelWD KaelWD added this to the v3.12.0 milestone Dec 9, 2025
@KaelWD KaelWD added T: enhancement Functionality that enhances existing features C: VSlider labels Dec 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C: VSlider T: enhancement Functionality that enhances existing features

3 participants