Skip to content

fix: add cursor-pointer to button in Tailwind v4#10400

Closed
SAY-5 wants to merge 1 commit intoshadcn-ui:mainfrom
SAY-5:fix/button-cursor-pointer-tailwind-v4
Closed

fix: add cursor-pointer to button in Tailwind v4#10400
SAY-5 wants to merge 1 commit intoshadcn-ui:mainfrom
SAY-5:fix/button-cursor-pointer-tailwind-v4

Conversation

@SAY-5
Copy link
Copy Markdown

@SAY-5 SAY-5 commented Apr 15, 2026

Tailwind v4 dropped the preflight rule that previously set cursor: pointer on button elements, so shadcn buttons no longer show a pointer cursor when hovered. This is the root cause of the issue reported in #6843.

The fix adds cursor-pointer to:

  • apps/v4/registry/new-york-v4/ui/button.tsx — added to the base cva class string
  • apps/v4/registry/styles/style-luma.css — added to .cn-button @apply
  • apps/v4/registry/styles/style-vega.css — same
  • apps/v4/registry/styles/style-nova.css — same
  • apps/v4/registry/styles/style-lyra.css — same
  • apps/v4/registry/styles/style-maia.css — same
  • apps/v4/registry/styles/style-mira.css — same

The disabled:pointer-events-none that was already present means disabled buttons won't receive the pointer cursor, so no additional guard is needed.

Closes #6843

Tailwind v4 removed the preflight rule that set cursor: pointer on
button elements, so buttons no longer show a pointer cursor on hover.

Added cursor-pointer to the new-york-v4 button component's base
className and to the .cn-button class in all six theme style sheets
(luma, vega, nova, lyra, maia, mira). This restores the expected
pointer cursor behavior across all button variants and styles.

Fixes shadcn-ui#6843
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 15, 2026

@SAY-5 is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

@shadcn
Copy link
Copy Markdown
Collaborator

shadcn commented Apr 20, 2026

@shadcn shadcn closed this Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug]: Cursor pointer not working when hovering on button in Tailwind v4

2 participants