shadcn-vue icon indicating copy to clipboard operation
shadcn-vue copied to clipboard

feat(slider): add pointer cursor to slider track and thumb

Open xon52 opened this issue 1 month ago โ€ข 4 comments

๐Ÿ”— 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-pointer to SliderTrack component in all styles
  • Added cursor-pointer to SliderThumb component 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.vue
  • apps/www/src/registry/new-york/ui/slider/Slider.vue
  • apps/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.

xon52 avatar Oct 11 '25 23:10 xon52

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

sadeghbarati avatar Oct 12 '25 05:10 sadeghbarati

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.

xon52 avatar Oct 12 '25 08:10 xon52

Yes we need to match the main shadcn ui

sadeghbarati avatar Oct 12 '25 09:10 sadeghbarati

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.

xon52 avatar Oct 14 '25 11:10 xon52