mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-07-07 22:18:39 +00:00
25 lines
561 B
Plaintext
25 lines
561 B
Plaintext
---
|
|
title: April 2026 - Pointer Cursor
|
|
description: Add cursor pointer behavior for buttons during project setup.
|
|
date: 2026-04-25
|
|
---
|
|
|
|
You can now enable `cursor: pointer` for buttons when initializing a project.
|
|
|
|
```bash
|
|
npx shadcn@latest init --pointer
|
|
```
|
|
|
|
This adds the following CSS to your global CSS file:
|
|
|
|
```css title="globals.css"
|
|
@layer base {
|
|
button:not(:disabled),
|
|
[role="button"]:not(:disabled) {
|
|
cursor: pointer;
|
|
}
|
|
}
|
|
```
|
|
|
|
The `--pointer` option is not part of preset codes. It is applied as a project setup option, similar to `--rtl`.
|