@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/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Galih Pranowo (gapra.dev)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
# useVyre Design System Context
|
|
2
|
+
|
|
3
|
+
You are working in a codebase that uses the useVyre design system.
|
|
4
|
+
Follow the rules below strictly when writing any UI code.
|
|
5
|
+
|
|
6
|
+
# useVyre Design System — AI Context
|
|
7
|
+
# Version: 0.1.0
|
|
8
|
+
# Include this file in your AI agent's system prompt, .cursor/rules, or CLAUDE.md
|
|
9
|
+
# Source: https://usevyre.com/ai-context
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## What is useVyre?
|
|
14
|
+
|
|
15
|
+
useVyre is an AI-native design system for React and Vue. It uses CSS custom properties
|
|
16
|
+
(variables) as its single source of truth, making it inherently AI-friendly — no magic,
|
|
17
|
+
no runtime transforms, just semantic token names that describe intent.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Installation
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# Tokens (required by everything)
|
|
25
|
+
pnpm add @usevyre/tokens
|
|
26
|
+
|
|
27
|
+
# React components
|
|
28
|
+
pnpm add @usevyre/react
|
|
29
|
+
|
|
30
|
+
# Vue components
|
|
31
|
+
pnpm add @usevyre/vue
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## CSS Setup
|
|
35
|
+
|
|
36
|
+
```css
|
|
37
|
+
/* In your global CSS entry point */
|
|
38
|
+
@import "@usevyre/tokens/css"; /* design tokens */
|
|
39
|
+
@import "@usevyre/react/styles"; /* component styles (React) */
|
|
40
|
+
/* or */
|
|
41
|
+
@import "@usevyre/vue/styles"; /* component styles (Vue) */
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Token Naming Convention
|
|
47
|
+
|
|
48
|
+
ALL tokens follow this pattern:
|
|
49
|
+
```
|
|
50
|
+
--vyre-[category]-[subcategory]-[variant]
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Examples:
|
|
54
|
+
- `--vyre-color-semantic-accent` ✅ Use this
|
|
55
|
+
- `--vyre-color-primitive-amber-400` ❌ Never use primitives in components
|
|
56
|
+
- `--vyre-spacing-4` ✅ 16px spacing
|
|
57
|
+
- `--vyre-typography-font-size-sm` ✅ 13px font size
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Semantic Color Tokens (use these in ALL component styling)
|
|
62
|
+
|
|
63
|
+
### Surface layers (background → foreground)
|
|
64
|
+
- `--vyre-color-semantic-background` Page background. Deepest layer.
|
|
65
|
+
- `--vyre-color-semantic-surface` Cards, panels, sidebars.
|
|
66
|
+
- `--vyre-color-semantic-surface-raised` Dropdowns, inputs, elevated cards.
|
|
67
|
+
- `--vyre-color-semantic-surface-overlay` Modals, tooltips.
|
|
68
|
+
|
|
69
|
+
### Borders
|
|
70
|
+
- `--vyre-color-semantic-border-subtle` Dividers, subtle separators.
|
|
71
|
+
- `--vyre-color-semantic-border` Default card/input borders.
|
|
72
|
+
- `--vyre-color-semantic-border-strong` Focus rings, selected states.
|
|
73
|
+
|
|
74
|
+
### Text hierarchy
|
|
75
|
+
- `--vyre-color-semantic-text-primary` Headings, body text.
|
|
76
|
+
- `--vyre-color-semantic-text-secondary` Subtitles, descriptions.
|
|
77
|
+
- `--vyre-color-semantic-text-muted` Placeholders, helper text.
|
|
78
|
+
- `--vyre-color-semantic-text-disabled` Disabled state text.
|
|
79
|
+
- `--vyre-color-semantic-text-inverse` Text on light/accent backgrounds.
|
|
80
|
+
|
|
81
|
+
### Brand colors
|
|
82
|
+
- `--vyre-color-semantic-accent` Primary CTA, highlights. (amber)
|
|
83
|
+
- `--vyre-color-semantic-accent-hover` Hover for accent elements.
|
|
84
|
+
- `--vyre-color-semantic-accent-subtle` Low-opacity accent backgrounds.
|
|
85
|
+
- `--vyre-color-semantic-teal` Secondary accent. Code, success. (teal)
|
|
86
|
+
- `--vyre-color-semantic-teal-hover` Hover for teal elements.
|
|
87
|
+
- `--vyre-color-semantic-teal-subtle` Low-opacity teal backgrounds.
|
|
88
|
+
|
|
89
|
+
### Semantic status colors
|
|
90
|
+
- `--vyre-color-semantic-success` Confirmations, complete states.
|
|
91
|
+
- `--vyre-color-semantic-success-subtle` Success badge backgrounds.
|
|
92
|
+
- `--vyre-color-semantic-warning` Warnings, beta indicators.
|
|
93
|
+
- `--vyre-color-semantic-warning-subtle` Warning badge backgrounds.
|
|
94
|
+
- `--vyre-color-semantic-danger` Errors, destructive actions.
|
|
95
|
+
- `--vyre-color-semantic-danger-hover` Hover for danger elements.
|
|
96
|
+
- `--vyre-color-semantic-danger-subtle` Error badge backgrounds.
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Typography Tokens
|
|
101
|
+
|
|
102
|
+
### Font families
|
|
103
|
+
- `--vyre-typography-font-family-display` Headlines, hero text (serif)
|
|
104
|
+
- `--vyre-typography-font-family-body` UI text, labels, body copy (sans-serif)
|
|
105
|
+
- `--vyre-typography-font-family-mono` Code, tokens, technical text (monospace)
|
|
106
|
+
|
|
107
|
+
### Font sizes
|
|
108
|
+
- `--vyre-typography-font-size-2xs` 10px — tiny labels
|
|
109
|
+
- `--vyre-typography-font-size-xs` 11px — badge text, captions
|
|
110
|
+
- `--vyre-typography-font-size-sm` 13px — default UI text, buttons
|
|
111
|
+
- `--vyre-typography-font-size-md` 15px — body text
|
|
112
|
+
- `--vyre-typography-font-size-lg` 18px — large body, small headings
|
|
113
|
+
- `--vyre-typography-font-size-xl` 22px — section headings
|
|
114
|
+
- `--vyre-typography-font-size-2xl` 28px — page headings
|
|
115
|
+
- `--vyre-typography-font-size-3xl` 36px — large headings
|
|
116
|
+
- `--vyre-typography-font-size-4xl` 48px — hero headings
|
|
117
|
+
- `--vyre-typography-font-size-5xl` 64px — display headings
|
|
118
|
+
|
|
119
|
+
### Font weights
|
|
120
|
+
- `--vyre-typography-font-weight-light` 300
|
|
121
|
+
- `--vyre-typography-font-weight-regular` 400
|
|
122
|
+
- `--vyre-typography-font-weight-medium` 500
|
|
123
|
+
- `--vyre-typography-font-weight-semibold` 600
|
|
124
|
+
- `--vyre-typography-font-weight-bold` 700
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Spacing Tokens (4px base grid)
|
|
129
|
+
|
|
130
|
+
- `--vyre-spacing-1` 4px
|
|
131
|
+
- `--vyre-spacing-2` 8px
|
|
132
|
+
- `--vyre-spacing-3` 12px
|
|
133
|
+
- `--vyre-spacing-4` 16px
|
|
134
|
+
- `--vyre-spacing-5` 20px
|
|
135
|
+
- `--vyre-spacing-6` 24px
|
|
136
|
+
- `--vyre-spacing-8` 32px
|
|
137
|
+
- `--vyre-spacing-10` 40px
|
|
138
|
+
- `--vyre-spacing-12` 48px
|
|
139
|
+
- `--vyre-spacing-16` 64px
|
|
140
|
+
- `--vyre-spacing-20` 80px
|
|
141
|
+
- `--vyre-spacing-24` 96px
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## Border Radius Tokens
|
|
146
|
+
|
|
147
|
+
- `--vyre-border-radius-none` 0
|
|
148
|
+
- `--vyre-border-radius-sm` 4px — tight corners
|
|
149
|
+
- `--vyre-border-radius-md` 8px — default components
|
|
150
|
+
- `--vyre-border-radius-lg` 12px — cards, panels
|
|
151
|
+
- `--vyre-border-radius-xl` 16px — large cards
|
|
152
|
+
- `--vyre-border-radius-2xl` 24px — modals, sheets
|
|
153
|
+
- `--vyre-border-radius-full` 9999px — badges, pills, avatars
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Component API Reference
|
|
158
|
+
|
|
159
|
+
### Button
|
|
160
|
+
|
|
161
|
+
```tsx
|
|
162
|
+
import { Button } from "@usevyre/react"
|
|
163
|
+
|
|
164
|
+
// Props:
|
|
165
|
+
// variant = "primary" | "secondary" | "ghost" | "accent" | "teal" | "danger"
|
|
166
|
+
// size = "sm" | "md" | "lg" | "icon"
|
|
167
|
+
// loading = boolean
|
|
168
|
+
// disabled = boolean
|
|
169
|
+
// as = React.ElementType (default: "button")
|
|
170
|
+
// leftIcon = ReactNode
|
|
171
|
+
// rightIcon = ReactNode
|
|
172
|
+
|
|
173
|
+
// Examples:
|
|
174
|
+
<Button variant="accent" size="lg">Get Started</Button>
|
|
175
|
+
<Button variant="ghost" size="sm">Cancel</Button>
|
|
176
|
+
<Button variant="danger" loading>Deleting...</Button>
|
|
177
|
+
<Button as="a" href="/docs" variant="secondary">Read Docs</Button>
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### Badge
|
|
181
|
+
|
|
182
|
+
```tsx
|
|
183
|
+
import { Badge } from "@usevyre/react"
|
|
184
|
+
|
|
185
|
+
// Props:
|
|
186
|
+
// variant = "default" | "accent" | "teal" | "success" | "warning" | "danger"
|
|
187
|
+
// dot = boolean (live status indicator dot)
|
|
188
|
+
|
|
189
|
+
// Examples:
|
|
190
|
+
<Badge variant="success" dot>Online</Badge>
|
|
191
|
+
<Badge variant="warning">Beta</Badge>
|
|
192
|
+
<Badge variant="danger">Error</Badge>
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### Card
|
|
196
|
+
|
|
197
|
+
```tsx
|
|
198
|
+
import { Card, CardHeader, CardBody, CardFooter } from "@usevyre/react"
|
|
199
|
+
|
|
200
|
+
// Card props:
|
|
201
|
+
// variant = "default" | "elevated" | "outlined" | "ghost" | "accent"
|
|
202
|
+
// hoverable = boolean
|
|
203
|
+
// clickable = boolean
|
|
204
|
+
|
|
205
|
+
// Examples:
|
|
206
|
+
<Card variant="elevated">
|
|
207
|
+
<CardHeader>
|
|
208
|
+
<Badge variant="teal">New</Badge>
|
|
209
|
+
</CardHeader>
|
|
210
|
+
<CardBody>
|
|
211
|
+
<h3>Card Title</h3>
|
|
212
|
+
<p>Description text.</p>
|
|
213
|
+
</CardBody>
|
|
214
|
+
<CardFooter>
|
|
215
|
+
<Button variant="ghost" size="sm">Learn more</Button>
|
|
216
|
+
</CardFooter>
|
|
217
|
+
</Card>
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
### Field + Input + Textarea
|
|
221
|
+
|
|
222
|
+
```tsx
|
|
223
|
+
import { Field, Input, Textarea } from "@usevyre/react"
|
|
224
|
+
|
|
225
|
+
// Field props:
|
|
226
|
+
// label = string
|
|
227
|
+
// hint = string
|
|
228
|
+
// state = "idle" | "error" | "success" | "warning"
|
|
229
|
+
// required = boolean
|
|
230
|
+
|
|
231
|
+
// Input props:
|
|
232
|
+
// size = "sm" | "md" | "lg"
|
|
233
|
+
// leftElement = ReactNode
|
|
234
|
+
// rightElement = ReactNode
|
|
235
|
+
// + all native input props
|
|
236
|
+
|
|
237
|
+
// Examples:
|
|
238
|
+
<Field label="Email" state="error" hint="Invalid format">
|
|
239
|
+
<Input type="email" placeholder="you@example.com" />
|
|
240
|
+
</Field>
|
|
241
|
+
|
|
242
|
+
<Field label="Search">
|
|
243
|
+
<Input leftElement={<SearchIcon />} placeholder="Search..." />
|
|
244
|
+
</Field>
|
|
245
|
+
|
|
246
|
+
<Field label="Bio">
|
|
247
|
+
<Textarea rows={4} placeholder="Tell us about yourself..." />
|
|
248
|
+
</Field>
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
253
|
+
## Styling Rules for AI Agents
|
|
254
|
+
|
|
255
|
+
1. ALWAYS use semantic tokens (`--vyre-color-semantic-*`), never primitive tokens
|
|
256
|
+
2. NEVER hardcode colors — every color decision has a semantic token
|
|
257
|
+
3. Text hierarchy: `text-primary` → `text-secondary` → `text-muted` → `text-disabled`
|
|
258
|
+
4. Interactive hover states: add `-hover` suffix to base token
|
|
259
|
+
5. Low-opacity backgrounds: use `-subtle` suffix tokens
|
|
260
|
+
6. Spacing: always use `--vyre-spacing-*` — never raw px values in component code
|
|
261
|
+
7. Transitions: use `--vyre-transition-duration-*` and `--vyre-transition-easing-*`
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
## Common Patterns
|
|
266
|
+
|
|
267
|
+
### Page layout with sidebar
|
|
268
|
+
```tsx
|
|
269
|
+
<div style={{ display: "grid", gridTemplateColumns: "260px 1fr", minHeight: "100vh" }}>
|
|
270
|
+
<aside style={{ background: "var(--vyre-color-semantic-surface)", borderRight: "1px solid var(--vyre-color-semantic-border-subtle)" }}>
|
|
271
|
+
{/* sidebar content */}
|
|
272
|
+
</aside>
|
|
273
|
+
<main style={{ padding: "var(--vyre-spacing-12)" }}>
|
|
274
|
+
{/* main content */}
|
|
275
|
+
</main>
|
|
276
|
+
</div>
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
### Form with validation
|
|
280
|
+
```tsx
|
|
281
|
+
<form>
|
|
282
|
+
<Field label="Email" state={errors.email ? "error" : "idle"} hint={errors.email}>
|
|
283
|
+
<Input type="email" value={email} onChange={e => setEmail(e.target.value)} />
|
|
284
|
+
</Field>
|
|
285
|
+
<Button variant="accent" type="submit" loading={isSubmitting}>
|
|
286
|
+
Submit
|
|
287
|
+
</Button>
|
|
288
|
+
</form>
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
### Status badge with live indicator
|
|
292
|
+
```tsx
|
|
293
|
+
<Badge variant="success" dot>Live</Badge>
|
|
294
|
+
<Badge variant="danger" dot>Offline</Badge>
|
|
295
|
+
<Badge variant="warning">Beta</Badge>
|
|
296
|
+
```
|
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
# useVyre Copilot Instructions
|
|
2
|
+
|
|
3
|
+
When generating UI code in this project, follow the useVyre design system rules below.
|
|
4
|
+
|
|
5
|
+
# useVyre Design System — AI Context
|
|
6
|
+
# Version: 0.1.0
|
|
7
|
+
# Include this file in your AI agent's system prompt, .cursor/rules, or CLAUDE.md
|
|
8
|
+
# Source: https://usevyre.com/ai-context
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## What is useVyre?
|
|
13
|
+
|
|
14
|
+
useVyre is an AI-native design system for React and Vue. It uses CSS custom properties
|
|
15
|
+
(variables) as its single source of truth, making it inherently AI-friendly — no magic,
|
|
16
|
+
no runtime transforms, just semantic token names that describe intent.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Installation
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
# Tokens (required by everything)
|
|
24
|
+
pnpm add @usevyre/tokens
|
|
25
|
+
|
|
26
|
+
# React components
|
|
27
|
+
pnpm add @usevyre/react
|
|
28
|
+
|
|
29
|
+
# Vue components
|
|
30
|
+
pnpm add @usevyre/vue
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## CSS Setup
|
|
34
|
+
|
|
35
|
+
```css
|
|
36
|
+
/* In your global CSS entry point */
|
|
37
|
+
@import "@usevyre/tokens/css"; /* design tokens */
|
|
38
|
+
@import "@usevyre/react/styles"; /* component styles (React) */
|
|
39
|
+
/* or */
|
|
40
|
+
@import "@usevyre/vue/styles"; /* component styles (Vue) */
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Token Naming Convention
|
|
46
|
+
|
|
47
|
+
ALL tokens follow this pattern:
|
|
48
|
+
```
|
|
49
|
+
--vyre-[category]-[subcategory]-[variant]
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Examples:
|
|
53
|
+
- `--vyre-color-semantic-accent` ✅ Use this
|
|
54
|
+
- `--vyre-color-primitive-amber-400` ❌ Never use primitives in components
|
|
55
|
+
- `--vyre-spacing-4` ✅ 16px spacing
|
|
56
|
+
- `--vyre-typography-font-size-sm` ✅ 13px font size
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Semantic Color Tokens (use these in ALL component styling)
|
|
61
|
+
|
|
62
|
+
### Surface layers (background → foreground)
|
|
63
|
+
- `--vyre-color-semantic-background` Page background. Deepest layer.
|
|
64
|
+
- `--vyre-color-semantic-surface` Cards, panels, sidebars.
|
|
65
|
+
- `--vyre-color-semantic-surface-raised` Dropdowns, inputs, elevated cards.
|
|
66
|
+
- `--vyre-color-semantic-surface-overlay` Modals, tooltips.
|
|
67
|
+
|
|
68
|
+
### Borders
|
|
69
|
+
- `--vyre-color-semantic-border-subtle` Dividers, subtle separators.
|
|
70
|
+
- `--vyre-color-semantic-border` Default card/input borders.
|
|
71
|
+
- `--vyre-color-semantic-border-strong` Focus rings, selected states.
|
|
72
|
+
|
|
73
|
+
### Text hierarchy
|
|
74
|
+
- `--vyre-color-semantic-text-primary` Headings, body text.
|
|
75
|
+
- `--vyre-color-semantic-text-secondary` Subtitles, descriptions.
|
|
76
|
+
- `--vyre-color-semantic-text-muted` Placeholders, helper text.
|
|
77
|
+
- `--vyre-color-semantic-text-disabled` Disabled state text.
|
|
78
|
+
- `--vyre-color-semantic-text-inverse` Text on light/accent backgrounds.
|
|
79
|
+
|
|
80
|
+
### Brand colors
|
|
81
|
+
- `--vyre-color-semantic-accent` Primary CTA, highlights. (amber)
|
|
82
|
+
- `--vyre-color-semantic-accent-hover` Hover for accent elements.
|
|
83
|
+
- `--vyre-color-semantic-accent-subtle` Low-opacity accent backgrounds.
|
|
84
|
+
- `--vyre-color-semantic-teal` Secondary accent. Code, success. (teal)
|
|
85
|
+
- `--vyre-color-semantic-teal-hover` Hover for teal elements.
|
|
86
|
+
- `--vyre-color-semantic-teal-subtle` Low-opacity teal backgrounds.
|
|
87
|
+
|
|
88
|
+
### Semantic status colors
|
|
89
|
+
- `--vyre-color-semantic-success` Confirmations, complete states.
|
|
90
|
+
- `--vyre-color-semantic-success-subtle` Success badge backgrounds.
|
|
91
|
+
- `--vyre-color-semantic-warning` Warnings, beta indicators.
|
|
92
|
+
- `--vyre-color-semantic-warning-subtle` Warning badge backgrounds.
|
|
93
|
+
- `--vyre-color-semantic-danger` Errors, destructive actions.
|
|
94
|
+
- `--vyre-color-semantic-danger-hover` Hover for danger elements.
|
|
95
|
+
- `--vyre-color-semantic-danger-subtle` Error badge backgrounds.
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Typography Tokens
|
|
100
|
+
|
|
101
|
+
### Font families
|
|
102
|
+
- `--vyre-typography-font-family-display` Headlines, hero text (serif)
|
|
103
|
+
- `--vyre-typography-font-family-body` UI text, labels, body copy (sans-serif)
|
|
104
|
+
- `--vyre-typography-font-family-mono` Code, tokens, technical text (monospace)
|
|
105
|
+
|
|
106
|
+
### Font sizes
|
|
107
|
+
- `--vyre-typography-font-size-2xs` 10px — tiny labels
|
|
108
|
+
- `--vyre-typography-font-size-xs` 11px — badge text, captions
|
|
109
|
+
- `--vyre-typography-font-size-sm` 13px — default UI text, buttons
|
|
110
|
+
- `--vyre-typography-font-size-md` 15px — body text
|
|
111
|
+
- `--vyre-typography-font-size-lg` 18px — large body, small headings
|
|
112
|
+
- `--vyre-typography-font-size-xl` 22px — section headings
|
|
113
|
+
- `--vyre-typography-font-size-2xl` 28px — page headings
|
|
114
|
+
- `--vyre-typography-font-size-3xl` 36px — large headings
|
|
115
|
+
- `--vyre-typography-font-size-4xl` 48px — hero headings
|
|
116
|
+
- `--vyre-typography-font-size-5xl` 64px — display headings
|
|
117
|
+
|
|
118
|
+
### Font weights
|
|
119
|
+
- `--vyre-typography-font-weight-light` 300
|
|
120
|
+
- `--vyre-typography-font-weight-regular` 400
|
|
121
|
+
- `--vyre-typography-font-weight-medium` 500
|
|
122
|
+
- `--vyre-typography-font-weight-semibold` 600
|
|
123
|
+
- `--vyre-typography-font-weight-bold` 700
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Spacing Tokens (4px base grid)
|
|
128
|
+
|
|
129
|
+
- `--vyre-spacing-1` 4px
|
|
130
|
+
- `--vyre-spacing-2` 8px
|
|
131
|
+
- `--vyre-spacing-3` 12px
|
|
132
|
+
- `--vyre-spacing-4` 16px
|
|
133
|
+
- `--vyre-spacing-5` 20px
|
|
134
|
+
- `--vyre-spacing-6` 24px
|
|
135
|
+
- `--vyre-spacing-8` 32px
|
|
136
|
+
- `--vyre-spacing-10` 40px
|
|
137
|
+
- `--vyre-spacing-12` 48px
|
|
138
|
+
- `--vyre-spacing-16` 64px
|
|
139
|
+
- `--vyre-spacing-20` 80px
|
|
140
|
+
- `--vyre-spacing-24` 96px
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## Border Radius Tokens
|
|
145
|
+
|
|
146
|
+
- `--vyre-border-radius-none` 0
|
|
147
|
+
- `--vyre-border-radius-sm` 4px — tight corners
|
|
148
|
+
- `--vyre-border-radius-md` 8px — default components
|
|
149
|
+
- `--vyre-border-radius-lg` 12px — cards, panels
|
|
150
|
+
- `--vyre-border-radius-xl` 16px — large cards
|
|
151
|
+
- `--vyre-border-radius-2xl` 24px — modals, sheets
|
|
152
|
+
- `--vyre-border-radius-full` 9999px — badges, pills, avatars
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## Component API Reference
|
|
157
|
+
|
|
158
|
+
### Button
|
|
159
|
+
|
|
160
|
+
```tsx
|
|
161
|
+
import { Button } from "@usevyre/react"
|
|
162
|
+
|
|
163
|
+
// Props:
|
|
164
|
+
// variant = "primary" | "secondary" | "ghost" | "accent" | "teal" | "danger"
|
|
165
|
+
// size = "sm" | "md" | "lg" | "icon"
|
|
166
|
+
// loading = boolean
|
|
167
|
+
// disabled = boolean
|
|
168
|
+
// as = React.ElementType (default: "button")
|
|
169
|
+
// leftIcon = ReactNode
|
|
170
|
+
// rightIcon = ReactNode
|
|
171
|
+
|
|
172
|
+
// Examples:
|
|
173
|
+
<Button variant="accent" size="lg">Get Started</Button>
|
|
174
|
+
<Button variant="ghost" size="sm">Cancel</Button>
|
|
175
|
+
<Button variant="danger" loading>Deleting...</Button>
|
|
176
|
+
<Button as="a" href="/docs" variant="secondary">Read Docs</Button>
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### Badge
|
|
180
|
+
|
|
181
|
+
```tsx
|
|
182
|
+
import { Badge } from "@usevyre/react"
|
|
183
|
+
|
|
184
|
+
// Props:
|
|
185
|
+
// variant = "default" | "accent" | "teal" | "success" | "warning" | "danger"
|
|
186
|
+
// dot = boolean (live status indicator dot)
|
|
187
|
+
|
|
188
|
+
// Examples:
|
|
189
|
+
<Badge variant="success" dot>Online</Badge>
|
|
190
|
+
<Badge variant="warning">Beta</Badge>
|
|
191
|
+
<Badge variant="danger">Error</Badge>
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### Card
|
|
195
|
+
|
|
196
|
+
```tsx
|
|
197
|
+
import { Card, CardHeader, CardBody, CardFooter } from "@usevyre/react"
|
|
198
|
+
|
|
199
|
+
// Card props:
|
|
200
|
+
// variant = "default" | "elevated" | "outlined" | "ghost" | "accent"
|
|
201
|
+
// hoverable = boolean
|
|
202
|
+
// clickable = boolean
|
|
203
|
+
|
|
204
|
+
// Examples:
|
|
205
|
+
<Card variant="elevated">
|
|
206
|
+
<CardHeader>
|
|
207
|
+
<Badge variant="teal">New</Badge>
|
|
208
|
+
</CardHeader>
|
|
209
|
+
<CardBody>
|
|
210
|
+
<h3>Card Title</h3>
|
|
211
|
+
<p>Description text.</p>
|
|
212
|
+
</CardBody>
|
|
213
|
+
<CardFooter>
|
|
214
|
+
<Button variant="ghost" size="sm">Learn more</Button>
|
|
215
|
+
</CardFooter>
|
|
216
|
+
</Card>
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
### Field + Input + Textarea
|
|
220
|
+
|
|
221
|
+
```tsx
|
|
222
|
+
import { Field, Input, Textarea } from "@usevyre/react"
|
|
223
|
+
|
|
224
|
+
// Field props:
|
|
225
|
+
// label = string
|
|
226
|
+
// hint = string
|
|
227
|
+
// state = "idle" | "error" | "success" | "warning"
|
|
228
|
+
// required = boolean
|
|
229
|
+
|
|
230
|
+
// Input props:
|
|
231
|
+
// size = "sm" | "md" | "lg"
|
|
232
|
+
// leftElement = ReactNode
|
|
233
|
+
// rightElement = ReactNode
|
|
234
|
+
// + all native input props
|
|
235
|
+
|
|
236
|
+
// Examples:
|
|
237
|
+
<Field label="Email" state="error" hint="Invalid format">
|
|
238
|
+
<Input type="email" placeholder="you@example.com" />
|
|
239
|
+
</Field>
|
|
240
|
+
|
|
241
|
+
<Field label="Search">
|
|
242
|
+
<Input leftElement={<SearchIcon />} placeholder="Search..." />
|
|
243
|
+
</Field>
|
|
244
|
+
|
|
245
|
+
<Field label="Bio">
|
|
246
|
+
<Textarea rows={4} placeholder="Tell us about yourself..." />
|
|
247
|
+
</Field>
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
## Styling Rules for AI Agents
|
|
253
|
+
|
|
254
|
+
1. ALWAYS use semantic tokens (`--vyre-color-semantic-*`), never primitive tokens
|
|
255
|
+
2. NEVER hardcode colors — every color decision has a semantic token
|
|
256
|
+
3. Text hierarchy: `text-primary` → `text-secondary` → `text-muted` → `text-disabled`
|
|
257
|
+
4. Interactive hover states: add `-hover` suffix to base token
|
|
258
|
+
5. Low-opacity backgrounds: use `-subtle` suffix tokens
|
|
259
|
+
6. Spacing: always use `--vyre-spacing-*` — never raw px values in component code
|
|
260
|
+
7. Transitions: use `--vyre-transition-duration-*` and `--vyre-transition-easing-*`
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
## Common Patterns
|
|
265
|
+
|
|
266
|
+
### Page layout with sidebar
|
|
267
|
+
```tsx
|
|
268
|
+
<div style={{ display: "grid", gridTemplateColumns: "260px 1fr", minHeight: "100vh" }}>
|
|
269
|
+
<aside style={{ background: "var(--vyre-color-semantic-surface)", borderRight: "1px solid var(--vyre-color-semantic-border-subtle)" }}>
|
|
270
|
+
{/* sidebar content */}
|
|
271
|
+
</aside>
|
|
272
|
+
<main style={{ padding: "var(--vyre-spacing-12)" }}>
|
|
273
|
+
{/* main content */}
|
|
274
|
+
</main>
|
|
275
|
+
</div>
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
### Form with validation
|
|
279
|
+
```tsx
|
|
280
|
+
<form>
|
|
281
|
+
<Field label="Email" state={errors.email ? "error" : "idle"} hint={errors.email}>
|
|
282
|
+
<Input type="email" value={email} onChange={e => setEmail(e.target.value)} />
|
|
283
|
+
</Field>
|
|
284
|
+
<Button variant="accent" type="submit" loading={isSubmitting}>
|
|
285
|
+
Submit
|
|
286
|
+
</Button>
|
|
287
|
+
</form>
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
### Status badge with live indicator
|
|
291
|
+
```tsx
|
|
292
|
+
<Badge variant="success" dot>Live</Badge>
|
|
293
|
+
<Badge variant="danger" dot>Offline</Badge>
|
|
294
|
+
<Badge variant="warning">Beta</Badge>
|
|
295
|
+
```
|