docs: button cursor

This commit is contained in:
shadcn
2025-10-13 12:38:58 +04:00
parent d198908510
commit dcfe911b33

View File

@@ -71,7 +71,20 @@ import { Button } from "@/components/ui/button"
<Button variant="outline">Button</Button>
```
---
## Cursor
Tailwind v4 [switched](https://tailwindcss.com/docs/upgrade-guide#buttons-use-the-default-cursor) from `cursor: pointer` to `cursor: default` for the button component.
If you want to keep the `cursor: pointer` behavior, add the following code to your CSS file:
```css showLineNumbers title="globals.css"
@layer base {
button:not(:disabled),
[role="button"]:not(:disabled) {
cursor: pointer;
}
}
```
## Examples