@jaimevalasek/aioson 1.30.0 → 1.30.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/docs/design-previews/cognitive-core-ui-auth.html +95 -0
- package/docs/design-previews/cognitive-core-ui-kanban.html +231 -0
- package/docs/design-previews/cognitive-core-ui-list-detail.html +174 -0
- package/docs/design-previews/cognitive-core-ui-preview.css +1315 -0
- package/docs/design-previews/cognitive-core-ui-settings.html +142 -0
- package/docs/design-previews/cognitive-core-ui-website.html +190 -1009
- package/docs/design-previews/cognitive-core-ui.html +281 -463
- package/docs/design-previews/index.html +83 -31
- package/package.json +1 -1
- package/src/constants.js +578 -514
- package/template/.aioson/docs/integrations/dashboard-app-form-publish-mapping.md +183 -0
- package/template/.aioson/docs/play/README.md +74 -0
- package/template/.aioson/docs/play/agent-usage-guide.md +112 -0
- package/template/.aioson/docs/play/app-compatibility-guide.md +117 -0
- package/template/.aioson/docs/play/auth-services-and-testing.md +235 -0
- package/template/.aioson/docs/play/llm-data-and-bindings.md +238 -0
- package/template/.aioson/docs/play/manifest-and-runtime.md +267 -0
- package/template/.aioson/docs/play/source-map.md +104 -0
- package/template/.aioson/skills/design/aurora-command-ui/SKILL.md +266 -243
- package/template/.aioson/skills/design/aurora-command-ui/references/art-direction.md +293 -293
- package/template/.aioson/skills/design/aurora-command-ui/references/components.md +827 -827
- package/template/.aioson/skills/design/aurora-command-ui/references/dashboards.md +250 -250
- package/template/.aioson/skills/design/aurora-command-ui/references/design-tokens.md +585 -585
- package/template/.aioson/skills/design/aurora-command-ui/references/motion.md +365 -365
- package/template/.aioson/skills/design/aurora-command-ui/references/patterns.md +485 -482
- package/template/.aioson/skills/design/aurora-command-ui/references/websites.md +386 -387
- package/template/.aioson/skills/design/bold-editorial-ui/SKILL.md +228 -205
- package/template/.aioson/skills/design/bold-editorial-ui/references/art-direction.md +338 -338
- package/template/.aioson/skills/design/bold-editorial-ui/references/components.md +977 -977
- package/template/.aioson/skills/design/bold-editorial-ui/references/dashboards.md +218 -218
- package/template/.aioson/skills/design/bold-editorial-ui/references/design-tokens.md +326 -326
- package/template/.aioson/skills/design/bold-editorial-ui/references/motion.md +461 -461
- package/template/.aioson/skills/design/bold-editorial-ui/references/patterns.md +293 -293
- package/template/.aioson/skills/design/bold-editorial-ui/references/websites.md +352 -352
- package/template/.aioson/skills/design/clean-saas-ui/SKILL.md +233 -210
- package/template/.aioson/skills/design/clean-saas-ui/references/art-direction.md +319 -319
- package/template/.aioson/skills/design/clean-saas-ui/references/components.md +365 -365
- package/template/.aioson/skills/design/clean-saas-ui/references/dashboards.md +196 -196
- package/template/.aioson/skills/design/clean-saas-ui/references/design-tokens.md +244 -244
- package/template/.aioson/skills/design/clean-saas-ui/references/motion.md +235 -235
- package/template/.aioson/skills/design/clean-saas-ui/references/patterns.md +215 -215
- package/template/.aioson/skills/design/clean-saas-ui/references/websites.md +295 -295
- package/template/.aioson/skills/design/cognitive-core-ui/SKILL.md +239 -203
- package/template/.aioson/skills/design/cognitive-core-ui/references/art-direction.md +339 -339
- package/template/.aioson/skills/design/cognitive-core-ui/references/components.md +417 -407
- package/template/.aioson/skills/design/cognitive-core-ui/references/dashboards.md +289 -272
- package/template/.aioson/skills/design/cognitive-core-ui/references/design-tokens.md +525 -524
- package/template/.aioson/skills/design/cognitive-core-ui/references/motion.md +279 -279
- package/template/.aioson/skills/design/cognitive-core-ui/references/patterns.md +355 -289
- package/template/.aioson/skills/design/cognitive-core-ui/references/websites.md +443 -437
- package/template/.aioson/skills/design/glassmorphism-ui/SKILL.md +245 -222
- package/template/.aioson/skills/design/glassmorphism-ui/references/art-direction.md +159 -159
- package/template/.aioson/skills/design/glassmorphism-ui/references/components.md +498 -498
- package/template/.aioson/skills/design/glassmorphism-ui/references/dashboards.md +236 -236
- package/template/.aioson/skills/design/glassmorphism-ui/references/design-tokens.md +274 -274
- package/template/.aioson/skills/design/glassmorphism-ui/references/motion.md +355 -355
- package/template/.aioson/skills/design/glassmorphism-ui/references/patterns.md +198 -198
- package/template/.aioson/skills/design/glassmorphism-ui/references/websites.md +307 -307
- package/template/.aioson/skills/design/interface-design/SKILL.md +68 -47
- package/template/.aioson/skills/design/interface-design/references/components-and-states.md +105 -105
- package/template/.aioson/skills/design/interface-design/references/design-directions.md +101 -101
- package/template/.aioson/skills/design/interface-design/references/handoff-and-quality.md +92 -71
- package/template/.aioson/skills/design/interface-design/references/intent-and-domain.md +74 -74
- package/template/.aioson/skills/design/interface-design/references/tokens-and-depth.md +173 -173
- package/template/.aioson/skills/design/neo-brutalist-ui/SKILL.md +236 -213
- package/template/.aioson/skills/design/neo-brutalist-ui/references/art-direction.md +228 -228
- package/template/.aioson/skills/design/neo-brutalist-ui/references/components.md +855 -855
- package/template/.aioson/skills/design/neo-brutalist-ui/references/dashboards.md +334 -334
- package/template/.aioson/skills/design/neo-brutalist-ui/references/design-tokens.md +342 -342
- package/template/.aioson/skills/design/neo-brutalist-ui/references/motion.md +286 -286
- package/template/.aioson/skills/design/neo-brutalist-ui/references/patterns.md +458 -458
- package/template/.aioson/skills/design/neo-brutalist-ui/references/websites.md +723 -723
- package/template/.aioson/skills/design/premium-command-center-ui/SKILL.md +83 -62
- package/template/.aioson/skills/design/premium-command-center-ui/references/operations.md +74 -74
- package/template/.aioson/skills/design/premium-command-center-ui/references/patterns.md +116 -116
- package/template/.aioson/skills/design/premium-command-center-ui/references/validation.md +47 -47
- package/template/.aioson/skills/design/premium-command-center-ui/references/visual-system.md +215 -215
- package/template/.aioson/skills/design/pt.squarespace.com/.skill-meta.json +31 -31
- package/template/.aioson/skills/design/pt.squarespace.com/SKILL.md +94 -66
- package/template/.aioson/skills/design/pt.squarespace.com/references/components.md +366 -366
- package/template/.aioson/skills/design/pt.squarespace.com/references/design-tokens.md +150 -150
- package/template/.aioson/skills/design/pt.squarespace.com/references/motion.md +270 -270
- package/template/.aioson/skills/design/pt.squarespace.com/references/patterns.md +189 -189
- package/template/.aioson/skills/design/pt.squarespace.com/references/websites.md +161 -161
- package/template/.aioson/skills/design/warm-craft-ui/SKILL.md +232 -209
- package/template/.aioson/skills/design/warm-craft-ui/references/art-direction.md +324 -324
- package/template/.aioson/skills/design/warm-craft-ui/references/components.md +508 -508
- package/template/.aioson/skills/design/warm-craft-ui/references/dashboards.md +223 -223
- package/template/.aioson/skills/design/warm-craft-ui/references/design-tokens.md +374 -374
- package/template/.aioson/skills/design/warm-craft-ui/references/motion.md +356 -356
- package/template/.aioson/skills/design/warm-craft-ui/references/patterns.md +288 -288
- package/template/.aioson/skills/design/warm-craft-ui/references/websites.md +289 -289
|
@@ -1,279 +1,279 @@
|
|
|
1
|
-
# Motion — Cognitive Core UI
|
|
2
|
-
|
|
3
|
-
Read after `design-tokens.md`. Add to context only when motion materially improves the result.
|
|
4
|
-
|
|
5
|
-
Motion is **purposeful and restrained**. Dashboards use minimal motion. Landing pages use more dramatic entrances and scroll effects.
|
|
6
|
-
|
|
7
|
-
> **For landing pages / sales pages / event pages:** also load `skills/static/landing-page-forge.md` — it provides GSAP and AnimeJS integration patterns for horizontal scroll, magnetic mouse effects, hero sequences, and the full performance + tracking checklist.
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## Principles
|
|
12
|
-
|
|
13
|
-
1. **Functional first** — every animation communicates state change or hierarchy
|
|
14
|
-
2. **Fast transitions** — UI state: 140ms. Theme: 240ms. Entrances: 400–600ms
|
|
15
|
-
3. **Ease curves** — default `ease`. Entrances: `cubic-bezier(0.16, 1, 0.3, 1)` (smooth decelerate)
|
|
16
|
-
4. **No bounce, no elastic** — this is a command center, not a toy
|
|
17
|
-
5. **Always include** `@media (prefers-reduced-motion: reduce)` fallback
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
## CSS Keyframes
|
|
22
|
-
|
|
23
|
-
```css
|
|
24
|
-
@keyframes fadeInUp {
|
|
25
|
-
from { opacity: 0; transform: translateY(20px); }
|
|
26
|
-
to { opacity: 1; transform: translateY(0); }
|
|
27
|
-
}
|
|
28
|
-
@keyframes fadeInDown {
|
|
29
|
-
from { opacity: 0; transform: translateY(-12px); }
|
|
30
|
-
to { opacity: 1; transform: translateY(0); }
|
|
31
|
-
}
|
|
32
|
-
@keyframes fadeIn {
|
|
33
|
-
from { opacity: 0; }
|
|
34
|
-
to { opacity: 1; }
|
|
35
|
-
}
|
|
36
|
-
@keyframes slideInLeft {
|
|
37
|
-
from { opacity: 0; transform: translateX(-20px); }
|
|
38
|
-
to { opacity: 1; transform: translateX(0); }
|
|
39
|
-
}
|
|
40
|
-
@keyframes slideInRight {
|
|
41
|
-
from { opacity: 0; transform: translateX(20px); }
|
|
42
|
-
to { opacity: 1; transform: translateX(0); }
|
|
43
|
-
}
|
|
44
|
-
@keyframes scaleIn {
|
|
45
|
-
from { opacity: 0; transform: scale(0.95); }
|
|
46
|
-
to { opacity: 1; transform: scale(1); }
|
|
47
|
-
}
|
|
48
|
-
@keyframes pulseGlow {
|
|
49
|
-
0%, 100% { box-shadow: 0 0 20px var(--accent-glow); }
|
|
50
|
-
50% { box-shadow: var(--shadow-glow-strong); }
|
|
51
|
-
}
|
|
52
|
-
@keyframes shimmer {
|
|
53
|
-
0% { background-position: -200% 0; }
|
|
54
|
-
100% { background-position: 200% 0; }
|
|
55
|
-
}
|
|
56
|
-
@keyframes progressFill {
|
|
57
|
-
from { width: 0%; }
|
|
58
|
-
}
|
|
59
|
-
@keyframes countUp {
|
|
60
|
-
from { opacity: 0; transform: translateY(8px); }
|
|
61
|
-
to { opacity: 1; transform: translateY(0); }
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/* Reduced motion fallback */
|
|
65
|
-
@media (prefers-reduced-motion: reduce) {
|
|
66
|
-
*, *::before, *::after {
|
|
67
|
-
animation-duration: 0.01ms !important;
|
|
68
|
-
transition-duration: 0.01ms !important;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
---
|
|
74
|
-
|
|
75
|
-
## Entrance Patterns
|
|
76
|
-
|
|
77
|
-
### Dashboard Page Load (staggered)
|
|
78
|
-
|
|
79
|
-
```
|
|
80
|
-
Top bar: fadeInDown 0ms 300ms
|
|
81
|
-
Stats row: fadeInUp 100ms 400ms (each card +80ms delay)
|
|
82
|
-
Tab bar: fadeIn 250ms 300ms
|
|
83
|
-
Sidebar: slideInLeft 200ms 400ms
|
|
84
|
-
Content: fadeInUp 350ms 500ms (each card in grid +60ms stagger)
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
**React helper:**
|
|
88
|
-
```jsx
|
|
89
|
-
const stagger = (index, base = 0, step = 60) => ({
|
|
90
|
-
animation: `fadeInUp 500ms cubic-bezier(0.16, 1, 0.3, 1) ${base + index * step}ms both`,
|
|
91
|
-
});
|
|
92
|
-
// Usage on each card: style={{ ...stagger(cardIndex, 350) }}
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
### Landing Page Hero
|
|
96
|
-
|
|
97
|
-
```
|
|
98
|
-
Mono label: fadeInUp 0ms 500ms
|
|
99
|
-
Heading: fadeInUp 150ms 600ms
|
|
100
|
-
Subtitle: fadeInUp 300ms 500ms
|
|
101
|
-
CTA buttons: fadeInUp 450ms 500ms
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
### Modal
|
|
105
|
-
|
|
106
|
-
```css
|
|
107
|
-
.modal-backdrop { animation: fadeIn 200ms ease both; }
|
|
108
|
-
.modal-content { animation: scaleIn 300ms cubic-bezier(0.16, 1, 0.3, 1) both; }
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
---
|
|
112
|
-
|
|
113
|
-
## Expression-Aware Motion
|
|
114
|
-
|
|
115
|
-
Match motion to the expression mode chosen in `references/art-direction.md`.
|
|
116
|
-
|
|
117
|
-
### Tactical Monolith
|
|
118
|
-
- Keep motion short, directional, and low drama
|
|
119
|
-
- Prefer panel reveals, status updates, and quiet count-up behavior
|
|
120
|
-
- Avoid floaty motion, oversized parallax, or decorative loops
|
|
121
|
-
|
|
122
|
-
### Quiet Graphite
|
|
123
|
-
- Use soft fades, small elevation shifts, and measured reveal delays
|
|
124
|
-
- Let motion reinforce polish, not spectacle
|
|
125
|
-
|
|
126
|
-
### Signal Editorial
|
|
127
|
-
- Use more narrative sequencing: headings, side notes, proof blocks, and media can enter in layered stages
|
|
128
|
-
- Favor stagger and reveal rhythm over obvious bounce or glow pulses
|
|
129
|
-
|
|
130
|
-
### Luminous Light
|
|
131
|
-
- Keep motion crisp and clean
|
|
132
|
-
- Favor focus, control feedback, and gentle surface lifts over cinematic effects
|
|
133
|
-
|
|
134
|
-
### Industrial Flow
|
|
135
|
-
- Motion should feel functional and linear
|
|
136
|
-
- Sliding panels, queue shifts, progress fills, and status transitions work better than float or blur-heavy effects
|
|
137
|
-
|
|
138
|
-
### Gallery Intelligence
|
|
139
|
-
- Let media frames, profile blocks, and showcase surfaces reveal with slightly richer sequencing
|
|
140
|
-
- Keep metadata motion subtle so the content remains primary
|
|
141
|
-
|
|
142
|
-
---
|
|
143
|
-
|
|
144
|
-
## Hover Effects
|
|
145
|
-
|
|
146
|
-
### Card Hover
|
|
147
|
-
|
|
148
|
-
```jsx
|
|
149
|
-
onMouseEnter={e => {
|
|
150
|
-
e.currentTarget.style.borderColor = 'var(--border-medium)';
|
|
151
|
-
e.currentTarget.style.boxShadow = 'var(--shadow-glow)';
|
|
152
|
-
e.currentTarget.style.transform = 'translateY(-2px)';
|
|
153
|
-
}}
|
|
154
|
-
onMouseLeave={e => {
|
|
155
|
-
e.currentTarget.style.borderColor = '';
|
|
156
|
-
e.currentTarget.style.boxShadow = 'none';
|
|
157
|
-
e.currentTarget.style.transform = '';
|
|
158
|
-
}}
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
Card must have: `transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease`
|
|
162
|
-
|
|
163
|
-
### Button Hover
|
|
164
|
-
```
|
|
165
|
-
Primary: background → var(--accent-hover)
|
|
166
|
-
Secondary: borderColor → var(--border-accent), color → var(--text-accent)
|
|
167
|
-
transition: 150ms ease
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
### Tab Hover (non-active)
|
|
171
|
-
`background: var(--bg-elevated)`, `border-radius: var(--radius-md) var(--radius-md) 0 0`
|
|
172
|
-
|
|
173
|
-
### Sidebar Item Hover
|
|
174
|
-
`background: var(--bg-elevated)`, `color: var(--text-primary)`
|
|
175
|
-
|
|
176
|
-
---
|
|
177
|
-
|
|
178
|
-
## Loading States
|
|
179
|
-
|
|
180
|
-
### Skeleton Shimmer
|
|
181
|
-
|
|
182
|
-
```jsx
|
|
183
|
-
const skeletonStyle = {
|
|
184
|
-
background: `linear-gradient(90deg,
|
|
185
|
-
var(--bg-elevated) 25%,
|
|
186
|
-
var(--bg-overlay) 50%,
|
|
187
|
-
var(--bg-elevated) 75%)`,
|
|
188
|
-
backgroundSize: '200% 100%',
|
|
189
|
-
animation: 'shimmer 1.5s ease-in-out infinite',
|
|
190
|
-
borderRadius: 'var(--radius-md)',
|
|
191
|
-
};
|
|
192
|
-
// Usage: <div style={{ ...skeletonStyle, height: 20, width: '60%', marginBottom: 8 }} />
|
|
193
|
-
```
|
|
194
|
-
|
|
195
|
-
### Pulse Glow (Mode Panel when active)
|
|
196
|
-
```css
|
|
197
|
-
animation: pulseGlow 3s ease-in-out infinite;
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
### Progress Bar Fill (on mount)
|
|
201
|
-
```css
|
|
202
|
-
animation: progressFill 800ms cubic-bezier(0.16, 1, 0.3, 1) both;
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
### Stat Number Count-up
|
|
206
|
-
```css
|
|
207
|
-
animation: countUp 600ms cubic-bezier(0.16, 1, 0.3, 1) both;
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
---
|
|
211
|
-
|
|
212
|
-
## Scroll-Triggered Animations (Landing Pages)
|
|
213
|
-
|
|
214
|
-
```jsx
|
|
215
|
-
function useScrollReveal(ref, delay = 0) {
|
|
216
|
-
const [visible, setVisible] = useState(false);
|
|
217
|
-
useEffect(() => {
|
|
218
|
-
const obs = new IntersectionObserver(
|
|
219
|
-
([e]) => { if (e.isIntersecting) { setVisible(true); obs.disconnect(); } },
|
|
220
|
-
{ threshold: 0.15 }
|
|
221
|
-
);
|
|
222
|
-
if (ref.current) obs.observe(ref.current);
|
|
223
|
-
return () => obs.disconnect();
|
|
224
|
-
}, []);
|
|
225
|
-
return {
|
|
226
|
-
opacity: visible ? 1 : 0,
|
|
227
|
-
transform: visible ? 'translateY(0)' : 'translateY(24px)',
|
|
228
|
-
transition: `opacity 600ms cubic-bezier(0.16,1,0.3,1) ${delay}ms,
|
|
229
|
-
transform 600ms cubic-bezier(0.16,1,0.3,1) ${delay}ms`,
|
|
230
|
-
};
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
// Usage:
|
|
234
|
-
const ref = useRef(null);
|
|
235
|
-
const reveal = useScrollReveal(ref, 100);
|
|
236
|
-
<div ref={ref} style={reveal}>...</div>
|
|
237
|
-
```
|
|
238
|
-
|
|
239
|
-
**CSS-only alternative (no JS):**
|
|
240
|
-
```css
|
|
241
|
-
.reveal {
|
|
242
|
-
opacity: 0; transform: translateY(24px);
|
|
243
|
-
transition: opacity 600ms cubic-bezier(0.16,1,0.3,1), transform 600ms cubic-bezier(0.16,1,0.3,1);
|
|
244
|
-
}
|
|
245
|
-
.reveal.visible { opacity: 1; transform: translateY(0); }
|
|
246
|
-
```
|
|
247
|
-
|
|
248
|
-
---
|
|
249
|
-
|
|
250
|
-
## Theme Transition
|
|
251
|
-
|
|
252
|
-
Apply to ALL themed containers so dark/light switch feels smooth:
|
|
253
|
-
|
|
254
|
-
```jsx
|
|
255
|
-
const TT = { transition: 'background 240ms ease, color 240ms ease, border-color 240ms ease, box-shadow 240ms ease' };
|
|
256
|
-
// Or in CSS: transition: var(--transition-theme);
|
|
257
|
-
```
|
|
258
|
-
|
|
259
|
-
---
|
|
260
|
-
|
|
261
|
-
## When to Use What
|
|
262
|
-
|
|
263
|
-
| Context | Level | Techniques |
|
|
264
|
-
|---|---|---|
|
|
265
|
-
| Dashboard | Minimal | Card hover, tab switch, theme transition, progress fill |
|
|
266
|
-
| Landing page | Moderate | Staggered entrances, scroll reveals, hero sequence, card hovers |
|
|
267
|
-
| Frontpage | Moderate | Hero entrance, scroll reveals, CTA glow pulse |
|
|
268
|
-
| Modal/Detail | Light | scaleIn entrance, fadeIn backdrop |
|
|
269
|
-
| Loading state | Ambient | Skeleton shimmer, pulse glow |
|
|
270
|
-
| Admin CRUD | None/minimal | Only theme transition + hover states |
|
|
271
|
-
|
|
272
|
-
---
|
|
273
|
-
|
|
274
|
-
## Anti-Generic Motion Rules
|
|
275
|
-
|
|
276
|
-
- Do not use the same stagger recipe on every page type.
|
|
277
|
-
- Do not animate everything just because motion is available.
|
|
278
|
-
- One memorable sequence beats constant moving surfaces.
|
|
279
|
-
- If motion draws more attention than hierarchy or content, reduce it.
|
|
1
|
+
# Motion — Cognitive Core UI
|
|
2
|
+
|
|
3
|
+
Read after `design-tokens.md`. Add to context only when motion materially improves the result.
|
|
4
|
+
|
|
5
|
+
Motion is **purposeful and restrained**. Dashboards use minimal motion. Landing pages use more dramatic entrances and scroll effects.
|
|
6
|
+
|
|
7
|
+
> **For landing pages / sales pages / event pages:** also load `skills/static/landing-page-forge.md` — it provides GSAP and AnimeJS integration patterns for horizontal scroll, magnetic mouse effects, hero sequences, and the full performance + tracking checklist.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Principles
|
|
12
|
+
|
|
13
|
+
1. **Functional first** — every animation communicates state change or hierarchy
|
|
14
|
+
2. **Fast transitions** — UI state: 140ms. Theme: 240ms. Entrances: 400–600ms
|
|
15
|
+
3. **Ease curves** — default `ease`. Entrances: `cubic-bezier(0.16, 1, 0.3, 1)` (smooth decelerate)
|
|
16
|
+
4. **No bounce, no elastic** — this is a command center, not a toy
|
|
17
|
+
5. **Always include** `@media (prefers-reduced-motion: reduce)` fallback
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## CSS Keyframes
|
|
22
|
+
|
|
23
|
+
```css
|
|
24
|
+
@keyframes fadeInUp {
|
|
25
|
+
from { opacity: 0; transform: translateY(20px); }
|
|
26
|
+
to { opacity: 1; transform: translateY(0); }
|
|
27
|
+
}
|
|
28
|
+
@keyframes fadeInDown {
|
|
29
|
+
from { opacity: 0; transform: translateY(-12px); }
|
|
30
|
+
to { opacity: 1; transform: translateY(0); }
|
|
31
|
+
}
|
|
32
|
+
@keyframes fadeIn {
|
|
33
|
+
from { opacity: 0; }
|
|
34
|
+
to { opacity: 1; }
|
|
35
|
+
}
|
|
36
|
+
@keyframes slideInLeft {
|
|
37
|
+
from { opacity: 0; transform: translateX(-20px); }
|
|
38
|
+
to { opacity: 1; transform: translateX(0); }
|
|
39
|
+
}
|
|
40
|
+
@keyframes slideInRight {
|
|
41
|
+
from { opacity: 0; transform: translateX(20px); }
|
|
42
|
+
to { opacity: 1; transform: translateX(0); }
|
|
43
|
+
}
|
|
44
|
+
@keyframes scaleIn {
|
|
45
|
+
from { opacity: 0; transform: scale(0.95); }
|
|
46
|
+
to { opacity: 1; transform: scale(1); }
|
|
47
|
+
}
|
|
48
|
+
@keyframes pulseGlow {
|
|
49
|
+
0%, 100% { box-shadow: 0 0 20px var(--accent-glow); }
|
|
50
|
+
50% { box-shadow: var(--shadow-glow-strong); }
|
|
51
|
+
}
|
|
52
|
+
@keyframes shimmer {
|
|
53
|
+
0% { background-position: -200% 0; }
|
|
54
|
+
100% { background-position: 200% 0; }
|
|
55
|
+
}
|
|
56
|
+
@keyframes progressFill {
|
|
57
|
+
from { width: 0%; }
|
|
58
|
+
}
|
|
59
|
+
@keyframes countUp {
|
|
60
|
+
from { opacity: 0; transform: translateY(8px); }
|
|
61
|
+
to { opacity: 1; transform: translateY(0); }
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* Reduced motion fallback */
|
|
65
|
+
@media (prefers-reduced-motion: reduce) {
|
|
66
|
+
*, *::before, *::after {
|
|
67
|
+
animation-duration: 0.01ms !important;
|
|
68
|
+
transition-duration: 0.01ms !important;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Entrance Patterns
|
|
76
|
+
|
|
77
|
+
### Dashboard Page Load (staggered)
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
Top bar: fadeInDown 0ms 300ms
|
|
81
|
+
Stats row: fadeInUp 100ms 400ms (each card +80ms delay)
|
|
82
|
+
Tab bar: fadeIn 250ms 300ms
|
|
83
|
+
Sidebar: slideInLeft 200ms 400ms
|
|
84
|
+
Content: fadeInUp 350ms 500ms (each card in grid +60ms stagger)
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**React helper:**
|
|
88
|
+
```jsx
|
|
89
|
+
const stagger = (index, base = 0, step = 60) => ({
|
|
90
|
+
animation: `fadeInUp 500ms cubic-bezier(0.16, 1, 0.3, 1) ${base + index * step}ms both`,
|
|
91
|
+
});
|
|
92
|
+
// Usage on each card: style={{ ...stagger(cardIndex, 350) }}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Landing Page Hero
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
Mono label: fadeInUp 0ms 500ms
|
|
99
|
+
Heading: fadeInUp 150ms 600ms
|
|
100
|
+
Subtitle: fadeInUp 300ms 500ms
|
|
101
|
+
CTA buttons: fadeInUp 450ms 500ms
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Modal
|
|
105
|
+
|
|
106
|
+
```css
|
|
107
|
+
.modal-backdrop { animation: fadeIn 200ms ease both; }
|
|
108
|
+
.modal-content { animation: scaleIn 300ms cubic-bezier(0.16, 1, 0.3, 1) both; }
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## Expression-Aware Motion
|
|
114
|
+
|
|
115
|
+
Match motion to the expression mode chosen in `references/art-direction.md`.
|
|
116
|
+
|
|
117
|
+
### Tactical Monolith
|
|
118
|
+
- Keep motion short, directional, and low drama
|
|
119
|
+
- Prefer panel reveals, status updates, and quiet count-up behavior
|
|
120
|
+
- Avoid floaty motion, oversized parallax, or decorative loops
|
|
121
|
+
|
|
122
|
+
### Quiet Graphite
|
|
123
|
+
- Use soft fades, small elevation shifts, and measured reveal delays
|
|
124
|
+
- Let motion reinforce polish, not spectacle
|
|
125
|
+
|
|
126
|
+
### Signal Editorial
|
|
127
|
+
- Use more narrative sequencing: headings, side notes, proof blocks, and media can enter in layered stages
|
|
128
|
+
- Favor stagger and reveal rhythm over obvious bounce or glow pulses
|
|
129
|
+
|
|
130
|
+
### Luminous Light
|
|
131
|
+
- Keep motion crisp and clean
|
|
132
|
+
- Favor focus, control feedback, and gentle surface lifts over cinematic effects
|
|
133
|
+
|
|
134
|
+
### Industrial Flow
|
|
135
|
+
- Motion should feel functional and linear
|
|
136
|
+
- Sliding panels, queue shifts, progress fills, and status transitions work better than float or blur-heavy effects
|
|
137
|
+
|
|
138
|
+
### Gallery Intelligence
|
|
139
|
+
- Let media frames, profile blocks, and showcase surfaces reveal with slightly richer sequencing
|
|
140
|
+
- Keep metadata motion subtle so the content remains primary
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## Hover Effects
|
|
145
|
+
|
|
146
|
+
### Card Hover
|
|
147
|
+
|
|
148
|
+
```jsx
|
|
149
|
+
onMouseEnter={e => {
|
|
150
|
+
e.currentTarget.style.borderColor = 'var(--border-medium)';
|
|
151
|
+
e.currentTarget.style.boxShadow = 'var(--shadow-glow)';
|
|
152
|
+
e.currentTarget.style.transform = 'translateY(-2px)';
|
|
153
|
+
}}
|
|
154
|
+
onMouseLeave={e => {
|
|
155
|
+
e.currentTarget.style.borderColor = '';
|
|
156
|
+
e.currentTarget.style.boxShadow = 'none';
|
|
157
|
+
e.currentTarget.style.transform = '';
|
|
158
|
+
}}
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Card must have: `transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease`
|
|
162
|
+
|
|
163
|
+
### Button Hover
|
|
164
|
+
```
|
|
165
|
+
Primary: background → var(--accent-hover)
|
|
166
|
+
Secondary: borderColor → var(--border-accent), color → var(--text-accent)
|
|
167
|
+
transition: 150ms ease
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### Tab Hover (non-active)
|
|
171
|
+
`background: var(--bg-elevated)`, `border-radius: var(--radius-md) var(--radius-md) 0 0`
|
|
172
|
+
|
|
173
|
+
### Sidebar Item Hover
|
|
174
|
+
`background: var(--bg-elevated)`, `color: var(--text-primary)`
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## Loading States
|
|
179
|
+
|
|
180
|
+
### Skeleton Shimmer
|
|
181
|
+
|
|
182
|
+
```jsx
|
|
183
|
+
const skeletonStyle = {
|
|
184
|
+
background: `linear-gradient(90deg,
|
|
185
|
+
var(--bg-elevated) 25%,
|
|
186
|
+
var(--bg-overlay) 50%,
|
|
187
|
+
var(--bg-elevated) 75%)`,
|
|
188
|
+
backgroundSize: '200% 100%',
|
|
189
|
+
animation: 'shimmer 1.5s ease-in-out infinite',
|
|
190
|
+
borderRadius: 'var(--radius-md)',
|
|
191
|
+
};
|
|
192
|
+
// Usage: <div style={{ ...skeletonStyle, height: 20, width: '60%', marginBottom: 8 }} />
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### Pulse Glow (Mode Panel when active)
|
|
196
|
+
```css
|
|
197
|
+
animation: pulseGlow 3s ease-in-out infinite;
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### Progress Bar Fill (on mount)
|
|
201
|
+
```css
|
|
202
|
+
animation: progressFill 800ms cubic-bezier(0.16, 1, 0.3, 1) both;
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### Stat Number Count-up
|
|
206
|
+
```css
|
|
207
|
+
animation: countUp 600ms cubic-bezier(0.16, 1, 0.3, 1) both;
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
## Scroll-Triggered Animations (Landing Pages)
|
|
213
|
+
|
|
214
|
+
```jsx
|
|
215
|
+
function useScrollReveal(ref, delay = 0) {
|
|
216
|
+
const [visible, setVisible] = useState(false);
|
|
217
|
+
useEffect(() => {
|
|
218
|
+
const obs = new IntersectionObserver(
|
|
219
|
+
([e]) => { if (e.isIntersecting) { setVisible(true); obs.disconnect(); } },
|
|
220
|
+
{ threshold: 0.15 }
|
|
221
|
+
);
|
|
222
|
+
if (ref.current) obs.observe(ref.current);
|
|
223
|
+
return () => obs.disconnect();
|
|
224
|
+
}, []);
|
|
225
|
+
return {
|
|
226
|
+
opacity: visible ? 1 : 0,
|
|
227
|
+
transform: visible ? 'translateY(0)' : 'translateY(24px)',
|
|
228
|
+
transition: `opacity 600ms cubic-bezier(0.16,1,0.3,1) ${delay}ms,
|
|
229
|
+
transform 600ms cubic-bezier(0.16,1,0.3,1) ${delay}ms`,
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
// Usage:
|
|
234
|
+
const ref = useRef(null);
|
|
235
|
+
const reveal = useScrollReveal(ref, 100);
|
|
236
|
+
<div ref={ref} style={reveal}>...</div>
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
**CSS-only alternative (no JS):**
|
|
240
|
+
```css
|
|
241
|
+
.reveal {
|
|
242
|
+
opacity: 0; transform: translateY(24px);
|
|
243
|
+
transition: opacity 600ms cubic-bezier(0.16,1,0.3,1), transform 600ms cubic-bezier(0.16,1,0.3,1);
|
|
244
|
+
}
|
|
245
|
+
.reveal.visible { opacity: 1; transform: translateY(0); }
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
## Theme Transition
|
|
251
|
+
|
|
252
|
+
Apply to ALL themed containers so dark/light switch feels smooth:
|
|
253
|
+
|
|
254
|
+
```jsx
|
|
255
|
+
const TT = { transition: 'background 240ms ease, color 240ms ease, border-color 240ms ease, box-shadow 240ms ease' };
|
|
256
|
+
// Or in CSS: transition: var(--transition-theme);
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
## When to Use What
|
|
262
|
+
|
|
263
|
+
| Context | Level | Techniques |
|
|
264
|
+
|---|---|---|
|
|
265
|
+
| Dashboard | Minimal | Card hover, tab switch, theme transition, progress fill |
|
|
266
|
+
| Landing page | Moderate | Staggered entrances, scroll reveals, hero sequence, card hovers |
|
|
267
|
+
| Frontpage | Moderate | Hero entrance, scroll reveals, CTA glow pulse |
|
|
268
|
+
| Modal/Detail | Light | scaleIn entrance, fadeIn backdrop |
|
|
269
|
+
| Loading state | Ambient | Skeleton shimmer, pulse glow |
|
|
270
|
+
| Admin CRUD | None/minimal | Only theme transition + hover states |
|
|
271
|
+
|
|
272
|
+
---
|
|
273
|
+
|
|
274
|
+
## Anti-Generic Motion Rules
|
|
275
|
+
|
|
276
|
+
- Do not use the same stagger recipe on every page type.
|
|
277
|
+
- Do not animate everything just because motion is available.
|
|
278
|
+
- One memorable sequence beats constant moving surfaces.
|
|
279
|
+
- If motion draws more attention than hierarchy or content, reduce it.
|