You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .cursor/rules/heroui.mdc
+7-5Lines changed: 7 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,21 @@
1
1
---
2
-
description: Enforce HeroUI usage for all UI components, styling, and theming.
2
+
description: Enforce HeroUI usage for all UI components, styling, and theming using Bun.
3
3
globs: **/*.{ts,tsx,js,jsx}
4
4
---
5
5
6
6
# HeroUI Usage Rules
7
7
8
8
## Core Principle
9
9
- Use **HeroUI** (formerly NextUI) for ALL UI components, layout, and styling where possible.
10
-
- Avoid using raw Radix UI primitives unless HeroUI does not provide a suitable component. HeroUI is already built on top of `react-aria` and `framer-motion`, so additional headless libraries are rarely needed.
10
+
- Avoid using raw Radix UI primitives unless HeroUI does not provide a suitable component. HeroUI is already built on top of `react-aria` and `framer-motion`.
11
11
12
12
## Installation & Management
13
-
- **CLI**: Use the HeroUI CLI to add new components.
13
+
- **Package Manager**: Always use **Bun** for installation and script execution.
14
+
- **CLI**: Use `bun` to interact with the HeroUI CLI.
14
15
```bash
15
-
npx heroui-cli@latest add <component-name>
16
+
bunx heroui-cli@latest add <component-name>
16
17
```
18
+
- **Tip**: Ensure a `bun.lock` file exists in your project root (run `bun install` once). The CLI relies on this file to auto-detect Bun and skip the "Which package manager?" prompt.
17
19
- Do not manually install component packages unless necessary.
18
20
19
21
## Setup & Providers
@@ -40,7 +42,7 @@ export function Providers({ children }: { children: React.ReactNode }) {
40
42
```
41
43
42
44
## Styling & Theming
43
-
- **Tailwind CSS**: HeroUI relies on Tailwind CSS. Ensure `tailwind.config.ts` (or `.js`) is configured with the `heroui()` plugin.
45
+
- **Tailwind CSS**: HeroUI relies on Tailwind CSS. Ensure `tailwind.config.ts` is configured with the `heroui()` plugin.
44
46
- **Customization**: Customize themes (colors, layout, radii) inside the `heroui()` plugin configuration in `tailwind.config.ts`.
45
47
- Define custom color palettes (semantic colors like `primary`, `secondary`, `success`, etc.).
46
48
- Create custom variants using `tv` (Tailwind Variants) if needed for specific component overrides.
0 commit comments