shadcn-vue
shadcn-vue copied to clipboard
feat(slider): add pointer cursor to slider track and thumb
๐ Linked issue
โ Type of change
- [ ] ๐ Documentation (updates to the documentation, readme or JSdoc annotations)
- [ ] ๐ Bug fix (a non-breaking change that fixes an issue)
- [x] ๐ Enhancement (improving an existing functionality like performance)
- [ ] โจ New feature (a non-breaking change that adds functionality)
- [ ] ๐งน Chore (updates to the build process or auxiliary tools and libraries)
- [ ] โ ๏ธ Breaking change (fix or feature that would cause existing functionality to change)
๐ Description
Adds cursor-pointer class to the slider component to improve UX by visually indicating that both the slider track and thumb are interactive elements.
Changes:
- Added
cursor-pointertoSliderTrackcomponent in all styles - Added
cursor-pointertoSliderThumbcomponent in all styles - Updated registry for both default and new-york styles
- Updated v4 registry
Files Modified:
apps/www/src/registry/default/ui/slider/Slider.vueapps/www/src/registry/new-york/ui/slider/Slider.vueapps/v4/registry/new-york-v4/ui/slider/Slider.vue
๐ธ Screenshots (if appropriate)
https://github.com/user-attachments/assets/a16c6eba-5fa8-4e1d-be2c-8f9f1e8f011e
๐ Checklist
- [ ] I have linked an issue or discussion.
- [ ] I have updated the documentation accordingly.
V4 registry of main shadcn ui: https://ui.shadcn.com/docs/components/slider
V3 Registry (legacy docs): https://v3.shadcn.com/docs/components/slider
Both slider track cursor is default
Thanks for taking a look @sadeghbarati . I'm not sure what you are saying? Must shadcn-vue stay matched with shadcn? Or are you just making a comment?
It may be more controversial than I thought. I felt it was an obvious ui oversight. When using it without a cursor it is easy to miss it when you click as you cannot see when your cursor is on the right spot.
Yes we need to match the main shadcn ui
I raised a corresponding change with shadcn ui: https://github.com/shadcn-ui/ui/pull/8437
Looking at their backlog of PR's I don't have high hopes, but I'll keep an eye on it for as long as this PR is left open.