@usevyre/ai-context 0.1.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/LICENSE +21 -0
- package/dist/claude-context.md +296 -0
- package/dist/copilot-instructions.md +295 -0
- package/dist/cursor-rules.md +296 -0
- package/dist/full-context.md +291 -0
- package/dist/index.js +1476 -0
- package/dist/windsurf-rules.md +293 -0
- package/package.json +29 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,1476 @@
|
|
|
1
|
+
export const fullContext = `# useVyre Design System — AI Context
|
|
2
|
+
# Version: 0.1.0
|
|
3
|
+
# Include this file in your AI agent's system prompt, .cursor/rules, or CLAUDE.md
|
|
4
|
+
# Source: https://usevyre.com/ai-context
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## What is useVyre?
|
|
9
|
+
|
|
10
|
+
useVyre is an AI-native design system for React and Vue. It uses CSS custom properties
|
|
11
|
+
(variables) as its single source of truth, making it inherently AI-friendly — no magic,
|
|
12
|
+
no runtime transforms, just semantic token names that describe intent.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
\`\`\`bash
|
|
19
|
+
# Tokens (required by everything)
|
|
20
|
+
pnpm add @usevyre/tokens
|
|
21
|
+
|
|
22
|
+
# React components
|
|
23
|
+
pnpm add @usevyre/react
|
|
24
|
+
|
|
25
|
+
# Vue components
|
|
26
|
+
pnpm add @usevyre/vue
|
|
27
|
+
\`\`\`
|
|
28
|
+
|
|
29
|
+
## CSS Setup
|
|
30
|
+
|
|
31
|
+
\`\`\`css
|
|
32
|
+
/* In your global CSS entry point */
|
|
33
|
+
@import "@usevyre/tokens/css"; /* design tokens */
|
|
34
|
+
@import "@usevyre/react/styles"; /* component styles (React) */
|
|
35
|
+
/* or */
|
|
36
|
+
@import "@usevyre/vue/styles"; /* component styles (Vue) */
|
|
37
|
+
\`\`\`
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Token Naming Convention
|
|
42
|
+
|
|
43
|
+
ALL tokens follow this pattern:
|
|
44
|
+
\`\`\`
|
|
45
|
+
--vyre-[category]-[subcategory]-[variant]
|
|
46
|
+
\`\`\`
|
|
47
|
+
|
|
48
|
+
Examples:
|
|
49
|
+
- \`--vyre-color-semantic-accent\` ✅ Use this
|
|
50
|
+
- \`--vyre-color-primitive-amber-400\` ❌ Never use primitives in components
|
|
51
|
+
- \`--vyre-spacing-4\` ✅ 16px spacing
|
|
52
|
+
- \`--vyre-typography-font-size-sm\` ✅ 13px font size
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Semantic Color Tokens (use these in ALL component styling)
|
|
57
|
+
|
|
58
|
+
### Surface layers (background → foreground)
|
|
59
|
+
- \`--vyre-color-semantic-background\` Page background. Deepest layer.
|
|
60
|
+
- \`--vyre-color-semantic-surface\` Cards, panels, sidebars.
|
|
61
|
+
- \`--vyre-color-semantic-surface-raised\` Dropdowns, inputs, elevated cards.
|
|
62
|
+
- \`--vyre-color-semantic-surface-overlay\` Modals, tooltips.
|
|
63
|
+
|
|
64
|
+
### Borders
|
|
65
|
+
- \`--vyre-color-semantic-border-subtle\` Dividers, subtle separators.
|
|
66
|
+
- \`--vyre-color-semantic-border\` Default card/input borders.
|
|
67
|
+
- \`--vyre-color-semantic-border-strong\` Focus rings, selected states.
|
|
68
|
+
|
|
69
|
+
### Text hierarchy
|
|
70
|
+
- \`--vyre-color-semantic-text-primary\` Headings, body text.
|
|
71
|
+
- \`--vyre-color-semantic-text-secondary\` Subtitles, descriptions.
|
|
72
|
+
- \`--vyre-color-semantic-text-muted\` Placeholders, helper text.
|
|
73
|
+
- \`--vyre-color-semantic-text-disabled\` Disabled state text.
|
|
74
|
+
- \`--vyre-color-semantic-text-inverse\` Text on light/accent backgrounds.
|
|
75
|
+
|
|
76
|
+
### Brand colors
|
|
77
|
+
- \`--vyre-color-semantic-accent\` Primary CTA, highlights. (amber)
|
|
78
|
+
- \`--vyre-color-semantic-accent-hover\` Hover for accent elements.
|
|
79
|
+
- \`--vyre-color-semantic-accent-subtle\` Low-opacity accent backgrounds.
|
|
80
|
+
- \`--vyre-color-semantic-teal\` Secondary accent. Code, success. (teal)
|
|
81
|
+
- \`--vyre-color-semantic-teal-hover\` Hover for teal elements.
|
|
82
|
+
- \`--vyre-color-semantic-teal-subtle\` Low-opacity teal backgrounds.
|
|
83
|
+
|
|
84
|
+
### Semantic status colors
|
|
85
|
+
- \`--vyre-color-semantic-success\` Confirmations, complete states.
|
|
86
|
+
- \`--vyre-color-semantic-success-subtle\` Success badge backgrounds.
|
|
87
|
+
- \`--vyre-color-semantic-warning\` Warnings, beta indicators.
|
|
88
|
+
- \`--vyre-color-semantic-warning-subtle\` Warning badge backgrounds.
|
|
89
|
+
- \`--vyre-color-semantic-danger\` Errors, destructive actions.
|
|
90
|
+
- \`--vyre-color-semantic-danger-hover\` Hover for danger elements.
|
|
91
|
+
- \`--vyre-color-semantic-danger-subtle\` Error badge backgrounds.
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Typography Tokens
|
|
96
|
+
|
|
97
|
+
### Font families
|
|
98
|
+
- \`--vyre-typography-font-family-display\` Headlines, hero text (serif)
|
|
99
|
+
- \`--vyre-typography-font-family-body\` UI text, labels, body copy (sans-serif)
|
|
100
|
+
- \`--vyre-typography-font-family-mono\` Code, tokens, technical text (monospace)
|
|
101
|
+
|
|
102
|
+
### Font sizes
|
|
103
|
+
- \`--vyre-typography-font-size-2xs\` 10px — tiny labels
|
|
104
|
+
- \`--vyre-typography-font-size-xs\` 11px — badge text, captions
|
|
105
|
+
- \`--vyre-typography-font-size-sm\` 13px — default UI text, buttons
|
|
106
|
+
- \`--vyre-typography-font-size-md\` 15px — body text
|
|
107
|
+
- \`--vyre-typography-font-size-lg\` 18px — large body, small headings
|
|
108
|
+
- \`--vyre-typography-font-size-xl\` 22px — section headings
|
|
109
|
+
- \`--vyre-typography-font-size-2xl\` 28px — page headings
|
|
110
|
+
- \`--vyre-typography-font-size-3xl\` 36px — large headings
|
|
111
|
+
- \`--vyre-typography-font-size-4xl\` 48px — hero headings
|
|
112
|
+
- \`--vyre-typography-font-size-5xl\` 64px — display headings
|
|
113
|
+
|
|
114
|
+
### Font weights
|
|
115
|
+
- \`--vyre-typography-font-weight-light\` 300
|
|
116
|
+
- \`--vyre-typography-font-weight-regular\` 400
|
|
117
|
+
- \`--vyre-typography-font-weight-medium\` 500
|
|
118
|
+
- \`--vyre-typography-font-weight-semibold\` 600
|
|
119
|
+
- \`--vyre-typography-font-weight-bold\` 700
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Spacing Tokens (4px base grid)
|
|
124
|
+
|
|
125
|
+
- \`--vyre-spacing-1\` 4px
|
|
126
|
+
- \`--vyre-spacing-2\` 8px
|
|
127
|
+
- \`--vyre-spacing-3\` 12px
|
|
128
|
+
- \`--vyre-spacing-4\` 16px
|
|
129
|
+
- \`--vyre-spacing-5\` 20px
|
|
130
|
+
- \`--vyre-spacing-6\` 24px
|
|
131
|
+
- \`--vyre-spacing-8\` 32px
|
|
132
|
+
- \`--vyre-spacing-10\` 40px
|
|
133
|
+
- \`--vyre-spacing-12\` 48px
|
|
134
|
+
- \`--vyre-spacing-16\` 64px
|
|
135
|
+
- \`--vyre-spacing-20\` 80px
|
|
136
|
+
- \`--vyre-spacing-24\` 96px
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## Border Radius Tokens
|
|
141
|
+
|
|
142
|
+
- \`--vyre-border-radius-none\` 0
|
|
143
|
+
- \`--vyre-border-radius-sm\` 4px — tight corners
|
|
144
|
+
- \`--vyre-border-radius-md\` 8px — default components
|
|
145
|
+
- \`--vyre-border-radius-lg\` 12px — cards, panels
|
|
146
|
+
- \`--vyre-border-radius-xl\` 16px — large cards
|
|
147
|
+
- \`--vyre-border-radius-2xl\` 24px — modals, sheets
|
|
148
|
+
- \`--vyre-border-radius-full\` 9999px — badges, pills, avatars
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## Component API Reference
|
|
153
|
+
|
|
154
|
+
### Button
|
|
155
|
+
|
|
156
|
+
\`\`\`tsx
|
|
157
|
+
import { Button } from "@usevyre/react"
|
|
158
|
+
|
|
159
|
+
// Props:
|
|
160
|
+
// variant = "primary" | "secondary" | "ghost" | "accent" | "teal" | "danger"
|
|
161
|
+
// size = "sm" | "md" | "lg" | "icon"
|
|
162
|
+
// loading = boolean
|
|
163
|
+
// disabled = boolean
|
|
164
|
+
// as = React.ElementType (default: "button")
|
|
165
|
+
// leftIcon = ReactNode
|
|
166
|
+
// rightIcon = ReactNode
|
|
167
|
+
|
|
168
|
+
// Examples:
|
|
169
|
+
<Button variant="accent" size="lg">Get Started</Button>
|
|
170
|
+
<Button variant="ghost" size="sm">Cancel</Button>
|
|
171
|
+
<Button variant="danger" loading>Deleting...</Button>
|
|
172
|
+
<Button as="a" href="/docs" variant="secondary">Read Docs</Button>
|
|
173
|
+
\`\`\`
|
|
174
|
+
|
|
175
|
+
### Badge
|
|
176
|
+
|
|
177
|
+
\`\`\`tsx
|
|
178
|
+
import { Badge } from "@usevyre/react"
|
|
179
|
+
|
|
180
|
+
// Props:
|
|
181
|
+
// variant = "default" | "accent" | "teal" | "success" | "warning" | "danger"
|
|
182
|
+
// dot = boolean (live status indicator dot)
|
|
183
|
+
|
|
184
|
+
// Examples:
|
|
185
|
+
<Badge variant="success" dot>Online</Badge>
|
|
186
|
+
<Badge variant="warning">Beta</Badge>
|
|
187
|
+
<Badge variant="danger">Error</Badge>
|
|
188
|
+
\`\`\`
|
|
189
|
+
|
|
190
|
+
### Card
|
|
191
|
+
|
|
192
|
+
\`\`\`tsx
|
|
193
|
+
import { Card, CardHeader, CardBody, CardFooter } from "@usevyre/react"
|
|
194
|
+
|
|
195
|
+
// Card props:
|
|
196
|
+
// variant = "default" | "elevated" | "outlined" | "ghost" | "accent"
|
|
197
|
+
// hoverable = boolean
|
|
198
|
+
// clickable = boolean
|
|
199
|
+
|
|
200
|
+
// Examples:
|
|
201
|
+
<Card variant="elevated">
|
|
202
|
+
<CardHeader>
|
|
203
|
+
<Badge variant="teal">New</Badge>
|
|
204
|
+
</CardHeader>
|
|
205
|
+
<CardBody>
|
|
206
|
+
<h3>Card Title</h3>
|
|
207
|
+
<p>Description text.</p>
|
|
208
|
+
</CardBody>
|
|
209
|
+
<CardFooter>
|
|
210
|
+
<Button variant="ghost" size="sm">Learn more</Button>
|
|
211
|
+
</CardFooter>
|
|
212
|
+
</Card>
|
|
213
|
+
\`\`\`
|
|
214
|
+
|
|
215
|
+
### Field + Input + Textarea
|
|
216
|
+
|
|
217
|
+
\`\`\`tsx
|
|
218
|
+
import { Field, Input, Textarea } from "@usevyre/react"
|
|
219
|
+
|
|
220
|
+
// Field props:
|
|
221
|
+
// label = string
|
|
222
|
+
// hint = string
|
|
223
|
+
// state = "idle" | "error" | "success" | "warning"
|
|
224
|
+
// required = boolean
|
|
225
|
+
|
|
226
|
+
// Input props:
|
|
227
|
+
// size = "sm" | "md" | "lg"
|
|
228
|
+
// leftElement = ReactNode
|
|
229
|
+
// rightElement = ReactNode
|
|
230
|
+
// + all native input props
|
|
231
|
+
|
|
232
|
+
// Examples:
|
|
233
|
+
<Field label="Email" state="error" hint="Invalid format">
|
|
234
|
+
<Input type="email" placeholder="you@example.com" />
|
|
235
|
+
</Field>
|
|
236
|
+
|
|
237
|
+
<Field label="Search">
|
|
238
|
+
<Input leftElement={<SearchIcon />} placeholder="Search..." />
|
|
239
|
+
</Field>
|
|
240
|
+
|
|
241
|
+
<Field label="Bio">
|
|
242
|
+
<Textarea rows={4} placeholder="Tell us about yourself..." />
|
|
243
|
+
</Field>
|
|
244
|
+
\`\`\`
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
## Styling Rules for AI Agents
|
|
249
|
+
|
|
250
|
+
1. ALWAYS use semantic tokens (\`--vyre-color-semantic-*\`), never primitive tokens
|
|
251
|
+
2. NEVER hardcode colors — every color decision has a semantic token
|
|
252
|
+
3. Text hierarchy: \`text-primary\` → \`text-secondary\` → \`text-muted\` → \`text-disabled\`
|
|
253
|
+
4. Interactive hover states: add \`-hover\` suffix to base token
|
|
254
|
+
5. Low-opacity backgrounds: use \`-subtle\` suffix tokens
|
|
255
|
+
6. Spacing: always use \`--vyre-spacing-*\` — never raw px values in component code
|
|
256
|
+
7. Transitions: use \`--vyre-transition-duration-*\` and \`--vyre-transition-easing-*\`
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
## Common Patterns
|
|
261
|
+
|
|
262
|
+
### Page layout with sidebar
|
|
263
|
+
\`\`\`tsx
|
|
264
|
+
<div style={{ display: "grid", gridTemplateColumns: "260px 1fr", minHeight: "100vh" }}>
|
|
265
|
+
<aside style={{ background: "var(--vyre-color-semantic-surface)", borderRight: "1px solid var(--vyre-color-semantic-border-subtle)" }}>
|
|
266
|
+
{/* sidebar content */}
|
|
267
|
+
</aside>
|
|
268
|
+
<main style={{ padding: "var(--vyre-spacing-12)" }}>
|
|
269
|
+
{/* main content */}
|
|
270
|
+
</main>
|
|
271
|
+
</div>
|
|
272
|
+
\`\`\`
|
|
273
|
+
|
|
274
|
+
### Form with validation
|
|
275
|
+
\`\`\`tsx
|
|
276
|
+
<form>
|
|
277
|
+
<Field label="Email" state={errors.email ? "error" : "idle"} hint={errors.email}>
|
|
278
|
+
<Input type="email" value={email} onChange={e => setEmail(e.target.value)} />
|
|
279
|
+
</Field>
|
|
280
|
+
<Button variant="accent" type="submit" loading={isSubmitting}>
|
|
281
|
+
Submit
|
|
282
|
+
</Button>
|
|
283
|
+
</form>
|
|
284
|
+
\`\`\`
|
|
285
|
+
|
|
286
|
+
### Status badge with live indicator
|
|
287
|
+
\`\`\`tsx
|
|
288
|
+
<Badge variant="success" dot>Live</Badge>
|
|
289
|
+
<Badge variant="danger" dot>Offline</Badge>
|
|
290
|
+
<Badge variant="warning">Beta</Badge>
|
|
291
|
+
\`\`\`
|
|
292
|
+
`;
|
|
293
|
+
export const cursorRules = `---
|
|
294
|
+
description: useVyre design system rules — follow these when writing UI code
|
|
295
|
+
alwaysApply: true
|
|
296
|
+
---
|
|
297
|
+
|
|
298
|
+
# useVyre Design System — AI Context
|
|
299
|
+
# Version: 0.1.0
|
|
300
|
+
# Include this file in your AI agent's system prompt, .cursor/rules, or CLAUDE.md
|
|
301
|
+
# Source: https://usevyre.com/ai-context
|
|
302
|
+
|
|
303
|
+
---
|
|
304
|
+
|
|
305
|
+
## What is useVyre?
|
|
306
|
+
|
|
307
|
+
useVyre is an AI-native design system for React and Vue. It uses CSS custom properties
|
|
308
|
+
(variables) as its single source of truth, making it inherently AI-friendly — no magic,
|
|
309
|
+
no runtime transforms, just semantic token names that describe intent.
|
|
310
|
+
|
|
311
|
+
---
|
|
312
|
+
|
|
313
|
+
## Installation
|
|
314
|
+
|
|
315
|
+
\`\`\`bash
|
|
316
|
+
# Tokens (required by everything)
|
|
317
|
+
pnpm add @usevyre/tokens
|
|
318
|
+
|
|
319
|
+
# React components
|
|
320
|
+
pnpm add @usevyre/react
|
|
321
|
+
|
|
322
|
+
# Vue components
|
|
323
|
+
pnpm add @usevyre/vue
|
|
324
|
+
\`\`\`
|
|
325
|
+
|
|
326
|
+
## CSS Setup
|
|
327
|
+
|
|
328
|
+
\`\`\`css
|
|
329
|
+
/* In your global CSS entry point */
|
|
330
|
+
@import "@usevyre/tokens/css"; /* design tokens */
|
|
331
|
+
@import "@usevyre/react/styles"; /* component styles (React) */
|
|
332
|
+
/* or */
|
|
333
|
+
@import "@usevyre/vue/styles"; /* component styles (Vue) */
|
|
334
|
+
\`\`\`
|
|
335
|
+
|
|
336
|
+
---
|
|
337
|
+
|
|
338
|
+
## Token Naming Convention
|
|
339
|
+
|
|
340
|
+
ALL tokens follow this pattern:
|
|
341
|
+
\`\`\`
|
|
342
|
+
--vyre-[category]-[subcategory]-[variant]
|
|
343
|
+
\`\`\`
|
|
344
|
+
|
|
345
|
+
Examples:
|
|
346
|
+
- \`--vyre-color-semantic-accent\` ✅ Use this
|
|
347
|
+
- \`--vyre-color-primitive-amber-400\` ❌ Never use primitives in components
|
|
348
|
+
- \`--vyre-spacing-4\` ✅ 16px spacing
|
|
349
|
+
- \`--vyre-typography-font-size-sm\` ✅ 13px font size
|
|
350
|
+
|
|
351
|
+
---
|
|
352
|
+
|
|
353
|
+
## Semantic Color Tokens (use these in ALL component styling)
|
|
354
|
+
|
|
355
|
+
### Surface layers (background → foreground)
|
|
356
|
+
- \`--vyre-color-semantic-background\` Page background. Deepest layer.
|
|
357
|
+
- \`--vyre-color-semantic-surface\` Cards, panels, sidebars.
|
|
358
|
+
- \`--vyre-color-semantic-surface-raised\` Dropdowns, inputs, elevated cards.
|
|
359
|
+
- \`--vyre-color-semantic-surface-overlay\` Modals, tooltips.
|
|
360
|
+
|
|
361
|
+
### Borders
|
|
362
|
+
- \`--vyre-color-semantic-border-subtle\` Dividers, subtle separators.
|
|
363
|
+
- \`--vyre-color-semantic-border\` Default card/input borders.
|
|
364
|
+
- \`--vyre-color-semantic-border-strong\` Focus rings, selected states.
|
|
365
|
+
|
|
366
|
+
### Text hierarchy
|
|
367
|
+
- \`--vyre-color-semantic-text-primary\` Headings, body text.
|
|
368
|
+
- \`--vyre-color-semantic-text-secondary\` Subtitles, descriptions.
|
|
369
|
+
- \`--vyre-color-semantic-text-muted\` Placeholders, helper text.
|
|
370
|
+
- \`--vyre-color-semantic-text-disabled\` Disabled state text.
|
|
371
|
+
- \`--vyre-color-semantic-text-inverse\` Text on light/accent backgrounds.
|
|
372
|
+
|
|
373
|
+
### Brand colors
|
|
374
|
+
- \`--vyre-color-semantic-accent\` Primary CTA, highlights. (amber)
|
|
375
|
+
- \`--vyre-color-semantic-accent-hover\` Hover for accent elements.
|
|
376
|
+
- \`--vyre-color-semantic-accent-subtle\` Low-opacity accent backgrounds.
|
|
377
|
+
- \`--vyre-color-semantic-teal\` Secondary accent. Code, success. (teal)
|
|
378
|
+
- \`--vyre-color-semantic-teal-hover\` Hover for teal elements.
|
|
379
|
+
- \`--vyre-color-semantic-teal-subtle\` Low-opacity teal backgrounds.
|
|
380
|
+
|
|
381
|
+
### Semantic status colors
|
|
382
|
+
- \`--vyre-color-semantic-success\` Confirmations, complete states.
|
|
383
|
+
- \`--vyre-color-semantic-success-subtle\` Success badge backgrounds.
|
|
384
|
+
- \`--vyre-color-semantic-warning\` Warnings, beta indicators.
|
|
385
|
+
- \`--vyre-color-semantic-warning-subtle\` Warning badge backgrounds.
|
|
386
|
+
- \`--vyre-color-semantic-danger\` Errors, destructive actions.
|
|
387
|
+
- \`--vyre-color-semantic-danger-hover\` Hover for danger elements.
|
|
388
|
+
- \`--vyre-color-semantic-danger-subtle\` Error badge backgrounds.
|
|
389
|
+
|
|
390
|
+
---
|
|
391
|
+
|
|
392
|
+
## Typography Tokens
|
|
393
|
+
|
|
394
|
+
### Font families
|
|
395
|
+
- \`--vyre-typography-font-family-display\` Headlines, hero text (serif)
|
|
396
|
+
- \`--vyre-typography-font-family-body\` UI text, labels, body copy (sans-serif)
|
|
397
|
+
- \`--vyre-typography-font-family-mono\` Code, tokens, technical text (monospace)
|
|
398
|
+
|
|
399
|
+
### Font sizes
|
|
400
|
+
- \`--vyre-typography-font-size-2xs\` 10px — tiny labels
|
|
401
|
+
- \`--vyre-typography-font-size-xs\` 11px — badge text, captions
|
|
402
|
+
- \`--vyre-typography-font-size-sm\` 13px — default UI text, buttons
|
|
403
|
+
- \`--vyre-typography-font-size-md\` 15px — body text
|
|
404
|
+
- \`--vyre-typography-font-size-lg\` 18px — large body, small headings
|
|
405
|
+
- \`--vyre-typography-font-size-xl\` 22px — section headings
|
|
406
|
+
- \`--vyre-typography-font-size-2xl\` 28px — page headings
|
|
407
|
+
- \`--vyre-typography-font-size-3xl\` 36px — large headings
|
|
408
|
+
- \`--vyre-typography-font-size-4xl\` 48px — hero headings
|
|
409
|
+
- \`--vyre-typography-font-size-5xl\` 64px — display headings
|
|
410
|
+
|
|
411
|
+
### Font weights
|
|
412
|
+
- \`--vyre-typography-font-weight-light\` 300
|
|
413
|
+
- \`--vyre-typography-font-weight-regular\` 400
|
|
414
|
+
- \`--vyre-typography-font-weight-medium\` 500
|
|
415
|
+
- \`--vyre-typography-font-weight-semibold\` 600
|
|
416
|
+
- \`--vyre-typography-font-weight-bold\` 700
|
|
417
|
+
|
|
418
|
+
---
|
|
419
|
+
|
|
420
|
+
## Spacing Tokens (4px base grid)
|
|
421
|
+
|
|
422
|
+
- \`--vyre-spacing-1\` 4px
|
|
423
|
+
- \`--vyre-spacing-2\` 8px
|
|
424
|
+
- \`--vyre-spacing-3\` 12px
|
|
425
|
+
- \`--vyre-spacing-4\` 16px
|
|
426
|
+
- \`--vyre-spacing-5\` 20px
|
|
427
|
+
- \`--vyre-spacing-6\` 24px
|
|
428
|
+
- \`--vyre-spacing-8\` 32px
|
|
429
|
+
- \`--vyre-spacing-10\` 40px
|
|
430
|
+
- \`--vyre-spacing-12\` 48px
|
|
431
|
+
- \`--vyre-spacing-16\` 64px
|
|
432
|
+
- \`--vyre-spacing-20\` 80px
|
|
433
|
+
- \`--vyre-spacing-24\` 96px
|
|
434
|
+
|
|
435
|
+
---
|
|
436
|
+
|
|
437
|
+
## Border Radius Tokens
|
|
438
|
+
|
|
439
|
+
- \`--vyre-border-radius-none\` 0
|
|
440
|
+
- \`--vyre-border-radius-sm\` 4px — tight corners
|
|
441
|
+
- \`--vyre-border-radius-md\` 8px — default components
|
|
442
|
+
- \`--vyre-border-radius-lg\` 12px — cards, panels
|
|
443
|
+
- \`--vyre-border-radius-xl\` 16px — large cards
|
|
444
|
+
- \`--vyre-border-radius-2xl\` 24px — modals, sheets
|
|
445
|
+
- \`--vyre-border-radius-full\` 9999px — badges, pills, avatars
|
|
446
|
+
|
|
447
|
+
---
|
|
448
|
+
|
|
449
|
+
## Component API Reference
|
|
450
|
+
|
|
451
|
+
### Button
|
|
452
|
+
|
|
453
|
+
\`\`\`tsx
|
|
454
|
+
import { Button } from "@usevyre/react"
|
|
455
|
+
|
|
456
|
+
// Props:
|
|
457
|
+
// variant = "primary" | "secondary" | "ghost" | "accent" | "teal" | "danger"
|
|
458
|
+
// size = "sm" | "md" | "lg" | "icon"
|
|
459
|
+
// loading = boolean
|
|
460
|
+
// disabled = boolean
|
|
461
|
+
// as = React.ElementType (default: "button")
|
|
462
|
+
// leftIcon = ReactNode
|
|
463
|
+
// rightIcon = ReactNode
|
|
464
|
+
|
|
465
|
+
// Examples:
|
|
466
|
+
<Button variant="accent" size="lg">Get Started</Button>
|
|
467
|
+
<Button variant="ghost" size="sm">Cancel</Button>
|
|
468
|
+
<Button variant="danger" loading>Deleting...</Button>
|
|
469
|
+
<Button as="a" href="/docs" variant="secondary">Read Docs</Button>
|
|
470
|
+
\`\`\`
|
|
471
|
+
|
|
472
|
+
### Badge
|
|
473
|
+
|
|
474
|
+
\`\`\`tsx
|
|
475
|
+
import { Badge } from "@usevyre/react"
|
|
476
|
+
|
|
477
|
+
// Props:
|
|
478
|
+
// variant = "default" | "accent" | "teal" | "success" | "warning" | "danger"
|
|
479
|
+
// dot = boolean (live status indicator dot)
|
|
480
|
+
|
|
481
|
+
// Examples:
|
|
482
|
+
<Badge variant="success" dot>Online</Badge>
|
|
483
|
+
<Badge variant="warning">Beta</Badge>
|
|
484
|
+
<Badge variant="danger">Error</Badge>
|
|
485
|
+
\`\`\`
|
|
486
|
+
|
|
487
|
+
### Card
|
|
488
|
+
|
|
489
|
+
\`\`\`tsx
|
|
490
|
+
import { Card, CardHeader, CardBody, CardFooter } from "@usevyre/react"
|
|
491
|
+
|
|
492
|
+
// Card props:
|
|
493
|
+
// variant = "default" | "elevated" | "outlined" | "ghost" | "accent"
|
|
494
|
+
// hoverable = boolean
|
|
495
|
+
// clickable = boolean
|
|
496
|
+
|
|
497
|
+
// Examples:
|
|
498
|
+
<Card variant="elevated">
|
|
499
|
+
<CardHeader>
|
|
500
|
+
<Badge variant="teal">New</Badge>
|
|
501
|
+
</CardHeader>
|
|
502
|
+
<CardBody>
|
|
503
|
+
<h3>Card Title</h3>
|
|
504
|
+
<p>Description text.</p>
|
|
505
|
+
</CardBody>
|
|
506
|
+
<CardFooter>
|
|
507
|
+
<Button variant="ghost" size="sm">Learn more</Button>
|
|
508
|
+
</CardFooter>
|
|
509
|
+
</Card>
|
|
510
|
+
\`\`\`
|
|
511
|
+
|
|
512
|
+
### Field + Input + Textarea
|
|
513
|
+
|
|
514
|
+
\`\`\`tsx
|
|
515
|
+
import { Field, Input, Textarea } from "@usevyre/react"
|
|
516
|
+
|
|
517
|
+
// Field props:
|
|
518
|
+
// label = string
|
|
519
|
+
// hint = string
|
|
520
|
+
// state = "idle" | "error" | "success" | "warning"
|
|
521
|
+
// required = boolean
|
|
522
|
+
|
|
523
|
+
// Input props:
|
|
524
|
+
// size = "sm" | "md" | "lg"
|
|
525
|
+
// leftElement = ReactNode
|
|
526
|
+
// rightElement = ReactNode
|
|
527
|
+
// + all native input props
|
|
528
|
+
|
|
529
|
+
// Examples:
|
|
530
|
+
<Field label="Email" state="error" hint="Invalid format">
|
|
531
|
+
<Input type="email" placeholder="you@example.com" />
|
|
532
|
+
</Field>
|
|
533
|
+
|
|
534
|
+
<Field label="Search">
|
|
535
|
+
<Input leftElement={<SearchIcon />} placeholder="Search..." />
|
|
536
|
+
</Field>
|
|
537
|
+
|
|
538
|
+
<Field label="Bio">
|
|
539
|
+
<Textarea rows={4} placeholder="Tell us about yourself..." />
|
|
540
|
+
</Field>
|
|
541
|
+
\`\`\`
|
|
542
|
+
|
|
543
|
+
---
|
|
544
|
+
|
|
545
|
+
## Styling Rules for AI Agents
|
|
546
|
+
|
|
547
|
+
1. ALWAYS use semantic tokens (\`--vyre-color-semantic-*\`), never primitive tokens
|
|
548
|
+
2. NEVER hardcode colors — every color decision has a semantic token
|
|
549
|
+
3. Text hierarchy: \`text-primary\` → \`text-secondary\` → \`text-muted\` → \`text-disabled\`
|
|
550
|
+
4. Interactive hover states: add \`-hover\` suffix to base token
|
|
551
|
+
5. Low-opacity backgrounds: use \`-subtle\` suffix tokens
|
|
552
|
+
6. Spacing: always use \`--vyre-spacing-*\` — never raw px values in component code
|
|
553
|
+
7. Transitions: use \`--vyre-transition-duration-*\` and \`--vyre-transition-easing-*\`
|
|
554
|
+
|
|
555
|
+
---
|
|
556
|
+
|
|
557
|
+
## Common Patterns
|
|
558
|
+
|
|
559
|
+
### Page layout with sidebar
|
|
560
|
+
\`\`\`tsx
|
|
561
|
+
<div style={{ display: "grid", gridTemplateColumns: "260px 1fr", minHeight: "100vh" }}>
|
|
562
|
+
<aside style={{ background: "var(--vyre-color-semantic-surface)", borderRight: "1px solid var(--vyre-color-semantic-border-subtle)" }}>
|
|
563
|
+
{/* sidebar content */}
|
|
564
|
+
</aside>
|
|
565
|
+
<main style={{ padding: "var(--vyre-spacing-12)" }}>
|
|
566
|
+
{/* main content */}
|
|
567
|
+
</main>
|
|
568
|
+
</div>
|
|
569
|
+
\`\`\`
|
|
570
|
+
|
|
571
|
+
### Form with validation
|
|
572
|
+
\`\`\`tsx
|
|
573
|
+
<form>
|
|
574
|
+
<Field label="Email" state={errors.email ? "error" : "idle"} hint={errors.email}>
|
|
575
|
+
<Input type="email" value={email} onChange={e => setEmail(e.target.value)} />
|
|
576
|
+
</Field>
|
|
577
|
+
<Button variant="accent" type="submit" loading={isSubmitting}>
|
|
578
|
+
Submit
|
|
579
|
+
</Button>
|
|
580
|
+
</form>
|
|
581
|
+
\`\`\`
|
|
582
|
+
|
|
583
|
+
### Status badge with live indicator
|
|
584
|
+
\`\`\`tsx
|
|
585
|
+
<Badge variant="success" dot>Live</Badge>
|
|
586
|
+
<Badge variant="danger" dot>Offline</Badge>
|
|
587
|
+
<Badge variant="warning">Beta</Badge>
|
|
588
|
+
\`\`\`
|
|
589
|
+
`;
|
|
590
|
+
export const claudeContext = `# useVyre Design System Context
|
|
591
|
+
|
|
592
|
+
You are working in a codebase that uses the useVyre design system.
|
|
593
|
+
Follow the rules below strictly when writing any UI code.
|
|
594
|
+
|
|
595
|
+
# useVyre Design System — AI Context
|
|
596
|
+
# Version: 0.1.0
|
|
597
|
+
# Include this file in your AI agent's system prompt, .cursor/rules, or CLAUDE.md
|
|
598
|
+
# Source: https://usevyre.com/ai-context
|
|
599
|
+
|
|
600
|
+
---
|
|
601
|
+
|
|
602
|
+
## What is useVyre?
|
|
603
|
+
|
|
604
|
+
useVyre is an AI-native design system for React and Vue. It uses CSS custom properties
|
|
605
|
+
(variables) as its single source of truth, making it inherently AI-friendly — no magic,
|
|
606
|
+
no runtime transforms, just semantic token names that describe intent.
|
|
607
|
+
|
|
608
|
+
---
|
|
609
|
+
|
|
610
|
+
## Installation
|
|
611
|
+
|
|
612
|
+
\`\`\`bash
|
|
613
|
+
# Tokens (required by everything)
|
|
614
|
+
pnpm add @usevyre/tokens
|
|
615
|
+
|
|
616
|
+
# React components
|
|
617
|
+
pnpm add @usevyre/react
|
|
618
|
+
|
|
619
|
+
# Vue components
|
|
620
|
+
pnpm add @usevyre/vue
|
|
621
|
+
\`\`\`
|
|
622
|
+
|
|
623
|
+
## CSS Setup
|
|
624
|
+
|
|
625
|
+
\`\`\`css
|
|
626
|
+
/* In your global CSS entry point */
|
|
627
|
+
@import "@usevyre/tokens/css"; /* design tokens */
|
|
628
|
+
@import "@usevyre/react/styles"; /* component styles (React) */
|
|
629
|
+
/* or */
|
|
630
|
+
@import "@usevyre/vue/styles"; /* component styles (Vue) */
|
|
631
|
+
\`\`\`
|
|
632
|
+
|
|
633
|
+
---
|
|
634
|
+
|
|
635
|
+
## Token Naming Convention
|
|
636
|
+
|
|
637
|
+
ALL tokens follow this pattern:
|
|
638
|
+
\`\`\`
|
|
639
|
+
--vyre-[category]-[subcategory]-[variant]
|
|
640
|
+
\`\`\`
|
|
641
|
+
|
|
642
|
+
Examples:
|
|
643
|
+
- \`--vyre-color-semantic-accent\` ✅ Use this
|
|
644
|
+
- \`--vyre-color-primitive-amber-400\` ❌ Never use primitives in components
|
|
645
|
+
- \`--vyre-spacing-4\` ✅ 16px spacing
|
|
646
|
+
- \`--vyre-typography-font-size-sm\` ✅ 13px font size
|
|
647
|
+
|
|
648
|
+
---
|
|
649
|
+
|
|
650
|
+
## Semantic Color Tokens (use these in ALL component styling)
|
|
651
|
+
|
|
652
|
+
### Surface layers (background → foreground)
|
|
653
|
+
- \`--vyre-color-semantic-background\` Page background. Deepest layer.
|
|
654
|
+
- \`--vyre-color-semantic-surface\` Cards, panels, sidebars.
|
|
655
|
+
- \`--vyre-color-semantic-surface-raised\` Dropdowns, inputs, elevated cards.
|
|
656
|
+
- \`--vyre-color-semantic-surface-overlay\` Modals, tooltips.
|
|
657
|
+
|
|
658
|
+
### Borders
|
|
659
|
+
- \`--vyre-color-semantic-border-subtle\` Dividers, subtle separators.
|
|
660
|
+
- \`--vyre-color-semantic-border\` Default card/input borders.
|
|
661
|
+
- \`--vyre-color-semantic-border-strong\` Focus rings, selected states.
|
|
662
|
+
|
|
663
|
+
### Text hierarchy
|
|
664
|
+
- \`--vyre-color-semantic-text-primary\` Headings, body text.
|
|
665
|
+
- \`--vyre-color-semantic-text-secondary\` Subtitles, descriptions.
|
|
666
|
+
- \`--vyre-color-semantic-text-muted\` Placeholders, helper text.
|
|
667
|
+
- \`--vyre-color-semantic-text-disabled\` Disabled state text.
|
|
668
|
+
- \`--vyre-color-semantic-text-inverse\` Text on light/accent backgrounds.
|
|
669
|
+
|
|
670
|
+
### Brand colors
|
|
671
|
+
- \`--vyre-color-semantic-accent\` Primary CTA, highlights. (amber)
|
|
672
|
+
- \`--vyre-color-semantic-accent-hover\` Hover for accent elements.
|
|
673
|
+
- \`--vyre-color-semantic-accent-subtle\` Low-opacity accent backgrounds.
|
|
674
|
+
- \`--vyre-color-semantic-teal\` Secondary accent. Code, success. (teal)
|
|
675
|
+
- \`--vyre-color-semantic-teal-hover\` Hover for teal elements.
|
|
676
|
+
- \`--vyre-color-semantic-teal-subtle\` Low-opacity teal backgrounds.
|
|
677
|
+
|
|
678
|
+
### Semantic status colors
|
|
679
|
+
- \`--vyre-color-semantic-success\` Confirmations, complete states.
|
|
680
|
+
- \`--vyre-color-semantic-success-subtle\` Success badge backgrounds.
|
|
681
|
+
- \`--vyre-color-semantic-warning\` Warnings, beta indicators.
|
|
682
|
+
- \`--vyre-color-semantic-warning-subtle\` Warning badge backgrounds.
|
|
683
|
+
- \`--vyre-color-semantic-danger\` Errors, destructive actions.
|
|
684
|
+
- \`--vyre-color-semantic-danger-hover\` Hover for danger elements.
|
|
685
|
+
- \`--vyre-color-semantic-danger-subtle\` Error badge backgrounds.
|
|
686
|
+
|
|
687
|
+
---
|
|
688
|
+
|
|
689
|
+
## Typography Tokens
|
|
690
|
+
|
|
691
|
+
### Font families
|
|
692
|
+
- \`--vyre-typography-font-family-display\` Headlines, hero text (serif)
|
|
693
|
+
- \`--vyre-typography-font-family-body\` UI text, labels, body copy (sans-serif)
|
|
694
|
+
- \`--vyre-typography-font-family-mono\` Code, tokens, technical text (monospace)
|
|
695
|
+
|
|
696
|
+
### Font sizes
|
|
697
|
+
- \`--vyre-typography-font-size-2xs\` 10px — tiny labels
|
|
698
|
+
- \`--vyre-typography-font-size-xs\` 11px — badge text, captions
|
|
699
|
+
- \`--vyre-typography-font-size-sm\` 13px — default UI text, buttons
|
|
700
|
+
- \`--vyre-typography-font-size-md\` 15px — body text
|
|
701
|
+
- \`--vyre-typography-font-size-lg\` 18px — large body, small headings
|
|
702
|
+
- \`--vyre-typography-font-size-xl\` 22px — section headings
|
|
703
|
+
- \`--vyre-typography-font-size-2xl\` 28px — page headings
|
|
704
|
+
- \`--vyre-typography-font-size-3xl\` 36px — large headings
|
|
705
|
+
- \`--vyre-typography-font-size-4xl\` 48px — hero headings
|
|
706
|
+
- \`--vyre-typography-font-size-5xl\` 64px — display headings
|
|
707
|
+
|
|
708
|
+
### Font weights
|
|
709
|
+
- \`--vyre-typography-font-weight-light\` 300
|
|
710
|
+
- \`--vyre-typography-font-weight-regular\` 400
|
|
711
|
+
- \`--vyre-typography-font-weight-medium\` 500
|
|
712
|
+
- \`--vyre-typography-font-weight-semibold\` 600
|
|
713
|
+
- \`--vyre-typography-font-weight-bold\` 700
|
|
714
|
+
|
|
715
|
+
---
|
|
716
|
+
|
|
717
|
+
## Spacing Tokens (4px base grid)
|
|
718
|
+
|
|
719
|
+
- \`--vyre-spacing-1\` 4px
|
|
720
|
+
- \`--vyre-spacing-2\` 8px
|
|
721
|
+
- \`--vyre-spacing-3\` 12px
|
|
722
|
+
- \`--vyre-spacing-4\` 16px
|
|
723
|
+
- \`--vyre-spacing-5\` 20px
|
|
724
|
+
- \`--vyre-spacing-6\` 24px
|
|
725
|
+
- \`--vyre-spacing-8\` 32px
|
|
726
|
+
- \`--vyre-spacing-10\` 40px
|
|
727
|
+
- \`--vyre-spacing-12\` 48px
|
|
728
|
+
- \`--vyre-spacing-16\` 64px
|
|
729
|
+
- \`--vyre-spacing-20\` 80px
|
|
730
|
+
- \`--vyre-spacing-24\` 96px
|
|
731
|
+
|
|
732
|
+
---
|
|
733
|
+
|
|
734
|
+
## Border Radius Tokens
|
|
735
|
+
|
|
736
|
+
- \`--vyre-border-radius-none\` 0
|
|
737
|
+
- \`--vyre-border-radius-sm\` 4px — tight corners
|
|
738
|
+
- \`--vyre-border-radius-md\` 8px — default components
|
|
739
|
+
- \`--vyre-border-radius-lg\` 12px — cards, panels
|
|
740
|
+
- \`--vyre-border-radius-xl\` 16px — large cards
|
|
741
|
+
- \`--vyre-border-radius-2xl\` 24px — modals, sheets
|
|
742
|
+
- \`--vyre-border-radius-full\` 9999px — badges, pills, avatars
|
|
743
|
+
|
|
744
|
+
---
|
|
745
|
+
|
|
746
|
+
## Component API Reference
|
|
747
|
+
|
|
748
|
+
### Button
|
|
749
|
+
|
|
750
|
+
\`\`\`tsx
|
|
751
|
+
import { Button } from "@usevyre/react"
|
|
752
|
+
|
|
753
|
+
// Props:
|
|
754
|
+
// variant = "primary" | "secondary" | "ghost" | "accent" | "teal" | "danger"
|
|
755
|
+
// size = "sm" | "md" | "lg" | "icon"
|
|
756
|
+
// loading = boolean
|
|
757
|
+
// disabled = boolean
|
|
758
|
+
// as = React.ElementType (default: "button")
|
|
759
|
+
// leftIcon = ReactNode
|
|
760
|
+
// rightIcon = ReactNode
|
|
761
|
+
|
|
762
|
+
// Examples:
|
|
763
|
+
<Button variant="accent" size="lg">Get Started</Button>
|
|
764
|
+
<Button variant="ghost" size="sm">Cancel</Button>
|
|
765
|
+
<Button variant="danger" loading>Deleting...</Button>
|
|
766
|
+
<Button as="a" href="/docs" variant="secondary">Read Docs</Button>
|
|
767
|
+
\`\`\`
|
|
768
|
+
|
|
769
|
+
### Badge
|
|
770
|
+
|
|
771
|
+
\`\`\`tsx
|
|
772
|
+
import { Badge } from "@usevyre/react"
|
|
773
|
+
|
|
774
|
+
// Props:
|
|
775
|
+
// variant = "default" | "accent" | "teal" | "success" | "warning" | "danger"
|
|
776
|
+
// dot = boolean (live status indicator dot)
|
|
777
|
+
|
|
778
|
+
// Examples:
|
|
779
|
+
<Badge variant="success" dot>Online</Badge>
|
|
780
|
+
<Badge variant="warning">Beta</Badge>
|
|
781
|
+
<Badge variant="danger">Error</Badge>
|
|
782
|
+
\`\`\`
|
|
783
|
+
|
|
784
|
+
### Card
|
|
785
|
+
|
|
786
|
+
\`\`\`tsx
|
|
787
|
+
import { Card, CardHeader, CardBody, CardFooter } from "@usevyre/react"
|
|
788
|
+
|
|
789
|
+
// Card props:
|
|
790
|
+
// variant = "default" | "elevated" | "outlined" | "ghost" | "accent"
|
|
791
|
+
// hoverable = boolean
|
|
792
|
+
// clickable = boolean
|
|
793
|
+
|
|
794
|
+
// Examples:
|
|
795
|
+
<Card variant="elevated">
|
|
796
|
+
<CardHeader>
|
|
797
|
+
<Badge variant="teal">New</Badge>
|
|
798
|
+
</CardHeader>
|
|
799
|
+
<CardBody>
|
|
800
|
+
<h3>Card Title</h3>
|
|
801
|
+
<p>Description text.</p>
|
|
802
|
+
</CardBody>
|
|
803
|
+
<CardFooter>
|
|
804
|
+
<Button variant="ghost" size="sm">Learn more</Button>
|
|
805
|
+
</CardFooter>
|
|
806
|
+
</Card>
|
|
807
|
+
\`\`\`
|
|
808
|
+
|
|
809
|
+
### Field + Input + Textarea
|
|
810
|
+
|
|
811
|
+
\`\`\`tsx
|
|
812
|
+
import { Field, Input, Textarea } from "@usevyre/react"
|
|
813
|
+
|
|
814
|
+
// Field props:
|
|
815
|
+
// label = string
|
|
816
|
+
// hint = string
|
|
817
|
+
// state = "idle" | "error" | "success" | "warning"
|
|
818
|
+
// required = boolean
|
|
819
|
+
|
|
820
|
+
// Input props:
|
|
821
|
+
// size = "sm" | "md" | "lg"
|
|
822
|
+
// leftElement = ReactNode
|
|
823
|
+
// rightElement = ReactNode
|
|
824
|
+
// + all native input props
|
|
825
|
+
|
|
826
|
+
// Examples:
|
|
827
|
+
<Field label="Email" state="error" hint="Invalid format">
|
|
828
|
+
<Input type="email" placeholder="you@example.com" />
|
|
829
|
+
</Field>
|
|
830
|
+
|
|
831
|
+
<Field label="Search">
|
|
832
|
+
<Input leftElement={<SearchIcon />} placeholder="Search..." />
|
|
833
|
+
</Field>
|
|
834
|
+
|
|
835
|
+
<Field label="Bio">
|
|
836
|
+
<Textarea rows={4} placeholder="Tell us about yourself..." />
|
|
837
|
+
</Field>
|
|
838
|
+
\`\`\`
|
|
839
|
+
|
|
840
|
+
---
|
|
841
|
+
|
|
842
|
+
## Styling Rules for AI Agents
|
|
843
|
+
|
|
844
|
+
1. ALWAYS use semantic tokens (\`--vyre-color-semantic-*\`), never primitive tokens
|
|
845
|
+
2. NEVER hardcode colors — every color decision has a semantic token
|
|
846
|
+
3. Text hierarchy: \`text-primary\` → \`text-secondary\` → \`text-muted\` → \`text-disabled\`
|
|
847
|
+
4. Interactive hover states: add \`-hover\` suffix to base token
|
|
848
|
+
5. Low-opacity backgrounds: use \`-subtle\` suffix tokens
|
|
849
|
+
6. Spacing: always use \`--vyre-spacing-*\` — never raw px values in component code
|
|
850
|
+
7. Transitions: use \`--vyre-transition-duration-*\` and \`--vyre-transition-easing-*\`
|
|
851
|
+
|
|
852
|
+
---
|
|
853
|
+
|
|
854
|
+
## Common Patterns
|
|
855
|
+
|
|
856
|
+
### Page layout with sidebar
|
|
857
|
+
\`\`\`tsx
|
|
858
|
+
<div style={{ display: "grid", gridTemplateColumns: "260px 1fr", minHeight: "100vh" }}>
|
|
859
|
+
<aside style={{ background: "var(--vyre-color-semantic-surface)", borderRight: "1px solid var(--vyre-color-semantic-border-subtle)" }}>
|
|
860
|
+
{/* sidebar content */}
|
|
861
|
+
</aside>
|
|
862
|
+
<main style={{ padding: "var(--vyre-spacing-12)" }}>
|
|
863
|
+
{/* main content */}
|
|
864
|
+
</main>
|
|
865
|
+
</div>
|
|
866
|
+
\`\`\`
|
|
867
|
+
|
|
868
|
+
### Form with validation
|
|
869
|
+
\`\`\`tsx
|
|
870
|
+
<form>
|
|
871
|
+
<Field label="Email" state={errors.email ? "error" : "idle"} hint={errors.email}>
|
|
872
|
+
<Input type="email" value={email} onChange={e => setEmail(e.target.value)} />
|
|
873
|
+
</Field>
|
|
874
|
+
<Button variant="accent" type="submit" loading={isSubmitting}>
|
|
875
|
+
Submit
|
|
876
|
+
</Button>
|
|
877
|
+
</form>
|
|
878
|
+
\`\`\`
|
|
879
|
+
|
|
880
|
+
### Status badge with live indicator
|
|
881
|
+
\`\`\`tsx
|
|
882
|
+
<Badge variant="success" dot>Live</Badge>
|
|
883
|
+
<Badge variant="danger" dot>Offline</Badge>
|
|
884
|
+
<Badge variant="warning">Beta</Badge>
|
|
885
|
+
\`\`\`
|
|
886
|
+
`;
|
|
887
|
+
export const windsurfRules = `# useVyre Rules for Windsurf
|
|
888
|
+
|
|
889
|
+
# useVyre Design System — AI Context
|
|
890
|
+
# Version: 0.1.0
|
|
891
|
+
# Include this file in your AI agent's system prompt, .cursor/rules, or CLAUDE.md
|
|
892
|
+
# Source: https://usevyre.com/ai-context
|
|
893
|
+
|
|
894
|
+
---
|
|
895
|
+
|
|
896
|
+
## What is useVyre?
|
|
897
|
+
|
|
898
|
+
useVyre is an AI-native design system for React and Vue. It uses CSS custom properties
|
|
899
|
+
(variables) as its single source of truth, making it inherently AI-friendly — no magic,
|
|
900
|
+
no runtime transforms, just semantic token names that describe intent.
|
|
901
|
+
|
|
902
|
+
---
|
|
903
|
+
|
|
904
|
+
## Installation
|
|
905
|
+
|
|
906
|
+
\`\`\`bash
|
|
907
|
+
# Tokens (required by everything)
|
|
908
|
+
pnpm add @usevyre/tokens
|
|
909
|
+
|
|
910
|
+
# React components
|
|
911
|
+
pnpm add @usevyre/react
|
|
912
|
+
|
|
913
|
+
# Vue components
|
|
914
|
+
pnpm add @usevyre/vue
|
|
915
|
+
\`\`\`
|
|
916
|
+
|
|
917
|
+
## CSS Setup
|
|
918
|
+
|
|
919
|
+
\`\`\`css
|
|
920
|
+
/* In your global CSS entry point */
|
|
921
|
+
@import "@usevyre/tokens/css"; /* design tokens */
|
|
922
|
+
@import "@usevyre/react/styles"; /* component styles (React) */
|
|
923
|
+
/* or */
|
|
924
|
+
@import "@usevyre/vue/styles"; /* component styles (Vue) */
|
|
925
|
+
\`\`\`
|
|
926
|
+
|
|
927
|
+
---
|
|
928
|
+
|
|
929
|
+
## Token Naming Convention
|
|
930
|
+
|
|
931
|
+
ALL tokens follow this pattern:
|
|
932
|
+
\`\`\`
|
|
933
|
+
--vyre-[category]-[subcategory]-[variant]
|
|
934
|
+
\`\`\`
|
|
935
|
+
|
|
936
|
+
Examples:
|
|
937
|
+
- \`--vyre-color-semantic-accent\` ✅ Use this
|
|
938
|
+
- \`--vyre-color-primitive-amber-400\` ❌ Never use primitives in components
|
|
939
|
+
- \`--vyre-spacing-4\` ✅ 16px spacing
|
|
940
|
+
- \`--vyre-typography-font-size-sm\` ✅ 13px font size
|
|
941
|
+
|
|
942
|
+
---
|
|
943
|
+
|
|
944
|
+
## Semantic Color Tokens (use these in ALL component styling)
|
|
945
|
+
|
|
946
|
+
### Surface layers (background → foreground)
|
|
947
|
+
- \`--vyre-color-semantic-background\` Page background. Deepest layer.
|
|
948
|
+
- \`--vyre-color-semantic-surface\` Cards, panels, sidebars.
|
|
949
|
+
- \`--vyre-color-semantic-surface-raised\` Dropdowns, inputs, elevated cards.
|
|
950
|
+
- \`--vyre-color-semantic-surface-overlay\` Modals, tooltips.
|
|
951
|
+
|
|
952
|
+
### Borders
|
|
953
|
+
- \`--vyre-color-semantic-border-subtle\` Dividers, subtle separators.
|
|
954
|
+
- \`--vyre-color-semantic-border\` Default card/input borders.
|
|
955
|
+
- \`--vyre-color-semantic-border-strong\` Focus rings, selected states.
|
|
956
|
+
|
|
957
|
+
### Text hierarchy
|
|
958
|
+
- \`--vyre-color-semantic-text-primary\` Headings, body text.
|
|
959
|
+
- \`--vyre-color-semantic-text-secondary\` Subtitles, descriptions.
|
|
960
|
+
- \`--vyre-color-semantic-text-muted\` Placeholders, helper text.
|
|
961
|
+
- \`--vyre-color-semantic-text-disabled\` Disabled state text.
|
|
962
|
+
- \`--vyre-color-semantic-text-inverse\` Text on light/accent backgrounds.
|
|
963
|
+
|
|
964
|
+
### Brand colors
|
|
965
|
+
- \`--vyre-color-semantic-accent\` Primary CTA, highlights. (amber)
|
|
966
|
+
- \`--vyre-color-semantic-accent-hover\` Hover for accent elements.
|
|
967
|
+
- \`--vyre-color-semantic-accent-subtle\` Low-opacity accent backgrounds.
|
|
968
|
+
- \`--vyre-color-semantic-teal\` Secondary accent. Code, success. (teal)
|
|
969
|
+
- \`--vyre-color-semantic-teal-hover\` Hover for teal elements.
|
|
970
|
+
- \`--vyre-color-semantic-teal-subtle\` Low-opacity teal backgrounds.
|
|
971
|
+
|
|
972
|
+
### Semantic status colors
|
|
973
|
+
- \`--vyre-color-semantic-success\` Confirmations, complete states.
|
|
974
|
+
- \`--vyre-color-semantic-success-subtle\` Success badge backgrounds.
|
|
975
|
+
- \`--vyre-color-semantic-warning\` Warnings, beta indicators.
|
|
976
|
+
- \`--vyre-color-semantic-warning-subtle\` Warning badge backgrounds.
|
|
977
|
+
- \`--vyre-color-semantic-danger\` Errors, destructive actions.
|
|
978
|
+
- \`--vyre-color-semantic-danger-hover\` Hover for danger elements.
|
|
979
|
+
- \`--vyre-color-semantic-danger-subtle\` Error badge backgrounds.
|
|
980
|
+
|
|
981
|
+
---
|
|
982
|
+
|
|
983
|
+
## Typography Tokens
|
|
984
|
+
|
|
985
|
+
### Font families
|
|
986
|
+
- \`--vyre-typography-font-family-display\` Headlines, hero text (serif)
|
|
987
|
+
- \`--vyre-typography-font-family-body\` UI text, labels, body copy (sans-serif)
|
|
988
|
+
- \`--vyre-typography-font-family-mono\` Code, tokens, technical text (monospace)
|
|
989
|
+
|
|
990
|
+
### Font sizes
|
|
991
|
+
- \`--vyre-typography-font-size-2xs\` 10px — tiny labels
|
|
992
|
+
- \`--vyre-typography-font-size-xs\` 11px — badge text, captions
|
|
993
|
+
- \`--vyre-typography-font-size-sm\` 13px — default UI text, buttons
|
|
994
|
+
- \`--vyre-typography-font-size-md\` 15px — body text
|
|
995
|
+
- \`--vyre-typography-font-size-lg\` 18px — large body, small headings
|
|
996
|
+
- \`--vyre-typography-font-size-xl\` 22px — section headings
|
|
997
|
+
- \`--vyre-typography-font-size-2xl\` 28px — page headings
|
|
998
|
+
- \`--vyre-typography-font-size-3xl\` 36px — large headings
|
|
999
|
+
- \`--vyre-typography-font-size-4xl\` 48px — hero headings
|
|
1000
|
+
- \`--vyre-typography-font-size-5xl\` 64px — display headings
|
|
1001
|
+
|
|
1002
|
+
### Font weights
|
|
1003
|
+
- \`--vyre-typography-font-weight-light\` 300
|
|
1004
|
+
- \`--vyre-typography-font-weight-regular\` 400
|
|
1005
|
+
- \`--vyre-typography-font-weight-medium\` 500
|
|
1006
|
+
- \`--vyre-typography-font-weight-semibold\` 600
|
|
1007
|
+
- \`--vyre-typography-font-weight-bold\` 700
|
|
1008
|
+
|
|
1009
|
+
---
|
|
1010
|
+
|
|
1011
|
+
## Spacing Tokens (4px base grid)
|
|
1012
|
+
|
|
1013
|
+
- \`--vyre-spacing-1\` 4px
|
|
1014
|
+
- \`--vyre-spacing-2\` 8px
|
|
1015
|
+
- \`--vyre-spacing-3\` 12px
|
|
1016
|
+
- \`--vyre-spacing-4\` 16px
|
|
1017
|
+
- \`--vyre-spacing-5\` 20px
|
|
1018
|
+
- \`--vyre-spacing-6\` 24px
|
|
1019
|
+
- \`--vyre-spacing-8\` 32px
|
|
1020
|
+
- \`--vyre-spacing-10\` 40px
|
|
1021
|
+
- \`--vyre-spacing-12\` 48px
|
|
1022
|
+
- \`--vyre-spacing-16\` 64px
|
|
1023
|
+
- \`--vyre-spacing-20\` 80px
|
|
1024
|
+
- \`--vyre-spacing-24\` 96px
|
|
1025
|
+
|
|
1026
|
+
---
|
|
1027
|
+
|
|
1028
|
+
## Border Radius Tokens
|
|
1029
|
+
|
|
1030
|
+
- \`--vyre-border-radius-none\` 0
|
|
1031
|
+
- \`--vyre-border-radius-sm\` 4px — tight corners
|
|
1032
|
+
- \`--vyre-border-radius-md\` 8px — default components
|
|
1033
|
+
- \`--vyre-border-radius-lg\` 12px — cards, panels
|
|
1034
|
+
- \`--vyre-border-radius-xl\` 16px — large cards
|
|
1035
|
+
- \`--vyre-border-radius-2xl\` 24px — modals, sheets
|
|
1036
|
+
- \`--vyre-border-radius-full\` 9999px — badges, pills, avatars
|
|
1037
|
+
|
|
1038
|
+
---
|
|
1039
|
+
|
|
1040
|
+
## Component API Reference
|
|
1041
|
+
|
|
1042
|
+
### Button
|
|
1043
|
+
|
|
1044
|
+
\`\`\`tsx
|
|
1045
|
+
import { Button } from "@usevyre/react"
|
|
1046
|
+
|
|
1047
|
+
// Props:
|
|
1048
|
+
// variant = "primary" | "secondary" | "ghost" | "accent" | "teal" | "danger"
|
|
1049
|
+
// size = "sm" | "md" | "lg" | "icon"
|
|
1050
|
+
// loading = boolean
|
|
1051
|
+
// disabled = boolean
|
|
1052
|
+
// as = React.ElementType (default: "button")
|
|
1053
|
+
// leftIcon = ReactNode
|
|
1054
|
+
// rightIcon = ReactNode
|
|
1055
|
+
|
|
1056
|
+
// Examples:
|
|
1057
|
+
<Button variant="accent" size="lg">Get Started</Button>
|
|
1058
|
+
<Button variant="ghost" size="sm">Cancel</Button>
|
|
1059
|
+
<Button variant="danger" loading>Deleting...</Button>
|
|
1060
|
+
<Button as="a" href="/docs" variant="secondary">Read Docs</Button>
|
|
1061
|
+
\`\`\`
|
|
1062
|
+
|
|
1063
|
+
### Badge
|
|
1064
|
+
|
|
1065
|
+
\`\`\`tsx
|
|
1066
|
+
import { Badge } from "@usevyre/react"
|
|
1067
|
+
|
|
1068
|
+
// Props:
|
|
1069
|
+
// variant = "default" | "accent" | "teal" | "success" | "warning" | "danger"
|
|
1070
|
+
// dot = boolean (live status indicator dot)
|
|
1071
|
+
|
|
1072
|
+
// Examples:
|
|
1073
|
+
<Badge variant="success" dot>Online</Badge>
|
|
1074
|
+
<Badge variant="warning">Beta</Badge>
|
|
1075
|
+
<Badge variant="danger">Error</Badge>
|
|
1076
|
+
\`\`\`
|
|
1077
|
+
|
|
1078
|
+
### Card
|
|
1079
|
+
|
|
1080
|
+
\`\`\`tsx
|
|
1081
|
+
import { Card, CardHeader, CardBody, CardFooter } from "@usevyre/react"
|
|
1082
|
+
|
|
1083
|
+
// Card props:
|
|
1084
|
+
// variant = "default" | "elevated" | "outlined" | "ghost" | "accent"
|
|
1085
|
+
// hoverable = boolean
|
|
1086
|
+
// clickable = boolean
|
|
1087
|
+
|
|
1088
|
+
// Examples:
|
|
1089
|
+
<Card variant="elevated">
|
|
1090
|
+
<CardHeader>
|
|
1091
|
+
<Badge variant="teal">New</Badge>
|
|
1092
|
+
</CardHeader>
|
|
1093
|
+
<CardBody>
|
|
1094
|
+
<h3>Card Title</h3>
|
|
1095
|
+
<p>Description text.</p>
|
|
1096
|
+
</CardBody>
|
|
1097
|
+
<CardFooter>
|
|
1098
|
+
<Button variant="ghost" size="sm">Learn more</Button>
|
|
1099
|
+
</CardFooter>
|
|
1100
|
+
</Card>
|
|
1101
|
+
\`\`\`
|
|
1102
|
+
|
|
1103
|
+
### Field + Input + Textarea
|
|
1104
|
+
|
|
1105
|
+
\`\`\`tsx
|
|
1106
|
+
import { Field, Input, Textarea } from "@usevyre/react"
|
|
1107
|
+
|
|
1108
|
+
// Field props:
|
|
1109
|
+
// label = string
|
|
1110
|
+
// hint = string
|
|
1111
|
+
// state = "idle" | "error" | "success" | "warning"
|
|
1112
|
+
// required = boolean
|
|
1113
|
+
|
|
1114
|
+
// Input props:
|
|
1115
|
+
// size = "sm" | "md" | "lg"
|
|
1116
|
+
// leftElement = ReactNode
|
|
1117
|
+
// rightElement = ReactNode
|
|
1118
|
+
// + all native input props
|
|
1119
|
+
|
|
1120
|
+
// Examples:
|
|
1121
|
+
<Field label="Email" state="error" hint="Invalid format">
|
|
1122
|
+
<Input type="email" placeholder="you@example.com" />
|
|
1123
|
+
</Field>
|
|
1124
|
+
|
|
1125
|
+
<Field label="Search">
|
|
1126
|
+
<Input leftElement={<SearchIcon />} placeholder="Search..." />
|
|
1127
|
+
</Field>
|
|
1128
|
+
|
|
1129
|
+
<Field label="Bio">
|
|
1130
|
+
<Textarea rows={4} placeholder="Tell us about yourself..." />
|
|
1131
|
+
</Field>
|
|
1132
|
+
\`\`\`
|
|
1133
|
+
|
|
1134
|
+
---
|
|
1135
|
+
|
|
1136
|
+
## Styling Rules for AI Agents
|
|
1137
|
+
|
|
1138
|
+
1. ALWAYS use semantic tokens (\`--vyre-color-semantic-*\`), never primitive tokens
|
|
1139
|
+
2. NEVER hardcode colors — every color decision has a semantic token
|
|
1140
|
+
3. Text hierarchy: \`text-primary\` → \`text-secondary\` → \`text-muted\` → \`text-disabled\`
|
|
1141
|
+
4. Interactive hover states: add \`-hover\` suffix to base token
|
|
1142
|
+
5. Low-opacity backgrounds: use \`-subtle\` suffix tokens
|
|
1143
|
+
6. Spacing: always use \`--vyre-spacing-*\` — never raw px values in component code
|
|
1144
|
+
7. Transitions: use \`--vyre-transition-duration-*\` and \`--vyre-transition-easing-*\`
|
|
1145
|
+
|
|
1146
|
+
---
|
|
1147
|
+
|
|
1148
|
+
## Common Patterns
|
|
1149
|
+
|
|
1150
|
+
### Page layout with sidebar
|
|
1151
|
+
\`\`\`tsx
|
|
1152
|
+
<div style={{ display: "grid", gridTemplateColumns: "260px 1fr", minHeight: "100vh" }}>
|
|
1153
|
+
<aside style={{ background: "var(--vyre-color-semantic-surface)", borderRight: "1px solid var(--vyre-color-semantic-border-subtle)" }}>
|
|
1154
|
+
{/* sidebar content */}
|
|
1155
|
+
</aside>
|
|
1156
|
+
<main style={{ padding: "var(--vyre-spacing-12)" }}>
|
|
1157
|
+
{/* main content */}
|
|
1158
|
+
</main>
|
|
1159
|
+
</div>
|
|
1160
|
+
\`\`\`
|
|
1161
|
+
|
|
1162
|
+
### Form with validation
|
|
1163
|
+
\`\`\`tsx
|
|
1164
|
+
<form>
|
|
1165
|
+
<Field label="Email" state={errors.email ? "error" : "idle"} hint={errors.email}>
|
|
1166
|
+
<Input type="email" value={email} onChange={e => setEmail(e.target.value)} />
|
|
1167
|
+
</Field>
|
|
1168
|
+
<Button variant="accent" type="submit" loading={isSubmitting}>
|
|
1169
|
+
Submit
|
|
1170
|
+
</Button>
|
|
1171
|
+
</form>
|
|
1172
|
+
\`\`\`
|
|
1173
|
+
|
|
1174
|
+
### Status badge with live indicator
|
|
1175
|
+
\`\`\`tsx
|
|
1176
|
+
<Badge variant="success" dot>Live</Badge>
|
|
1177
|
+
<Badge variant="danger" dot>Offline</Badge>
|
|
1178
|
+
<Badge variant="warning">Beta</Badge>
|
|
1179
|
+
\`\`\`
|
|
1180
|
+
`;
|
|
1181
|
+
export const copilotInstructions = `# useVyre Copilot Instructions
|
|
1182
|
+
|
|
1183
|
+
When generating UI code in this project, follow the useVyre design system rules below.
|
|
1184
|
+
|
|
1185
|
+
# useVyre Design System — AI Context
|
|
1186
|
+
# Version: 0.1.0
|
|
1187
|
+
# Include this file in your AI agent's system prompt, .cursor/rules, or CLAUDE.md
|
|
1188
|
+
# Source: https://usevyre.com/ai-context
|
|
1189
|
+
|
|
1190
|
+
---
|
|
1191
|
+
|
|
1192
|
+
## What is useVyre?
|
|
1193
|
+
|
|
1194
|
+
useVyre is an AI-native design system for React and Vue. It uses CSS custom properties
|
|
1195
|
+
(variables) as its single source of truth, making it inherently AI-friendly — no magic,
|
|
1196
|
+
no runtime transforms, just semantic token names that describe intent.
|
|
1197
|
+
|
|
1198
|
+
---
|
|
1199
|
+
|
|
1200
|
+
## Installation
|
|
1201
|
+
|
|
1202
|
+
\`\`\`bash
|
|
1203
|
+
# Tokens (required by everything)
|
|
1204
|
+
pnpm add @usevyre/tokens
|
|
1205
|
+
|
|
1206
|
+
# React components
|
|
1207
|
+
pnpm add @usevyre/react
|
|
1208
|
+
|
|
1209
|
+
# Vue components
|
|
1210
|
+
pnpm add @usevyre/vue
|
|
1211
|
+
\`\`\`
|
|
1212
|
+
|
|
1213
|
+
## CSS Setup
|
|
1214
|
+
|
|
1215
|
+
\`\`\`css
|
|
1216
|
+
/* In your global CSS entry point */
|
|
1217
|
+
@import "@usevyre/tokens/css"; /* design tokens */
|
|
1218
|
+
@import "@usevyre/react/styles"; /* component styles (React) */
|
|
1219
|
+
/* or */
|
|
1220
|
+
@import "@usevyre/vue/styles"; /* component styles (Vue) */
|
|
1221
|
+
\`\`\`
|
|
1222
|
+
|
|
1223
|
+
---
|
|
1224
|
+
|
|
1225
|
+
## Token Naming Convention
|
|
1226
|
+
|
|
1227
|
+
ALL tokens follow this pattern:
|
|
1228
|
+
\`\`\`
|
|
1229
|
+
--vyre-[category]-[subcategory]-[variant]
|
|
1230
|
+
\`\`\`
|
|
1231
|
+
|
|
1232
|
+
Examples:
|
|
1233
|
+
- \`--vyre-color-semantic-accent\` ✅ Use this
|
|
1234
|
+
- \`--vyre-color-primitive-amber-400\` ❌ Never use primitives in components
|
|
1235
|
+
- \`--vyre-spacing-4\` ✅ 16px spacing
|
|
1236
|
+
- \`--vyre-typography-font-size-sm\` ✅ 13px font size
|
|
1237
|
+
|
|
1238
|
+
---
|
|
1239
|
+
|
|
1240
|
+
## Semantic Color Tokens (use these in ALL component styling)
|
|
1241
|
+
|
|
1242
|
+
### Surface layers (background → foreground)
|
|
1243
|
+
- \`--vyre-color-semantic-background\` Page background. Deepest layer.
|
|
1244
|
+
- \`--vyre-color-semantic-surface\` Cards, panels, sidebars.
|
|
1245
|
+
- \`--vyre-color-semantic-surface-raised\` Dropdowns, inputs, elevated cards.
|
|
1246
|
+
- \`--vyre-color-semantic-surface-overlay\` Modals, tooltips.
|
|
1247
|
+
|
|
1248
|
+
### Borders
|
|
1249
|
+
- \`--vyre-color-semantic-border-subtle\` Dividers, subtle separators.
|
|
1250
|
+
- \`--vyre-color-semantic-border\` Default card/input borders.
|
|
1251
|
+
- \`--vyre-color-semantic-border-strong\` Focus rings, selected states.
|
|
1252
|
+
|
|
1253
|
+
### Text hierarchy
|
|
1254
|
+
- \`--vyre-color-semantic-text-primary\` Headings, body text.
|
|
1255
|
+
- \`--vyre-color-semantic-text-secondary\` Subtitles, descriptions.
|
|
1256
|
+
- \`--vyre-color-semantic-text-muted\` Placeholders, helper text.
|
|
1257
|
+
- \`--vyre-color-semantic-text-disabled\` Disabled state text.
|
|
1258
|
+
- \`--vyre-color-semantic-text-inverse\` Text on light/accent backgrounds.
|
|
1259
|
+
|
|
1260
|
+
### Brand colors
|
|
1261
|
+
- \`--vyre-color-semantic-accent\` Primary CTA, highlights. (amber)
|
|
1262
|
+
- \`--vyre-color-semantic-accent-hover\` Hover for accent elements.
|
|
1263
|
+
- \`--vyre-color-semantic-accent-subtle\` Low-opacity accent backgrounds.
|
|
1264
|
+
- \`--vyre-color-semantic-teal\` Secondary accent. Code, success. (teal)
|
|
1265
|
+
- \`--vyre-color-semantic-teal-hover\` Hover for teal elements.
|
|
1266
|
+
- \`--vyre-color-semantic-teal-subtle\` Low-opacity teal backgrounds.
|
|
1267
|
+
|
|
1268
|
+
### Semantic status colors
|
|
1269
|
+
- \`--vyre-color-semantic-success\` Confirmations, complete states.
|
|
1270
|
+
- \`--vyre-color-semantic-success-subtle\` Success badge backgrounds.
|
|
1271
|
+
- \`--vyre-color-semantic-warning\` Warnings, beta indicators.
|
|
1272
|
+
- \`--vyre-color-semantic-warning-subtle\` Warning badge backgrounds.
|
|
1273
|
+
- \`--vyre-color-semantic-danger\` Errors, destructive actions.
|
|
1274
|
+
- \`--vyre-color-semantic-danger-hover\` Hover for danger elements.
|
|
1275
|
+
- \`--vyre-color-semantic-danger-subtle\` Error badge backgrounds.
|
|
1276
|
+
|
|
1277
|
+
---
|
|
1278
|
+
|
|
1279
|
+
## Typography Tokens
|
|
1280
|
+
|
|
1281
|
+
### Font families
|
|
1282
|
+
- \`--vyre-typography-font-family-display\` Headlines, hero text (serif)
|
|
1283
|
+
- \`--vyre-typography-font-family-body\` UI text, labels, body copy (sans-serif)
|
|
1284
|
+
- \`--vyre-typography-font-family-mono\` Code, tokens, technical text (monospace)
|
|
1285
|
+
|
|
1286
|
+
### Font sizes
|
|
1287
|
+
- \`--vyre-typography-font-size-2xs\` 10px — tiny labels
|
|
1288
|
+
- \`--vyre-typography-font-size-xs\` 11px — badge text, captions
|
|
1289
|
+
- \`--vyre-typography-font-size-sm\` 13px — default UI text, buttons
|
|
1290
|
+
- \`--vyre-typography-font-size-md\` 15px — body text
|
|
1291
|
+
- \`--vyre-typography-font-size-lg\` 18px — large body, small headings
|
|
1292
|
+
- \`--vyre-typography-font-size-xl\` 22px — section headings
|
|
1293
|
+
- \`--vyre-typography-font-size-2xl\` 28px — page headings
|
|
1294
|
+
- \`--vyre-typography-font-size-3xl\` 36px — large headings
|
|
1295
|
+
- \`--vyre-typography-font-size-4xl\` 48px — hero headings
|
|
1296
|
+
- \`--vyre-typography-font-size-5xl\` 64px — display headings
|
|
1297
|
+
|
|
1298
|
+
### Font weights
|
|
1299
|
+
- \`--vyre-typography-font-weight-light\` 300
|
|
1300
|
+
- \`--vyre-typography-font-weight-regular\` 400
|
|
1301
|
+
- \`--vyre-typography-font-weight-medium\` 500
|
|
1302
|
+
- \`--vyre-typography-font-weight-semibold\` 600
|
|
1303
|
+
- \`--vyre-typography-font-weight-bold\` 700
|
|
1304
|
+
|
|
1305
|
+
---
|
|
1306
|
+
|
|
1307
|
+
## Spacing Tokens (4px base grid)
|
|
1308
|
+
|
|
1309
|
+
- \`--vyre-spacing-1\` 4px
|
|
1310
|
+
- \`--vyre-spacing-2\` 8px
|
|
1311
|
+
- \`--vyre-spacing-3\` 12px
|
|
1312
|
+
- \`--vyre-spacing-4\` 16px
|
|
1313
|
+
- \`--vyre-spacing-5\` 20px
|
|
1314
|
+
- \`--vyre-spacing-6\` 24px
|
|
1315
|
+
- \`--vyre-spacing-8\` 32px
|
|
1316
|
+
- \`--vyre-spacing-10\` 40px
|
|
1317
|
+
- \`--vyre-spacing-12\` 48px
|
|
1318
|
+
- \`--vyre-spacing-16\` 64px
|
|
1319
|
+
- \`--vyre-spacing-20\` 80px
|
|
1320
|
+
- \`--vyre-spacing-24\` 96px
|
|
1321
|
+
|
|
1322
|
+
---
|
|
1323
|
+
|
|
1324
|
+
## Border Radius Tokens
|
|
1325
|
+
|
|
1326
|
+
- \`--vyre-border-radius-none\` 0
|
|
1327
|
+
- \`--vyre-border-radius-sm\` 4px — tight corners
|
|
1328
|
+
- \`--vyre-border-radius-md\` 8px — default components
|
|
1329
|
+
- \`--vyre-border-radius-lg\` 12px — cards, panels
|
|
1330
|
+
- \`--vyre-border-radius-xl\` 16px — large cards
|
|
1331
|
+
- \`--vyre-border-radius-2xl\` 24px — modals, sheets
|
|
1332
|
+
- \`--vyre-border-radius-full\` 9999px — badges, pills, avatars
|
|
1333
|
+
|
|
1334
|
+
---
|
|
1335
|
+
|
|
1336
|
+
## Component API Reference
|
|
1337
|
+
|
|
1338
|
+
### Button
|
|
1339
|
+
|
|
1340
|
+
\`\`\`tsx
|
|
1341
|
+
import { Button } from "@usevyre/react"
|
|
1342
|
+
|
|
1343
|
+
// Props:
|
|
1344
|
+
// variant = "primary" | "secondary" | "ghost" | "accent" | "teal" | "danger"
|
|
1345
|
+
// size = "sm" | "md" | "lg" | "icon"
|
|
1346
|
+
// loading = boolean
|
|
1347
|
+
// disabled = boolean
|
|
1348
|
+
// as = React.ElementType (default: "button")
|
|
1349
|
+
// leftIcon = ReactNode
|
|
1350
|
+
// rightIcon = ReactNode
|
|
1351
|
+
|
|
1352
|
+
// Examples:
|
|
1353
|
+
<Button variant="accent" size="lg">Get Started</Button>
|
|
1354
|
+
<Button variant="ghost" size="sm">Cancel</Button>
|
|
1355
|
+
<Button variant="danger" loading>Deleting...</Button>
|
|
1356
|
+
<Button as="a" href="/docs" variant="secondary">Read Docs</Button>
|
|
1357
|
+
\`\`\`
|
|
1358
|
+
|
|
1359
|
+
### Badge
|
|
1360
|
+
|
|
1361
|
+
\`\`\`tsx
|
|
1362
|
+
import { Badge } from "@usevyre/react"
|
|
1363
|
+
|
|
1364
|
+
// Props:
|
|
1365
|
+
// variant = "default" | "accent" | "teal" | "success" | "warning" | "danger"
|
|
1366
|
+
// dot = boolean (live status indicator dot)
|
|
1367
|
+
|
|
1368
|
+
// Examples:
|
|
1369
|
+
<Badge variant="success" dot>Online</Badge>
|
|
1370
|
+
<Badge variant="warning">Beta</Badge>
|
|
1371
|
+
<Badge variant="danger">Error</Badge>
|
|
1372
|
+
\`\`\`
|
|
1373
|
+
|
|
1374
|
+
### Card
|
|
1375
|
+
|
|
1376
|
+
\`\`\`tsx
|
|
1377
|
+
import { Card, CardHeader, CardBody, CardFooter } from "@usevyre/react"
|
|
1378
|
+
|
|
1379
|
+
// Card props:
|
|
1380
|
+
// variant = "default" | "elevated" | "outlined" | "ghost" | "accent"
|
|
1381
|
+
// hoverable = boolean
|
|
1382
|
+
// clickable = boolean
|
|
1383
|
+
|
|
1384
|
+
// Examples:
|
|
1385
|
+
<Card variant="elevated">
|
|
1386
|
+
<CardHeader>
|
|
1387
|
+
<Badge variant="teal">New</Badge>
|
|
1388
|
+
</CardHeader>
|
|
1389
|
+
<CardBody>
|
|
1390
|
+
<h3>Card Title</h3>
|
|
1391
|
+
<p>Description text.</p>
|
|
1392
|
+
</CardBody>
|
|
1393
|
+
<CardFooter>
|
|
1394
|
+
<Button variant="ghost" size="sm">Learn more</Button>
|
|
1395
|
+
</CardFooter>
|
|
1396
|
+
</Card>
|
|
1397
|
+
\`\`\`
|
|
1398
|
+
|
|
1399
|
+
### Field + Input + Textarea
|
|
1400
|
+
|
|
1401
|
+
\`\`\`tsx
|
|
1402
|
+
import { Field, Input, Textarea } from "@usevyre/react"
|
|
1403
|
+
|
|
1404
|
+
// Field props:
|
|
1405
|
+
// label = string
|
|
1406
|
+
// hint = string
|
|
1407
|
+
// state = "idle" | "error" | "success" | "warning"
|
|
1408
|
+
// required = boolean
|
|
1409
|
+
|
|
1410
|
+
// Input props:
|
|
1411
|
+
// size = "sm" | "md" | "lg"
|
|
1412
|
+
// leftElement = ReactNode
|
|
1413
|
+
// rightElement = ReactNode
|
|
1414
|
+
// + all native input props
|
|
1415
|
+
|
|
1416
|
+
// Examples:
|
|
1417
|
+
<Field label="Email" state="error" hint="Invalid format">
|
|
1418
|
+
<Input type="email" placeholder="you@example.com" />
|
|
1419
|
+
</Field>
|
|
1420
|
+
|
|
1421
|
+
<Field label="Search">
|
|
1422
|
+
<Input leftElement={<SearchIcon />} placeholder="Search..." />
|
|
1423
|
+
</Field>
|
|
1424
|
+
|
|
1425
|
+
<Field label="Bio">
|
|
1426
|
+
<Textarea rows={4} placeholder="Tell us about yourself..." />
|
|
1427
|
+
</Field>
|
|
1428
|
+
\`\`\`
|
|
1429
|
+
|
|
1430
|
+
---
|
|
1431
|
+
|
|
1432
|
+
## Styling Rules for AI Agents
|
|
1433
|
+
|
|
1434
|
+
1. ALWAYS use semantic tokens (\`--vyre-color-semantic-*\`), never primitive tokens
|
|
1435
|
+
2. NEVER hardcode colors — every color decision has a semantic token
|
|
1436
|
+
3. Text hierarchy: \`text-primary\` → \`text-secondary\` → \`text-muted\` → \`text-disabled\`
|
|
1437
|
+
4. Interactive hover states: add \`-hover\` suffix to base token
|
|
1438
|
+
5. Low-opacity backgrounds: use \`-subtle\` suffix tokens
|
|
1439
|
+
6. Spacing: always use \`--vyre-spacing-*\` — never raw px values in component code
|
|
1440
|
+
7. Transitions: use \`--vyre-transition-duration-*\` and \`--vyre-transition-easing-*\`
|
|
1441
|
+
|
|
1442
|
+
---
|
|
1443
|
+
|
|
1444
|
+
## Common Patterns
|
|
1445
|
+
|
|
1446
|
+
### Page layout with sidebar
|
|
1447
|
+
\`\`\`tsx
|
|
1448
|
+
<div style={{ display: "grid", gridTemplateColumns: "260px 1fr", minHeight: "100vh" }}>
|
|
1449
|
+
<aside style={{ background: "var(--vyre-color-semantic-surface)", borderRight: "1px solid var(--vyre-color-semantic-border-subtle)" }}>
|
|
1450
|
+
{/* sidebar content */}
|
|
1451
|
+
</aside>
|
|
1452
|
+
<main style={{ padding: "var(--vyre-spacing-12)" }}>
|
|
1453
|
+
{/* main content */}
|
|
1454
|
+
</main>
|
|
1455
|
+
</div>
|
|
1456
|
+
\`\`\`
|
|
1457
|
+
|
|
1458
|
+
### Form with validation
|
|
1459
|
+
\`\`\`tsx
|
|
1460
|
+
<form>
|
|
1461
|
+
<Field label="Email" state={errors.email ? "error" : "idle"} hint={errors.email}>
|
|
1462
|
+
<Input type="email" value={email} onChange={e => setEmail(e.target.value)} />
|
|
1463
|
+
</Field>
|
|
1464
|
+
<Button variant="accent" type="submit" loading={isSubmitting}>
|
|
1465
|
+
Submit
|
|
1466
|
+
</Button>
|
|
1467
|
+
</form>
|
|
1468
|
+
\`\`\`
|
|
1469
|
+
|
|
1470
|
+
### Status badge with live indicator
|
|
1471
|
+
\`\`\`tsx
|
|
1472
|
+
<Badge variant="success" dot>Live</Badge>
|
|
1473
|
+
<Badge variant="danger" dot>Offline</Badge>
|
|
1474
|
+
<Badge variant="warning">Beta</Badge>
|
|
1475
|
+
\`\`\`
|
|
1476
|
+
`;
|