@jini-ai/agent-plugins 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +57 -0
- package/LICENSE +201 -0
- package/README.md +261 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +2 -0
- package/dist/lifecycle/activation.d.ts +177 -0
- package/dist/lifecycle/activation.js +874 -0
- package/dist/lifecycle/bundled-digests.d.ts +27 -0
- package/dist/lifecycle/bundled-digests.js +149 -0
- package/dist/lifecycle/bundled-source-archive.d.ts +13 -0
- package/dist/lifecycle/bundled-source-archive.js +96 -0
- package/dist/lifecycle/capability-projection.d.ts +11 -0
- package/dist/lifecycle/capability-projection.js +60 -0
- package/dist/lifecycle/fetch-archive.d.ts +88 -0
- package/dist/lifecycle/fetch-archive.js +215 -0
- package/dist/lifecycle/index.d.ts +174 -0
- package/dist/lifecycle/index.js +94 -0
- package/dist/lifecycle/install-from-url.d.ts +78 -0
- package/dist/lifecycle/install-from-url.js +73 -0
- package/dist/lifecycle/install.d.ts +52 -0
- package/dist/lifecycle/install.js +286 -0
- package/dist/lifecycle/layout.d.ts +20 -0
- package/dist/lifecycle/layout.js +30 -0
- package/dist/lifecycle/manifest.d.ts +214 -0
- package/dist/lifecycle/manifest.js +409 -0
- package/dist/lifecycle/mcp-provisioning.d.ts +20 -0
- package/dist/lifecycle/mcp-provisioning.js +14 -0
- package/dist/lifecycle/node.d.ts +11 -0
- package/dist/lifecycle/node.js +34 -0
- package/dist/lifecycle/package-paths.d.ts +12 -0
- package/dist/lifecycle/package-paths.js +74 -0
- package/dist/lifecycle/ports.d.ts +81 -0
- package/dist/lifecycle/ports.js +2 -0
- package/dist/lifecycle/resolve-agent-plugin-refs.d.ts +18 -0
- package/dist/lifecycle/resolve-agent-plugin-refs.js +143 -0
- package/dist/lifecycle/retire-bundled.d.ts +36 -0
- package/dist/lifecycle/retire-bundled.js +69 -0
- package/dist/lifecycle/search.d.ts +23 -0
- package/dist/lifecycle/search.js +50 -0
- package/dist/lifecycle/seed-bundled.d.ts +29 -0
- package/dist/lifecycle/seed-bundled.js +118 -0
- package/dist/lifecycle/set-enabled.d.ts +21 -0
- package/dist/lifecycle/set-enabled.js +39 -0
- package/dist/lifecycle/trusted-plugin-files.d.ts +29 -0
- package/dist/lifecycle/trusted-plugin-files.js +82 -0
- package/dist/lifecycle/types.d.ts +20 -0
- package/dist/lifecycle/types.js +2 -0
- package/dist/lifecycle/uninstall.d.ts +41 -0
- package/dist/lifecycle/uninstall.js +148 -0
- package/dist/lifecycle/yauzl-archive-reader.d.ts +62 -0
- package/dist/lifecycle/yauzl-archive-reader.js +73 -0
- package/dist/manifest.d.ts +68 -0
- package/dist/manifest.js +38 -0
- package/package.json +92 -0
- package/ui-ux-design/com.anthropic.claude-code/hooks/hooks.json +4 -0
- package/ui-ux-design/mcp.json +4 -0
- package/ui-ux-design/plugin.json +5 -0
- package/ui-ux-design/skills/frontend-accessibility/SKILL.md +60 -0
- package/ui-ux-design/skills/gstack-design/SKILL.md +53 -0
- package/ui-ux-design/skills/gstack-design/references/consultation.md +30 -0
- package/ui-ux-design/skills/gstack-design/references/html.md +29 -0
- package/ui-ux-design/skills/gstack-design/references/review.md +28 -0
- package/ui-ux-design/skills/gstack-design/references/shotgun.md +33 -0
- package/ui-ux-design/skills/gstack-design/references/upstream-notes.md +23 -0
- package/ui-ux-design/skills/interface-design/ORIGINAL.md +16 -0
- package/ui-ux-design/skills/interface-design/SKILL.md +41 -0
- package/ui-ux-design/skills/interface-design/references/commands/audit.md +40 -0
- package/ui-ux-design/skills/interface-design/references/commands/critique.md +21 -0
- package/ui-ux-design/skills/interface-design/references/commands/extract.md +34 -0
- package/ui-ux-design/skills/interface-design/references/commands/init.md +31 -0
- package/ui-ux-design/skills/interface-design/references/commands/status.md +22 -0
- package/ui-ux-design/skills/interface-design/references/examples/system-precision.md +29 -0
- package/ui-ux-design/skills/interface-design/references/examples/system-warmth.md +29 -0
- package/ui-ux-design/skills/interface-design/references/system-template.md +57 -0
- package/ui-ux-design/skills/shadcn-ui/README.md +244 -0
- package/ui-ux-design/skills/shadcn-ui/SKILL.md +326 -0
- package/ui-ux-design/skills/shadcn-ui/examples/auth-layout.tsx +177 -0
- package/ui-ux-design/skills/shadcn-ui/examples/data-table.tsx +313 -0
- package/ui-ux-design/skills/shadcn-ui/examples/form-pattern.tsx +177 -0
- package/ui-ux-design/skills/shadcn-ui/resources/component-catalog.md +481 -0
- package/ui-ux-design/skills/shadcn-ui/resources/customization-guide.md +516 -0
- package/ui-ux-design/skills/shadcn-ui/resources/migration-guide.md +463 -0
- package/ui-ux-design/skills/shadcn-ui/resources/setup-guide.md +412 -0
- package/ui-ux-design/skills/shadcn-ui/scripts/verify-setup.sh +134 -0
- package/ui-ux-design/skills/ui-ux-design/SKILL.md +77 -0
- package/ui-ux-design/skills/ui-ux-design/references/brand-and-voice.md +72 -0
- package/ui-ux-design/skills/ui-ux-design/references/components-and-states.md +107 -0
- package/ui-ux-design/skills/ui-ux-design/references/delight-and-motion.md +65 -0
- package/ui-ux-design/skills/ui-ux-design/references/foundations.md +144 -0
- package/ui-ux-design/skills/ui-ux-design/references/inclusive-ai-imagery.md +57 -0
- package/ui-ux-design/skills/ui-ux-design/references/kole-jain-uiux-concepts.md +102 -0
- package/ui-ux-design/skills/ui-ux-design/references/openai-frontend-skill.md +139 -0
- package/ui-ux-design/skills/ui-ux-design/references/premium-ui.md +63 -0
- package/ui-ux-design/skills/ui-ux-design/references/research-and-validation.md +78 -0
- package/ui-ux-design/skills/ui-ux-design/references/sam-crawford-premium-websites.md +93 -0
- package/ui-ux-design/skills/ui-ux-design/references/self-made-web-designer-core-skills.md +123 -0
- package/ui-ux-design/skills/ui-ux-design/references/visual-storytelling.md +57 -0
- package/ui-ux-design/skills/vercel-web-design-guidelines/SKILL.md +39 -0
- package/ui-ux-design/skills/web-compliance/SKILL.md +129 -0
- package/ui-ux-design/skills/web-compliance/references/audit-evidence.md +59 -0
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
# shadcn/ui Setup Guide
|
|
2
|
+
|
|
3
|
+
This guide walks you through setting up shadcn/ui in both new and existing projects.
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
Before you begin, ensure you have:
|
|
8
|
+
- **Node.js 18+** installed
|
|
9
|
+
- **React 18+** in your project
|
|
10
|
+
- **Tailwind CSS 3.0+** configured
|
|
11
|
+
- A package manager: npm, yarn, pnpm, or bun
|
|
12
|
+
|
|
13
|
+
## Quick Start (New Project)
|
|
14
|
+
|
|
15
|
+
### Option 1: npx shadcn create (Recommended)
|
|
16
|
+
|
|
17
|
+
The easiest way to start a new project with shadcn/ui is using the `create` command, which allows you to customize everything (framework, library, style, font, etc.).
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npx shadcn@latest create
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
This interactive command will guide you through:
|
|
24
|
+
1. **Project Name**: Directory for your app.
|
|
25
|
+
2. **Visual Style**: Choose from Vega, Nova, Maia, Lyra, Mira, or Classic.
|
|
26
|
+
3. **Base Color**: Select your primary theme color.
|
|
27
|
+
4. **Framework**: Next.js, Vite, Laravel, etc.
|
|
28
|
+
5. **Component Library**: Choose **Radix UI** or **Base UI**.
|
|
29
|
+
6. **RTL Support**: Enable Right-to-Left support if needed.
|
|
30
|
+
|
|
31
|
+
### Option 2: Classic Manual Setup (Next.js)
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# Create a new Next.js project
|
|
35
|
+
npx create-next-app@latest my-app
|
|
36
|
+
cd my-app
|
|
37
|
+
|
|
38
|
+
# Initialize shadcn/ui
|
|
39
|
+
npx shadcn@latest init
|
|
40
|
+
|
|
41
|
+
# Add your first component
|
|
42
|
+
npx shadcn@latest add button
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Option 3: Classic Manual Setup (Vite + React)
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
# Create a new Vite project
|
|
49
|
+
npm create vite@latest my-app -- --template react-ts
|
|
50
|
+
cd my-app
|
|
51
|
+
npm install
|
|
52
|
+
|
|
53
|
+
# Install Tailwind CSS
|
|
54
|
+
npm install -D tailwindcss postcss autoprefixer
|
|
55
|
+
npx tailwindcss init -p
|
|
56
|
+
|
|
57
|
+
# Initialize shadcn/ui
|
|
58
|
+
npx shadcn@latest init
|
|
59
|
+
|
|
60
|
+
# Add your first component
|
|
61
|
+
npx shadcn@latest add button
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Existing Project Setup
|
|
65
|
+
|
|
66
|
+
### Step 1: Ensure Tailwind CSS is Installed
|
|
67
|
+
|
|
68
|
+
If Tailwind is not installed:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
npm install -D tailwindcss postcss autoprefixer
|
|
72
|
+
npx tailwindcss init -p
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Configure `tailwind.config.js`:
|
|
76
|
+
|
|
77
|
+
```javascript
|
|
78
|
+
/** @type {import('tailwindcss').Config} */
|
|
79
|
+
export default {
|
|
80
|
+
content: [
|
|
81
|
+
"./index.html",
|
|
82
|
+
"./src/**/*.{js,ts,jsx,tsx}",
|
|
83
|
+
],
|
|
84
|
+
theme: {
|
|
85
|
+
extend: {},
|
|
86
|
+
},
|
|
87
|
+
plugins: [],
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Step 2: Initialize shadcn/ui
|
|
92
|
+
|
|
93
|
+
Run the initialization command:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
npx shadcn@latest init
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
You'll be asked to configure:
|
|
100
|
+
|
|
101
|
+
1. **Style**: Choose between `default`, `new-york`, or one of the new styles (Vega, Nova, etc.)
|
|
102
|
+
- `default`: Clean and minimal design
|
|
103
|
+
- `new-york`: More refined with subtle details
|
|
104
|
+
|
|
105
|
+
2. **Base Color**: Choose your primary color palette
|
|
106
|
+
- slate, gray, zinc, neutral, or stone
|
|
107
|
+
|
|
108
|
+
3. **CSS Variables**: Recommend `yes` for easier theming
|
|
109
|
+
|
|
110
|
+
4. **TypeScript**: Recommend `yes` for type safety
|
|
111
|
+
|
|
112
|
+
5. **Import Alias**: Default is `@/components` (recommended)
|
|
113
|
+
|
|
114
|
+
6. **React Server Components**: Choose based on your framework
|
|
115
|
+
- `yes` for Next.js 13+ with app directory
|
|
116
|
+
- `no` for Vite, CRA, or Next.js pages directory
|
|
117
|
+
|
|
118
|
+
7. **RTL Support**: Answer `yes` if you need Right-to-Left layout support (this will use logical properties like `ms-4` instead of `ml-4`).
|
|
119
|
+
|
|
120
|
+
## Advanced Features
|
|
121
|
+
|
|
122
|
+
### Visual Styles
|
|
123
|
+
shadcn/ui now offers multiple visual styles beyond the defaults:
|
|
124
|
+
- **Vega**: The classic shadcn/ui look.
|
|
125
|
+
- **Nova**: Reduced padding/margins, compact.
|
|
126
|
+
- **Maia**: Soft, rounded, generous spacing.
|
|
127
|
+
- **Lyra**: Boxy, sharp, mono font friendly.
|
|
128
|
+
- **Mira**: Dense, compact.
|
|
129
|
+
|
|
130
|
+
### Base UI Support
|
|
131
|
+
You can now choose between **Radix UI** and **Base UI** as the underlying primitive library. They share the same component API/abstraction, so your usage remains consistent.
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
### Step 3: Verify Configuration
|
|
135
|
+
|
|
136
|
+
The init command creates/updates several files:
|
|
137
|
+
|
|
138
|
+
**components.json** (root of project):
|
|
139
|
+
```json
|
|
140
|
+
{
|
|
141
|
+
"$schema": "https://ui.shadcn.com/schema.json",
|
|
142
|
+
"style": "default",
|
|
143
|
+
"rsc": false,
|
|
144
|
+
"tsx": true,
|
|
145
|
+
"tailwind": {
|
|
146
|
+
"config": "tailwind.config.js",
|
|
147
|
+
"css": "src/index.css",
|
|
148
|
+
"baseColor": "slate",
|
|
149
|
+
"cssVariables": true
|
|
150
|
+
},
|
|
151
|
+
"aliases": {
|
|
152
|
+
"components": "@/components",
|
|
153
|
+
"utils": "@/lib"
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
**src/lib/utils.ts**:
|
|
159
|
+
```typescript
|
|
160
|
+
import { clsx, type ClassValue } from "clsx"
|
|
161
|
+
import { twMerge } from "tailwind-merge"
|
|
162
|
+
|
|
163
|
+
export function cn(...inputs: ClassValue[]) {
|
|
164
|
+
return twMerge(clsx(inputs))
|
|
165
|
+
}
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
**Updated tailwind.config.js**:
|
|
169
|
+
```javascript
|
|
170
|
+
/** @type {import('tailwindcss').Config} */
|
|
171
|
+
module.exports = {
|
|
172
|
+
darkMode: ["class"],
|
|
173
|
+
content: [
|
|
174
|
+
'./pages/**/*.{ts,tsx}',
|
|
175
|
+
'./components/**/*.{ts,tsx}',
|
|
176
|
+
'./app/**/*.{ts,tsx}',
|
|
177
|
+
'./src/**/*.{ts,tsx}',
|
|
178
|
+
],
|
|
179
|
+
theme: {
|
|
180
|
+
container: {
|
|
181
|
+
center: true,
|
|
182
|
+
padding: "2rem",
|
|
183
|
+
screens: {
|
|
184
|
+
"2xl": "1400px",
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
extend: {
|
|
188
|
+
colors: {
|
|
189
|
+
border: "hsl(var(--border))",
|
|
190
|
+
input: "hsl(var(--input))",
|
|
191
|
+
ring: "hsl(var(--ring))",
|
|
192
|
+
background: "hsl(var(--background))",
|
|
193
|
+
foreground: "hsl(var(--foreground))",
|
|
194
|
+
primary: {
|
|
195
|
+
DEFAULT: "hsl(var(--primary))",
|
|
196
|
+
foreground: "hsl(var(--primary-foreground))",
|
|
197
|
+
},
|
|
198
|
+
// ... more colors
|
|
199
|
+
},
|
|
200
|
+
borderRadius: {
|
|
201
|
+
lg: "var(--radius)",
|
|
202
|
+
md: "calc(var(--radius) - 2px)",
|
|
203
|
+
sm: "calc(var(--radius) - 4px)",
|
|
204
|
+
},
|
|
205
|
+
keyframes: {
|
|
206
|
+
"accordion-down": {
|
|
207
|
+
from: { height: 0 },
|
|
208
|
+
to: { height: "var(--radix-accordion-content-height)" },
|
|
209
|
+
},
|
|
210
|
+
"accordion-up": {
|
|
211
|
+
from: { height: "var(--radix-accordion-content-height)" },
|
|
212
|
+
to: { height: 0 },
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
animation: {
|
|
216
|
+
"accordion-down": "accordion-down 0.2s ease-out",
|
|
217
|
+
"accordion-up": "accordion-up 0.2s ease-out",
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
plugins: [require("tailwindcss-animate")],
|
|
222
|
+
}
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
**Updated globals.css** (or equivalent):
|
|
226
|
+
```css
|
|
227
|
+
@tailwind base;
|
|
228
|
+
@tailwind components;
|
|
229
|
+
@tailwind utilities;
|
|
230
|
+
|
|
231
|
+
@layer base {
|
|
232
|
+
:root {
|
|
233
|
+
--background: 0 0% 100%;
|
|
234
|
+
--foreground: 222.2 84% 4.9%;
|
|
235
|
+
--card: 0 0% 100%;
|
|
236
|
+
--card-foreground: 222.2 84% 4.9%;
|
|
237
|
+
--popover: 0 0% 100%;
|
|
238
|
+
--popover-foreground: 222.2 84% 4.9%;
|
|
239
|
+
--primary: 221.2 83.2% 53.3%;
|
|
240
|
+
--primary-foreground: 210 40% 98%;
|
|
241
|
+
--secondary: 210 40% 96.1%;
|
|
242
|
+
--secondary-foreground: 222.2 47.4% 11.2%;
|
|
243
|
+
--muted: 210 40% 96.1%;
|
|
244
|
+
--muted-foreground: 215.4 16.3% 46.9%;
|
|
245
|
+
--accent: 210 40% 96.1%;
|
|
246
|
+
--accent-foreground: 222.2 47.4% 11.2%;
|
|
247
|
+
--destructive: 0 84.2% 60.2%;
|
|
248
|
+
--destructive-foreground: 210 40% 98%;
|
|
249
|
+
--border: 214.3 31.8% 91.4%;
|
|
250
|
+
--input: 214.3 31.8% 91.4%;
|
|
251
|
+
--ring: 221.2 83.2% 53.3%;
|
|
252
|
+
--radius: 0.5rem;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.dark {
|
|
256
|
+
--background: 222.2 84% 4.9%;
|
|
257
|
+
--foreground: 210 40% 98%;
|
|
258
|
+
/* ... dark mode variables */
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
@layer base {
|
|
263
|
+
* {
|
|
264
|
+
@apply border-border;
|
|
265
|
+
}
|
|
266
|
+
body {
|
|
267
|
+
@apply bg-background text-foreground;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
### Step 4: Configure Path Aliases
|
|
273
|
+
|
|
274
|
+
Ensure your `tsconfig.json` includes path aliases:
|
|
275
|
+
|
|
276
|
+
```json
|
|
277
|
+
{
|
|
278
|
+
"compilerOptions": {
|
|
279
|
+
"baseUrl": ".",
|
|
280
|
+
"paths": {
|
|
281
|
+
"@/*": ["./src/*"]
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
For Vite, also update `vite.config.ts`:
|
|
288
|
+
|
|
289
|
+
```typescript
|
|
290
|
+
import path from "path"
|
|
291
|
+
import { defineConfig } from "vite"
|
|
292
|
+
import react from "@vitejs/plugin-react"
|
|
293
|
+
|
|
294
|
+
export default defineConfig({
|
|
295
|
+
plugins: [react()],
|
|
296
|
+
resolve: {
|
|
297
|
+
alias: {
|
|
298
|
+
"@": path.resolve(__dirname, "./src"),
|
|
299
|
+
},
|
|
300
|
+
},
|
|
301
|
+
})
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
### Step 5: Add Components
|
|
305
|
+
|
|
306
|
+
Now you can add components:
|
|
307
|
+
|
|
308
|
+
```bash
|
|
309
|
+
# Add individual components
|
|
310
|
+
npx shadcn@latest add button
|
|
311
|
+
npx shadcn@latest add card
|
|
312
|
+
npx shadcn@latest add dialog
|
|
313
|
+
|
|
314
|
+
# Add multiple components at once
|
|
315
|
+
npx shadcn@latest add button card dialog input label
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
Components will be added to `src/components/ui/` by default.
|
|
319
|
+
|
|
320
|
+
## Framework-Specific Considerations
|
|
321
|
+
|
|
322
|
+
### Next.js App Router
|
|
323
|
+
|
|
324
|
+
- Set `rsc: true` in `components.json`
|
|
325
|
+
- Add `"use client"` to stateful components
|
|
326
|
+
- Import components work from server components by default
|
|
327
|
+
|
|
328
|
+
### Next.js Pages Router
|
|
329
|
+
|
|
330
|
+
- Set `rsc: false` in `components.json`
|
|
331
|
+
- All components are client-side by default
|
|
332
|
+
|
|
333
|
+
### Vite
|
|
334
|
+
|
|
335
|
+
- Ensure path aliases are configured in `vite.config.ts`
|
|
336
|
+
- Import `globals.css` in your main entry point (`main.tsx`)
|
|
337
|
+
|
|
338
|
+
### Create React App
|
|
339
|
+
|
|
340
|
+
- Use `craco` or `react-app-rewired` for path alias support
|
|
341
|
+
- Or use relative imports instead of aliases
|
|
342
|
+
|
|
343
|
+
## Verification Steps
|
|
344
|
+
|
|
345
|
+
1. **Check file structure**:
|
|
346
|
+
```
|
|
347
|
+
src/
|
|
348
|
+
├── components/
|
|
349
|
+
│ └── ui/
|
|
350
|
+
├── lib/
|
|
351
|
+
│ └── utils.ts
|
|
352
|
+
└── index.css (or globals.css)
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
2. **Test a simple component**:
|
|
356
|
+
```tsx
|
|
357
|
+
import { Button } from "@/components/ui/button"
|
|
358
|
+
|
|
359
|
+
export default function App() {
|
|
360
|
+
return <Button>Click me</Button>
|
|
361
|
+
}
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
3. **Verify Tailwind is working**:
|
|
365
|
+
- Component should render with proper styling
|
|
366
|
+
- Check browser dev tools for applied classes
|
|
367
|
+
|
|
368
|
+
4. **Test dark mode** (if using CSS variables):
|
|
369
|
+
```tsx
|
|
370
|
+
<html className="dark">
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
## Troubleshooting
|
|
374
|
+
|
|
375
|
+
### "Cannot find module '@/components/ui/button'"
|
|
376
|
+
|
|
377
|
+
**Solution**: Check path alias configuration in `tsconfig.json` and framework config.
|
|
378
|
+
|
|
379
|
+
### Styles not applying
|
|
380
|
+
|
|
381
|
+
**Solution**:
|
|
382
|
+
- Ensure `globals.css` is imported in your app entry point
|
|
383
|
+
- Verify Tailwind config `content` paths include your files
|
|
384
|
+
- Check CSS variables are defined in `globals.css`
|
|
385
|
+
|
|
386
|
+
### TypeScript errors in components
|
|
387
|
+
|
|
388
|
+
**Solution**:
|
|
389
|
+
- Run `npm install` to ensure all dependencies are installed
|
|
390
|
+
- Check that `@types/react` is installed
|
|
391
|
+
- Restart TypeScript server in your editor
|
|
392
|
+
|
|
393
|
+
### Components look broken
|
|
394
|
+
|
|
395
|
+
**Solution**:
|
|
396
|
+
- Verify `tailwindcss-animate` is installed: `npm install tailwindcss-animate`
|
|
397
|
+
- Check that CSS variables are properly defined
|
|
398
|
+
- Ensure you're not overriding component styles globally
|
|
399
|
+
|
|
400
|
+
## Next Steps
|
|
401
|
+
|
|
402
|
+
1. Browse the [component catalog](./component-catalog.md)
|
|
403
|
+
2. Read the [customization guide](./customization-guide.md)
|
|
404
|
+
3. Check out example implementations in `/examples`
|
|
405
|
+
4. Join the [shadcn/ui Discord](https://discord.com/invite/vNvTqVaWm6)
|
|
406
|
+
|
|
407
|
+
## Additional Resources
|
|
408
|
+
|
|
409
|
+
- [Official Documentation](https://ui.shadcn.com)
|
|
410
|
+
- [Component Examples](https://ui.shadcn.com/examples)
|
|
411
|
+
- [GitHub Repository](https://github.com/shadcn-ui/ui)
|
|
412
|
+
- [Tailwind CSS Docs](https://tailwindcss.com/docs)
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# shadcn/ui Setup Verification Script
|
|
3
|
+
# Validates that a project is correctly configured for shadcn/ui
|
|
4
|
+
|
|
5
|
+
set -e
|
|
6
|
+
|
|
7
|
+
GREEN='\033[0;32m'
|
|
8
|
+
RED='\033[0;31m'
|
|
9
|
+
YELLOW='\033[1;33m'
|
|
10
|
+
NC='\033[0m' # No Color
|
|
11
|
+
|
|
12
|
+
echo "🔍 Verifying shadcn/ui setup..."
|
|
13
|
+
echo ""
|
|
14
|
+
|
|
15
|
+
# Check if components.json exists
|
|
16
|
+
if [ -f "components.json" ]; then
|
|
17
|
+
echo -e "${GREEN}✓${NC} components.json found"
|
|
18
|
+
else
|
|
19
|
+
echo -e "${RED}✗${NC} components.json not found"
|
|
20
|
+
echo -e " ${YELLOW}Run:${NC} npx shadcn@latest init"
|
|
21
|
+
exit 1
|
|
22
|
+
fi
|
|
23
|
+
|
|
24
|
+
# Check if tailwind.config exists
|
|
25
|
+
if [ -f "tailwind.config.js" ] || [ -f "tailwind.config.ts" ]; then
|
|
26
|
+
echo -e "${GREEN}✓${NC} Tailwind config found"
|
|
27
|
+
else
|
|
28
|
+
echo -e "${RED}✗${NC} tailwind.config.js not found"
|
|
29
|
+
echo -e " ${YELLOW}Install Tailwind:${NC} npm install -D tailwindcss postcss autoprefixer"
|
|
30
|
+
exit 1
|
|
31
|
+
fi
|
|
32
|
+
|
|
33
|
+
# Check if tsconfig.json has path aliases
|
|
34
|
+
if [ -f "tsconfig.json" ]; then
|
|
35
|
+
if grep -q '"@/\*"' tsconfig.json; then
|
|
36
|
+
echo -e "${GREEN}✓${NC} Path aliases configured in tsconfig.json"
|
|
37
|
+
else
|
|
38
|
+
echo -e "${YELLOW}⚠${NC} Path aliases not found in tsconfig.json"
|
|
39
|
+
echo " Add to compilerOptions.paths:"
|
|
40
|
+
echo ' "@/*": ["./src/*"]'
|
|
41
|
+
fi
|
|
42
|
+
else
|
|
43
|
+
echo -e "${YELLOW}⚠${NC} tsconfig.json not found (TypeScript not configured)"
|
|
44
|
+
fi
|
|
45
|
+
|
|
46
|
+
# Check if globals.css or equivalent exists
|
|
47
|
+
if [ -f "src/index.css" ] || [ -f "src/globals.css" ] || [ -f "app/globals.css" ]; then
|
|
48
|
+
echo -e "${GREEN}✓${NC} Global CSS file found"
|
|
49
|
+
|
|
50
|
+
# Check for Tailwind directives
|
|
51
|
+
CSS_FILE=$(find . -name "globals.css" -o -name "index.css" | head -n 1)
|
|
52
|
+
if grep -q "@tailwind base" "$CSS_FILE"; then
|
|
53
|
+
echo -e "${GREEN}✓${NC} Tailwind directives present"
|
|
54
|
+
else
|
|
55
|
+
echo -e "${RED}✗${NC} Tailwind directives missing"
|
|
56
|
+
echo " Add to your CSS file:"
|
|
57
|
+
echo " @tailwind base;"
|
|
58
|
+
echo " @tailwind components;"
|
|
59
|
+
echo " @tailwind utilities;"
|
|
60
|
+
fi
|
|
61
|
+
|
|
62
|
+
# Check for CSS variables
|
|
63
|
+
if grep -q "^:root" "$CSS_FILE" || grep -q "@layer base" "$CSS_FILE"; then
|
|
64
|
+
echo -e "${GREEN}✓${NC} CSS variables defined"
|
|
65
|
+
else
|
|
66
|
+
echo -e "${YELLOW}⚠${NC} CSS variables not found"
|
|
67
|
+
echo " shadcn/ui requires CSS variables for theming"
|
|
68
|
+
fi
|
|
69
|
+
else
|
|
70
|
+
echo -e "${RED}✗${NC} Global CSS file not found"
|
|
71
|
+
fi
|
|
72
|
+
|
|
73
|
+
# Check if components/ui directory exists
|
|
74
|
+
if [ -d "src/components/ui" ] || [ -d "components/ui" ]; then
|
|
75
|
+
echo -e "${GREEN}✓${NC} components/ui directory exists"
|
|
76
|
+
|
|
77
|
+
# Count components
|
|
78
|
+
COMPONENT_COUNT=$(find . -path "*/components/ui/*.tsx" -o -path "*/components/ui/*.jsx" | wc -l)
|
|
79
|
+
echo -e " ${COMPONENT_COUNT} components installed"
|
|
80
|
+
else
|
|
81
|
+
echo -e "${YELLOW}⚠${NC} components/ui directory not found"
|
|
82
|
+
echo " Add your first component: npx shadcn@latest add button"
|
|
83
|
+
fi
|
|
84
|
+
|
|
85
|
+
# Check if lib/utils exists
|
|
86
|
+
if [ -f "src/lib/utils.ts" ] || [ -f "lib/utils.ts" ]; then
|
|
87
|
+
echo -e "${GREEN}✓${NC} lib/utils.ts exists"
|
|
88
|
+
|
|
89
|
+
# Check for cn function
|
|
90
|
+
UTILS_FILE=$(find . -name "utils.ts" | grep "lib" | head -n 1)
|
|
91
|
+
if grep -q "export function cn" "$UTILS_FILE"; then
|
|
92
|
+
echo -e "${GREEN}✓${NC} cn() utility function present"
|
|
93
|
+
else
|
|
94
|
+
echo -e "${RED}✗${NC} cn() utility function missing"
|
|
95
|
+
fi
|
|
96
|
+
else
|
|
97
|
+
echo -e "${RED}✗${NC} lib/utils.ts not found"
|
|
98
|
+
fi
|
|
99
|
+
|
|
100
|
+
# Check package.json dependencies
|
|
101
|
+
if [ -f "package.json" ]; then
|
|
102
|
+
echo ""
|
|
103
|
+
echo "📦 Checking dependencies..."
|
|
104
|
+
|
|
105
|
+
# Required dependencies
|
|
106
|
+
REQUIRED_DEPS=("react" "tailwindcss")
|
|
107
|
+
RECOMMENDED_DEPS=("class-variance-authority" "clsx" "tailwind-merge" "tailwindcss-animate")
|
|
108
|
+
|
|
109
|
+
for dep in "${REQUIRED_DEPS[@]}"; do
|
|
110
|
+
if grep -q "\"$dep\"" package.json; then
|
|
111
|
+
echo -e "${GREEN}✓${NC} $dep installed"
|
|
112
|
+
else
|
|
113
|
+
echo -e "${RED}✗${NC} $dep not installed"
|
|
114
|
+
fi
|
|
115
|
+
done
|
|
116
|
+
|
|
117
|
+
echo ""
|
|
118
|
+
echo "Recommended dependencies:"
|
|
119
|
+
for dep in "${RECOMMENDED_DEPS[@]}"; do
|
|
120
|
+
if grep -q "\"$dep\"" package.json; then
|
|
121
|
+
echo -e "${GREEN}✓${NC} $dep installed"
|
|
122
|
+
else
|
|
123
|
+
echo -e "${YELLOW}⚠${NC} $dep not installed (recommended)"
|
|
124
|
+
fi
|
|
125
|
+
done
|
|
126
|
+
fi
|
|
127
|
+
|
|
128
|
+
echo ""
|
|
129
|
+
echo -e "${GREEN}✓${NC} Setup verification complete!"
|
|
130
|
+
echo ""
|
|
131
|
+
echo "Next steps:"
|
|
132
|
+
echo " 1. Add components: npx shadcn@latest add [component]"
|
|
133
|
+
echo " 2. View catalog: npx shadcn@latest add --help"
|
|
134
|
+
echo " 3. Browse docs: https://ui.shadcn.com"
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ui-ux-design
|
|
3
|
+
version: 1.1.0
|
|
4
|
+
last_updated: 2026-08-09
|
|
5
|
+
description: Use when creating frontend design systems, visual direction, component/state specs, responsive behavior, brand-aware UI guidance, premium/high-converting website polish, or implementation-ready design handoff from a feature spec or existing product constraints.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Skill: UI/UX Design
|
|
9
|
+
|
|
10
|
+
## Execution
|
|
11
|
+
|
|
12
|
+
- Read the active spec, current product UI constraints, and ADR notes before making visual decisions.
|
|
13
|
+
- Preserve an existing design system unless the user explicitly requests a new direction.
|
|
14
|
+
- Define foundations before screens: tokens, typography, spacing, breakpoints, layout rules, interaction baselines.
|
|
15
|
+
- Define component behavior before polish: default, hover, focus, active, loading, empty, error, success, disabled.
|
|
16
|
+
- Load only the reference files needed for the current task, with one standing exception: **any request for visual quality loads the premium bundle up front** — `references/premium-ui.md` together with `sam-crawford-premium-websites.md`, `self-made-web-designer-core-skills.md`, and `kole-jain-uiux-concepts.md`. That is ~6k tokens for all four, and the specifics live in the three notes, not the summary. Do not wait for the user to name a source; they never will.
|
|
17
|
+
- `references/premium-ui.md` for premium/luxury/high-trust/high-converting website and product UI polish — first impression, hierarchy, premium signals, and the three design-school notes it carries
|
|
18
|
+
- `references/foundations.md` for tokens, layout, theming, responsive rules
|
|
19
|
+
- `references/components-and-states.md` for component inventory, state matrix, interaction rules
|
|
20
|
+
- `references/brand-and-voice.md` for brand system, tone, messaging, visual identity direction
|
|
21
|
+
- `references/research-and-validation.md` for personas, journeys, usability-test planning, design validation
|
|
22
|
+
- `references/visual-storytelling.md` for narrative layouts, data storytelling, campaign-style pages
|
|
23
|
+
- `references/openai-frontend-skill.md` for composition-first landing pages, branded demos, art direction, and anti-generic UI checks
|
|
24
|
+
- `references/delight-and-motion.md` for microcopy, micro-interactions, personality, motion, delight
|
|
25
|
+
- `references/inclusive-ai-imagery.md` for inclusive representation rules and AI image/video prompting
|
|
26
|
+
- Treat accessibility, responsive behavior, and implementation clarity as default requirements.
|
|
27
|
+
- Produce design output that Programmer, QA/E2E, and Code Inspection can execute without guessing.
|
|
28
|
+
|
|
29
|
+
## Guardrails
|
|
30
|
+
|
|
31
|
+
- Do not implement frontend code unless the owning agent explicitly changes scope.
|
|
32
|
+
- Do not invent a brand system when the product already has one; extend or document the existing one.
|
|
33
|
+
- Do not prescribe motion, whimsy, or theme toggles by default when they conflict with product context.
|
|
34
|
+
- Do not rely on color alone for meaning, placeholder-only labels, or non-semantic interaction patterns.
|
|
35
|
+
- Do not use AI-image guidance unless image or video generation is actually in scope.
|
|
36
|
+
- Do not present user research fiction as real evidence; label proposed research and validation plans as plans.
|
|
37
|
+
- If `references/openai-frontend-skill.md` is activated, explicitly tell the user before using its direction so they can redirect if they do not want that visual approach.
|
|
38
|
+
|
|
39
|
+
## Output
|
|
40
|
+
|
|
41
|
+
Write a concise design artifact that includes:
|
|
42
|
+
|
|
43
|
+
- visual direction summary
|
|
44
|
+
- design foundations: tokens, typography, spacing, layout, breakpoints
|
|
45
|
+
- component inventory and state matrix
|
|
46
|
+
- interaction, motion, and microcopy rules
|
|
47
|
+
- accessibility and inclusive-design requirements
|
|
48
|
+
- brand/voice constraints when relevant
|
|
49
|
+
- implementation notes for Programmer
|
|
50
|
+
- verification notes for QA/E2E and Code Inspection
|
|
51
|
+
|
|
52
|
+
Default path: `<ADS_MEMORY_ROOT>/reports/pipeline/<NNN>-<feature-name>/design-spec.md`
|
|
53
|
+
|
|
54
|
+
## Reference
|
|
55
|
+
|
|
56
|
+
### Preconditions
|
|
57
|
+
|
|
58
|
+
- Inputs expected: active feature spec, existing UI/design constraints, ADR constraints if available, target platform context.
|
|
59
|
+
- If the request is an audit of existing UI rather than design creation, pair this skill with `vercel-web-design-guidelines` and `frontend-accessibility`.
|
|
60
|
+
|
|
61
|
+
### Decision Rule
|
|
62
|
+
|
|
63
|
+
- Any signal that visual quality matters — premium, high-end, expensive, luxury, agency-grade, high-converting, "make it look good", a redesign, or a first-impression/marketing surface -> load `premium-ui.md` **and its three notes** first
|
|
64
|
+
- Need layout, theming, or token structure -> load `foundations.md`
|
|
65
|
+
- Need reusable components or interaction states -> load `components-and-states.md`
|
|
66
|
+
- Need brand system or tone definition -> load `brand-and-voice.md`
|
|
67
|
+
- Need validation plan or persona/journey structure -> load `research-and-validation.md`
|
|
68
|
+
- Need narrative landing page, infographic, or campaign framing -> load `visual-storytelling.md`
|
|
69
|
+
- Need visually strong landing-page composition, branded demo direction, or anti-generic UI guidance -> load `openai-frontend-skill.md`
|
|
70
|
+
- Need delight, motion, or playful interaction guidance -> load `delight-and-motion.md`
|
|
71
|
+
- Need AI-generated imagery or inclusive representation constraints -> load `inclusive-ai-imagery.md`
|
|
72
|
+
|
|
73
|
+
### Failure Path
|
|
74
|
+
|
|
75
|
+
- If brand direction conflicts with accessibility or compliance, keep the baseline and escalate the conflict.
|
|
76
|
+
- If the spec lacks enough product context for irreversible design decisions, produce a constrained design spec with explicit assumptions and open questions.
|
|
77
|
+
- If requested style would materially harm usability, note the tradeoff and require human approval before locking it in.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Brand and Voice
|
|
2
|
+
|
|
3
|
+
Use this reference when the design work includes identity direction, messaging behavior, or visual tone.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
- greenfield product with no established brand system
|
|
8
|
+
- redesign where the user wants a visual reset
|
|
9
|
+
- public-facing marketing or landing surfaces
|
|
10
|
+
- copy or tone decisions that materially affect UX
|
|
11
|
+
|
|
12
|
+
## Brand Foundation Inputs
|
|
13
|
+
|
|
14
|
+
If enough context exists, define:
|
|
15
|
+
|
|
16
|
+
- purpose
|
|
17
|
+
- vision
|
|
18
|
+
- mission
|
|
19
|
+
- values
|
|
20
|
+
- personality traits
|
|
21
|
+
- audience
|
|
22
|
+
- competitive differentiation
|
|
23
|
+
|
|
24
|
+
Keep this lightweight unless the user explicitly requests full brand strategy work.
|
|
25
|
+
|
|
26
|
+
## Voice Rules
|
|
27
|
+
|
|
28
|
+
Define:
|
|
29
|
+
|
|
30
|
+
- tone adjectives
|
|
31
|
+
- preferred reading level
|
|
32
|
+
- helpfulness vs confidence balance
|
|
33
|
+
- what copy should avoid
|
|
34
|
+
- how errors, empty states, and success messages should sound
|
|
35
|
+
|
|
36
|
+
Prefer clear, human, concise language over generic corporate filler.
|
|
37
|
+
|
|
38
|
+
## Visual Identity Translation
|
|
39
|
+
|
|
40
|
+
Translate brand direction into:
|
|
41
|
+
|
|
42
|
+
- palette behavior
|
|
43
|
+
- typography mood
|
|
44
|
+
- imagery treatment
|
|
45
|
+
- icon/illustration style
|
|
46
|
+
- density and whitespace
|
|
47
|
+
- motion character
|
|
48
|
+
|
|
49
|
+
## Messaging Architecture
|
|
50
|
+
|
|
51
|
+
For public-facing surfaces, define:
|
|
52
|
+
|
|
53
|
+
- headline style
|
|
54
|
+
- subhead style
|
|
55
|
+
- value proposition structure
|
|
56
|
+
- CTA tone
|
|
57
|
+
- proof/trust elements
|
|
58
|
+
|
|
59
|
+
## Anti-Patterns
|
|
60
|
+
|
|
61
|
+
- inventing deep brand strategy when only feature-level UI is needed
|
|
62
|
+
- robotic generic copy
|
|
63
|
+
- brand tone that conflicts with task clarity
|
|
64
|
+
- visual identity choices that reduce readability or accessibility
|
|
65
|
+
|
|
66
|
+
## Output Checklist
|
|
67
|
+
|
|
68
|
+
- brand assumptions stated
|
|
69
|
+
- tone/voice rules stated
|
|
70
|
+
- copy style examples provided when relevant
|
|
71
|
+
- visual identity translation documented
|
|
72
|
+
- conflicts with existing brand noted explicitly
|