@dv.nghiem/flowdeck 0.3.5 → 0.3.7
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/dist/agents/index.d.ts +2 -1
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/supervisor.d.ts +3 -0
- package/dist/agents/supervisor.d.ts.map +1 -0
- package/dist/config/schema.d.ts +36 -0
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/dashboard/lib/state-reader.d.ts.map +1 -1
- package/dist/dashboard/server.mjs +0 -37
- package/dist/dashboard/types.d.ts +0 -2
- package/dist/dashboard/types.d.ts.map +1 -1
- package/dist/dashboard/views/index.ejs +0 -6
- package/dist/dashboard/views/partials/header.ejs +0 -4
- package/dist/hooks/memory-hook.d.ts +7 -0
- package/dist/hooks/memory-hook.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1072 -91
- package/dist/services/agent-contract-registry.d.ts.map +1 -1
- package/dist/services/memory-store.d.ts +34 -1
- package/dist/services/memory-store.d.ts.map +1 -1
- package/dist/services/memory-store.test.d.ts +2 -0
- package/dist/services/memory-store.test.d.ts.map +1 -0
- package/dist/services/supervisor-binding.d.ts +114 -0
- package/dist/services/supervisor-binding.d.ts.map +1 -0
- package/dist/services/supervisor.test.d.ts +14 -0
- package/dist/services/supervisor.test.d.ts.map +1 -0
- package/dist/services/telemetry.d.ts +1 -1
- package/dist/services/telemetry.d.ts.map +1 -1
- package/dist/services/workflow-scorecard.d.ts +20 -0
- package/dist/services/workflow-scorecard.d.ts.map +1 -1
- package/dist/tools/memory-search.d.ts.map +1 -1
- package/dist/tools/memory-status.d.ts.map +1 -1
- package/docs/agents.md +1 -1
- package/docs/commands/fd-ask.md +1 -1
- package/docs/commands/fd-deploy-check.md +1 -1
- package/docs/commands/fd-discuss.md +1 -1
- package/docs/commands/fd-fix-bug.md +1 -1
- package/docs/commands/fd-new-feature.md +1 -1
- package/docs/commands/fd-verify.md +18 -0
- package/docs/commands/fd-write-docs.md +1 -1
- package/docs/feature-integration-architecture.md +1 -1
- package/docs/notifications.md +2 -2
- package/docs/quick-start.md +1 -1
- package/docs/skills.md +1 -1
- package/package.json +1 -1
- package/src/commands/fd-new-project.md +0 -1
- package/src/rules/common/agent-orchestration.md +1 -1
- package/src/skills/design-tokens/SKILL.md +250 -0
- package/src/skills/git-release/SKILL.md +1 -1
- package/src/skills/ui-design/SKILL.md +313 -0
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: design-tokens
|
|
3
|
+
description: Design token system with semantic color palettes, typography scales, spacing systems, and W3C DTCG compliant token definitions
|
|
4
|
+
origin: Built for FlowDeck's design agent workflow
|
|
5
|
+
tags:
|
|
6
|
+
- design
|
|
7
|
+
- tokens
|
|
8
|
+
- semantic
|
|
9
|
+
- w3c-dtcg
|
|
10
|
+
- color
|
|
11
|
+
- typography
|
|
12
|
+
- spacing
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Design Tokens Skill
|
|
16
|
+
|
|
17
|
+
Design tokens are the single source of truth for visual design decisions. They enable consistent, themeable UI and bridge design tools with code.
|
|
18
|
+
|
|
19
|
+
## Token Structure
|
|
20
|
+
|
|
21
|
+
Tokens follow W3C Design Token Community Group (DTCG) format:
|
|
22
|
+
|
|
23
|
+
```css
|
|
24
|
+
/* Category/Role/Variant */
|
|
25
|
+
--color-text-primary: oklch(68% 0.21 250);
|
|
26
|
+
--color-surface: oklch(98% 0 0);
|
|
27
|
+
--spacing-lg: 1.5rem; /* 24px */
|
|
28
|
+
--radius-md: 0.5rem; /* 8px */
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Color Tokens
|
|
32
|
+
|
|
33
|
+
### Semantic Color Palette (Light Mode)
|
|
34
|
+
|
|
35
|
+
```css
|
|
36
|
+
:root {
|
|
37
|
+
/* Text Colors */
|
|
38
|
+
--color-text-primary: oklch(18% 0 0); /* #1a1a1a - Main text */
|
|
39
|
+
--color-text-secondary: oklch(45% 0 0); /* #6b6b6b - Secondary text */
|
|
40
|
+
--color-text-tertiary: oklch(65% 0 0); /* #a3a3a3 - Muted text */
|
|
41
|
+
--color-text-inverse: oklch(98% 0 0); /* White text on dark */
|
|
42
|
+
|
|
43
|
+
/* Surface Colors */
|
|
44
|
+
--color-surface: oklch(98% 0 0); /* #fafafa - Background */
|
|
45
|
+
--color-surface-elevated: oklch(100% 0 0); /* #ffffff - Cards, modals */
|
|
46
|
+
--color-surface-overlay: oklch(0% 0 0 / 50%); /* #00000050 - Overlays */
|
|
47
|
+
|
|
48
|
+
/* Interactive Colors */
|
|
49
|
+
--color-interactive-primary: oklch(68% 0.21 250); /* Blue - CTAs */
|
|
50
|
+
--color-interactive-hover: oklch(62% 0.22 250); /* Darker blue */
|
|
51
|
+
--color-interactive-active: oklch(55% 0.24 250); /* Even darker */
|
|
52
|
+
--color-interactive-disabled: oklch(85% 0 0); /* Gray - Disabled */
|
|
53
|
+
|
|
54
|
+
/* Feedback Colors */
|
|
55
|
+
--color-success: oklch(72% 0.19 145); /* Green */
|
|
56
|
+
--color-warning: oklch(85% 0.18 85); /* Yellow/Orange */
|
|
57
|
+
--color-error: oklch(63% 0.24 25); /* Red */
|
|
58
|
+
--color-info: oklch(68% 0.21 250); /* Blue - same as primary */
|
|
59
|
+
|
|
60
|
+
/* Border Colors */
|
|
61
|
+
--color-border: oklch(90% 0 0); /* Light gray border */
|
|
62
|
+
--color-border-strong: oklch(75% 0 0); /* Stronger border */
|
|
63
|
+
--color-border-interactive: oklch(68% 0.21 250); /* Focus ring */
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Dark Mode Tokens
|
|
68
|
+
|
|
69
|
+
```css
|
|
70
|
+
@media (prefers-color-scheme: dark) {
|
|
71
|
+
:root {
|
|
72
|
+
--color-text-primary: oklch(92% 0 0);
|
|
73
|
+
--color-text-secondary: oklch(70% 0 0);
|
|
74
|
+
--color-surface: oklch(15% 0 0);
|
|
75
|
+
--color-surface-elevated: oklch(22% 0 0);
|
|
76
|
+
--color-interactive-primary: oklch(75% 0.2 250);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Typography Tokens
|
|
82
|
+
|
|
83
|
+
```css
|
|
84
|
+
:root {
|
|
85
|
+
/* Font Families */
|
|
86
|
+
--font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
|
|
87
|
+
--font-mono: 'JetBrains Mono', 'Fira Code', monospace;
|
|
88
|
+
|
|
89
|
+
/* Type Scale */
|
|
90
|
+
--text-xs: 0.75rem; /* 12px - Captions */
|
|
91
|
+
--text-sm: 0.875rem; /* 14px - Small text */
|
|
92
|
+
--text-base: 1rem; /* 16px - Body */
|
|
93
|
+
--text-lg: 1.125rem; /* 18px - Large body */
|
|
94
|
+
--text-xl: 1.25rem; /* 20px - Subheadings */
|
|
95
|
+
--text-2xl: 1.5rem; /* 24px - Section titles */
|
|
96
|
+
--text-3xl: 1.875rem; /* 30px - Page titles */
|
|
97
|
+
--text-4xl: 2.25rem; /* 36px - Hero */
|
|
98
|
+
--text-hero: clamp(3rem, 1rem + 7vw, 8rem); /* Responsive hero */
|
|
99
|
+
|
|
100
|
+
/* Line Heights */
|
|
101
|
+
--leading-tight: 1.1;
|
|
102
|
+
--leading-snug: 1.25;
|
|
103
|
+
--leading-normal: 1.5;
|
|
104
|
+
--leading-relaxed: 1.75;
|
|
105
|
+
|
|
106
|
+
/* Letter Spacing */
|
|
107
|
+
--tracking-tight: -0.02em;
|
|
108
|
+
--tracking-normal: 0;
|
|
109
|
+
--tracking-wide: 0.02em;
|
|
110
|
+
|
|
111
|
+
/* Font Weights */
|
|
112
|
+
--weight-regular: 400;
|
|
113
|
+
--weight-medium: 500;
|
|
114
|
+
--weight-semibold: 600;
|
|
115
|
+
--weight-bold: 700;
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## Spacing Tokens
|
|
120
|
+
|
|
121
|
+
```css
|
|
122
|
+
:root {
|
|
123
|
+
/* Base: 4px */
|
|
124
|
+
--space-1: 0.25rem; /* 4px */
|
|
125
|
+
--space-2: 0.5rem; /* 8px */
|
|
126
|
+
--space-3: 0.75rem; /* 12px */
|
|
127
|
+
--space-4: 1rem; /* 16px */
|
|
128
|
+
--space-5: 1.5rem; /* 24px */
|
|
129
|
+
--space-6: 2rem; /* 32px */
|
|
130
|
+
--space-8: 3rem; /* 48px */
|
|
131
|
+
--space-10: 4rem; /* 64px */
|
|
132
|
+
--space-12: 6rem; /* 96px */
|
|
133
|
+
--space-section: clamp(4rem, 3rem + 5vw, 10rem); /* Responsive section spacing */
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## Shadow & Elevation Tokens
|
|
138
|
+
|
|
139
|
+
```css
|
|
140
|
+
:root {
|
|
141
|
+
/* Shadows */
|
|
142
|
+
--shadow-sm: 0 1px 2px oklch(0% 0 0 / 5%);
|
|
143
|
+
--shadow-md: 0 4px 6px -1px oklch(0% 0 0 / 10%), 0 2px 4px -2px oklch(0% 0 0 / 10%);
|
|
144
|
+
--shadow-lg: 0 10px 15px -3px oklch(0% 0 0 / 10%), 0 4px 6px -4px oklch(0% 0 0 / 10%);
|
|
145
|
+
--shadow-xl: 0 20px 25px -5px oklch(0% 0 0 / 10%), 0 8px 10px -6px oklch(0% 0 0 / 10%);
|
|
146
|
+
--shadow-glow: 0 0 20px oklch(68% 0.21 250 / 30%);
|
|
147
|
+
|
|
148
|
+
/* Elevation (for layering) */
|
|
149
|
+
--elevation-1: 0 1px 3px var(--shadow-sm);
|
|
150
|
+
--elevation-2: 0 4px 6px var(--shadow-md);
|
|
151
|
+
--elevation-3: 0 10px 15px var(--shadow-lg);
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Border Radius Tokens
|
|
156
|
+
|
|
157
|
+
```css
|
|
158
|
+
:root {
|
|
159
|
+
--radius-sm: 0.25rem; /* 4px - Small elements */
|
|
160
|
+
--radius-md: 0.5rem; /* 8px - Buttons, inputs */
|
|
161
|
+
--radius-lg: 0.75rem; /* 12px - Cards */
|
|
162
|
+
--radius-xl: 1rem; /* 16px - Modals */
|
|
163
|
+
--radius-2xl: 1.5rem; /* 24px - Large containers */
|
|
164
|
+
--radius-full: 9999px; /* Pills, avatars */
|
|
165
|
+
}
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## Animation Tokens
|
|
169
|
+
|
|
170
|
+
```css
|
|
171
|
+
:root {
|
|
172
|
+
/* Durations */
|
|
173
|
+
--duration-fast: 150ms;
|
|
174
|
+
--duration-normal: 300ms;
|
|
175
|
+
--duration-slow: 500ms;
|
|
176
|
+
|
|
177
|
+
/* Easing */
|
|
178
|
+
--ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
|
|
179
|
+
--ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
|
|
180
|
+
--ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
181
|
+
}
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
## Token Naming Conventions
|
|
185
|
+
|
|
186
|
+
Follow semantic naming — describe **purpose**, not value:
|
|
187
|
+
|
|
188
|
+
```css
|
|
189
|
+
/* WRONG - describes the value */
|
|
190
|
+
--color-blue-600: #2563eb;
|
|
191
|
+
--space-16: 4rem;
|
|
192
|
+
|
|
193
|
+
/* CORRECT - describes the role */
|
|
194
|
+
--color-interactive-primary: #2563eb;
|
|
195
|
+
--space-section: 4rem;
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
## Token Categories
|
|
199
|
+
|
|
200
|
+
| Category | Prefix | Example |
|
|
201
|
+
|----------|--------|---------|
|
|
202
|
+
| Color | `--color-` | `--color-text-primary` |
|
|
203
|
+
| Typography | `--typography-` | `--typography-heading-1` |
|
|
204
|
+
| Spacing | `--space-` | `--space-lg` |
|
|
205
|
+
| Sizing | `--size-` | `--size-icon-md` |
|
|
206
|
+
| Border | `--radius-` | `--radius-lg` |
|
|
207
|
+
| Shadow | `--shadow-` | `--shadow-md` |
|
|
208
|
+
| Motion | `--duration-`, `--ease-` | `--duration-fast` |
|
|
209
|
+
|
|
210
|
+
## Exporting Tokens
|
|
211
|
+
|
|
212
|
+
Tokens can be exported to multiple formats:
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
# Using Style Dictionary
|
|
216
|
+
npx style-dictionary build
|
|
217
|
+
|
|
218
|
+
# Generates:
|
|
219
|
+
# - tokens.css (CSS custom properties)
|
|
220
|
+
# - tokens.json (raw JSON)
|
|
221
|
+
# - tokens.js (CommonJS module)
|
|
222
|
+
# - tokens.d.ts (TypeScript definitions)
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
## Applying Tokens in Components
|
|
226
|
+
|
|
227
|
+
```css
|
|
228
|
+
/* Reference tokens, never hardcode */
|
|
229
|
+
.component {
|
|
230
|
+
color: var(--color-text-primary);
|
|
231
|
+
background: var(--color-surface);
|
|
232
|
+
padding: var(--space-lg);
|
|
233
|
+
border-radius: var(--radius-md);
|
|
234
|
+
box-shadow: var(--shadow-md);
|
|
235
|
+
font-size: var(--text-base);
|
|
236
|
+
transition: all var(--duration-fast) var(--ease-out-expo);
|
|
237
|
+
}
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
## Figma Integration
|
|
241
|
+
|
|
242
|
+
When using Figma MCP, extract tokens from:
|
|
243
|
+
|
|
244
|
+
1. **Color styles** → Map to `--color-*` tokens
|
|
245
|
+
2. **Text styles** → Map to `--typography-*` tokens
|
|
246
|
+
3. **Effect styles** → Map to `--shadow-*` tokens
|
|
247
|
+
4. **Auto layout spacing** → Map to `--space-*` tokens
|
|
248
|
+
5. **Component properties** → Map to semantic role tokens
|
|
249
|
+
|
|
250
|
+
Tokens bridge the gap between design tools and code — they ensure that what designers specify in Figma translates directly to production code.
|
|
@@ -11,7 +11,7 @@ Creates releases with consistent versioning, accurate changelogs, and proper tag
|
|
|
11
11
|
## When to Activate
|
|
12
12
|
|
|
13
13
|
Activate when:
|
|
14
|
-
- A
|
|
14
|
+
- A release is complete and ready to ship
|
|
15
15
|
- You need to cut a release tag
|
|
16
16
|
- You need to generate a CHANGELOG entry
|
|
17
17
|
|
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ui-design
|
|
3
|
+
description: UI/visual design patterns, component templates, and layout best practices for creating attractive websites
|
|
4
|
+
origin: Built for FlowDeck's design agent workflow
|
|
5
|
+
tags:
|
|
6
|
+
- design
|
|
7
|
+
- ui
|
|
8
|
+
- frontend
|
|
9
|
+
- templates
|
|
10
|
+
- components
|
|
11
|
+
- layout
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# UI Design Skill
|
|
15
|
+
|
|
16
|
+
This skill provides component templates, layout patterns, and design guidance for creating attractive, production-ready websites.
|
|
17
|
+
|
|
18
|
+
## Component Templates
|
|
19
|
+
|
|
20
|
+
### Buttons
|
|
21
|
+
|
|
22
|
+
```html
|
|
23
|
+
<!-- Primary Button -->
|
|
24
|
+
<button class="btn btn-primary">
|
|
25
|
+
<span>Get Started</span>
|
|
26
|
+
<svg class="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
27
|
+
<path d="M5 12h14M12 5l7 7-7 7"/>
|
|
28
|
+
</svg>
|
|
29
|
+
</button>
|
|
30
|
+
|
|
31
|
+
<!-- CSS -->
|
|
32
|
+
.btn {
|
|
33
|
+
display: inline-flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
gap: 0.5rem;
|
|
36
|
+
padding: 0.75rem 1.5rem;
|
|
37
|
+
border-radius: var(--radius-md);
|
|
38
|
+
font-weight: 500;
|
|
39
|
+
transition: all var(--duration-fast) var(--ease-out-expo);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.btn-primary {
|
|
43
|
+
background: var(--color-interactive-primary);
|
|
44
|
+
color: white;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.btn-primary:hover {
|
|
48
|
+
transform: translateY(-1px);
|
|
49
|
+
box-shadow: var(--shadow-md);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.btn-primary:active {
|
|
53
|
+
transform: translateY(0);
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Cards
|
|
58
|
+
|
|
59
|
+
```html
|
|
60
|
+
<div class="card">
|
|
61
|
+
<div class="card-media">
|
|
62
|
+
<img src="..." alt="..." loading="lazy"/>
|
|
63
|
+
</div>
|
|
64
|
+
<div class="card-body">
|
|
65
|
+
<h3 class="card-title">Card Title</h3>
|
|
66
|
+
<p class="card-description">Supporting text that explains the card content.</p>
|
|
67
|
+
<div class="card-footer">
|
|
68
|
+
<button class="btn btn-outline">Learn More</button>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
|
|
73
|
+
<!-- CSS -->
|
|
74
|
+
.card {
|
|
75
|
+
background: var(--color-surface);
|
|
76
|
+
border-radius: var(--radius-lg);
|
|
77
|
+
overflow: hidden;
|
|
78
|
+
transition: all var(--duration-normal) var(--ease-out-expo);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.card:hover {
|
|
82
|
+
transform: translateY(-2px);
|
|
83
|
+
box-shadow: var(--shadow-lg);
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Forms
|
|
88
|
+
|
|
89
|
+
```html
|
|
90
|
+
<form class="form">
|
|
91
|
+
<div class="form-group">
|
|
92
|
+
<label for="email" class="form-label">Email Address</label>
|
|
93
|
+
<input
|
|
94
|
+
type="email"
|
|
95
|
+
id="email"
|
|
96
|
+
class="form-input"
|
|
97
|
+
placeholder="you@example.com"
|
|
98
|
+
autocomplete="email"
|
|
99
|
+
/>
|
|
100
|
+
<span class="form-error">Please enter a valid email</span>
|
|
101
|
+
</div>
|
|
102
|
+
<button type="submit" class="btn btn-primary btn-full">Submit</button>
|
|
103
|
+
</form>
|
|
104
|
+
|
|
105
|
+
<!-- CSS -->
|
|
106
|
+
.form-group {
|
|
107
|
+
display: flex;
|
|
108
|
+
flex-direction: column;
|
|
109
|
+
gap: 0.5rem;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.form-input {
|
|
113
|
+
padding: 0.75rem 1rem;
|
|
114
|
+
border: 1px solid var(--color-border);
|
|
115
|
+
border-radius: var(--radius-md);
|
|
116
|
+
transition: border-color var(--duration-fast);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.form-input:focus {
|
|
120
|
+
outline: none;
|
|
121
|
+
border-color: var(--color-interactive-primary);
|
|
122
|
+
box-shadow: 0 0 0 3px var(--color-interactive-primary-alpha);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.form-error {
|
|
126
|
+
color: var(--color-error);
|
|
127
|
+
font-size: var(--typography-caption);
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## Layout Patterns
|
|
132
|
+
|
|
133
|
+
### Hero Section
|
|
134
|
+
|
|
135
|
+
```html
|
|
136
|
+
<section class="hero">
|
|
137
|
+
<div class="hero-content">
|
|
138
|
+
<h1 class="hero-heading">Build Something Amazing</h1>
|
|
139
|
+
<p class="hero-subheading">The modern platform for creating and deploying web applications.</p>
|
|
140
|
+
<div class="hero-actions">
|
|
141
|
+
<button class="btn btn-primary btn-lg">Get Started</button>
|
|
142
|
+
<button class="btn btn-outline btn-lg">View Demo</button>
|
|
143
|
+
</div>
|
|
144
|
+
</div>
|
|
145
|
+
<div class="hero-visual">
|
|
146
|
+
<div class="hero-image"></div>
|
|
147
|
+
</div>
|
|
148
|
+
</section>
|
|
149
|
+
|
|
150
|
+
<!-- CSS -->
|
|
151
|
+
.hero {
|
|
152
|
+
display: grid;
|
|
153
|
+
grid-template-columns: 1fr 1fr;
|
|
154
|
+
gap: var(--space-section);
|
|
155
|
+
align-items: center;
|
|
156
|
+
padding: var(--space-section) 0;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.hero-heading {
|
|
160
|
+
font-size: var(--text-hero);
|
|
161
|
+
font-weight: 700;
|
|
162
|
+
line-height: 1.1;
|
|
163
|
+
letter-spacing: -0.02em;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.hero-subheading {
|
|
167
|
+
font-size: var(--text-lg);
|
|
168
|
+
color: var(--color-text-secondary);
|
|
169
|
+
margin-top: 1.5rem;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.hero-actions {
|
|
173
|
+
display: flex;
|
|
174
|
+
gap: 1rem;
|
|
175
|
+
margin-top: 2rem;
|
|
176
|
+
}
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### Bento Grid
|
|
180
|
+
|
|
181
|
+
```html
|
|
182
|
+
<div class="bento-grid">
|
|
183
|
+
<div class="bento-item bento-tall bento-featured">
|
|
184
|
+
<h3>Featured Content</h3>
|
|
185
|
+
<p>Larger cell spanning multiple rows</p>
|
|
186
|
+
</div>
|
|
187
|
+
<div class="bento-item">
|
|
188
|
+
<h3>Quick Stat</h3>
|
|
189
|
+
<span class="stat-value">2.4M</span>
|
|
190
|
+
</div>
|
|
191
|
+
<div class="bento-item">
|
|
192
|
+
<h3>Recent Activity</h3>
|
|
193
|
+
<p>Compact info card</p>
|
|
194
|
+
</div>
|
|
195
|
+
<div class="bento-item bento-wide">
|
|
196
|
+
<h3>Wide Card</h3>
|
|
197
|
+
<p>Spans multiple columns</p>
|
|
198
|
+
</div>
|
|
199
|
+
</div>
|
|
200
|
+
|
|
201
|
+
<!-- CSS -->
|
|
202
|
+
.bento-grid {
|
|
203
|
+
display: grid;
|
|
204
|
+
grid-template-columns: repeat(4, 1fr);
|
|
205
|
+
gap: var(--spacing-lg);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.bento-tall { grid-row: span 2; }
|
|
209
|
+
.bento-wide { grid-column: span 2; }
|
|
210
|
+
.bento-featured { background: var(--color-accent-surface); }
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### Dashboard Layout
|
|
214
|
+
|
|
215
|
+
```html
|
|
216
|
+
<div class="dashboard">
|
|
217
|
+
<aside class="sidebar">
|
|
218
|
+
<nav class="nav">
|
|
219
|
+
<a href="#" class="nav-item active">
|
|
220
|
+
<svg class="icon"><!-- dashboard icon --></svg>
|
|
221
|
+
Dashboard
|
|
222
|
+
</a>
|
|
223
|
+
<a href="#" class="nav-item">
|
|
224
|
+
<svg class="icon"><!-- analytics icon --></svg>
|
|
225
|
+
Analytics
|
|
226
|
+
</a>
|
|
227
|
+
</nav>
|
|
228
|
+
</aside>
|
|
229
|
+
<main class="main">
|
|
230
|
+
<header class="page-header">
|
|
231
|
+
<h1>Dashboard</h1>
|
|
232
|
+
<button class="btn btn-primary">Create New</button>
|
|
233
|
+
</header>
|
|
234
|
+
<div class="stats-grid">
|
|
235
|
+
<div class="stat-card">
|
|
236
|
+
<span class="stat-label">Total Users</span>
|
|
237
|
+
<span class="stat-value">12,345</span>
|
|
238
|
+
<span class="stat-change positive">+8.2%</span>
|
|
239
|
+
</div>
|
|
240
|
+
</div>
|
|
241
|
+
</main>
|
|
242
|
+
</div>
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
## Design Token Usage
|
|
246
|
+
|
|
247
|
+
**CRITICAL**: Always use semantic tokens, never hardcoded values.
|
|
248
|
+
|
|
249
|
+
```css
|
|
250
|
+
/* WRONG - hardcoded values */
|
|
251
|
+
color: #2563eb;
|
|
252
|
+
padding: 16px;
|
|
253
|
+
font-size: 18px;
|
|
254
|
+
|
|
255
|
+
/* CORRECT - semantic tokens */
|
|
256
|
+
color: var(--color-interactive-primary);
|
|
257
|
+
padding: var(--spacing-lg);
|
|
258
|
+
font-size: var(--typography-body-lg);
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
## Animation Principles
|
|
262
|
+
|
|
263
|
+
Use compositor-friendly properties only:
|
|
264
|
+
- `transform` (translate, scale, rotate)
|
|
265
|
+
- `opacity`
|
|
266
|
+
- `clip-path`
|
|
267
|
+
|
|
268
|
+
Avoid animating:
|
|
269
|
+
- `width`, `height`
|
|
270
|
+
- `margin`, `padding`
|
|
271
|
+
- `border`
|
|
272
|
+
- `font-size`
|
|
273
|
+
|
|
274
|
+
```css
|
|
275
|
+
/* Micro-interactions */
|
|
276
|
+
.card:hover {
|
|
277
|
+
transform: translateY(-2px);
|
|
278
|
+
opacity: 1;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/* Reduced motion */
|
|
282
|
+
@media (prefers-reduced-motion: reduce) {
|
|
283
|
+
*, *::before, *::after {
|
|
284
|
+
animation-duration: 0.01ms !important;
|
|
285
|
+
transition-duration: 0.01ms !important;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
## Accessibility
|
|
291
|
+
|
|
292
|
+
- Color contrast: minimum 4.5:1 for normal text, 3:1 for large text
|
|
293
|
+
- Focus states: visible outline on keyboard navigation
|
|
294
|
+
- ARIA labels for icon-only buttons
|
|
295
|
+
- Semantic HTML: use `<button>` for actions, `<a>` for navigation
|
|
296
|
+
|
|
297
|
+
## Anti-Template Patterns
|
|
298
|
+
|
|
299
|
+
**STOP** — These look like generic templates, not intentional design:
|
|
300
|
+
|
|
301
|
+
- ❌ Uniform card grid with equal spacing everywhere
|
|
302
|
+
- ❌ Centered hero with gradient blob and "Get Started" CTA
|
|
303
|
+
- ❌ Sidebar with 5 identical nav items
|
|
304
|
+
- ❌ Flat gray background with white cards
|
|
305
|
+
- ❌ One font size used for everything
|
|
306
|
+
|
|
307
|
+
**DO** instead:
|
|
308
|
+
- ✓ Clear hierarchy through scale contrast
|
|
309
|
+
- ✓ Intentional rhythm in spacing (not uniform)
|
|
310
|
+
- ✓ Depth through shadows, overlap, or layering
|
|
311
|
+
- ✓ Typography with character and pairing strategy
|
|
312
|
+
- ✓ Hover/focus states that feel designed
|
|
313
|
+
- ✓ Grid-breaking editorial or bento composition
|