soureeui 1.0.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/AGENTS.md +84 -0
- package/LICENSE +6 -0
- package/README.md +210 -0
- package/SKILL.md +148 -0
- package/bin/soureeui.js +491 -0
- package/package.json +47 -0
- package/references/accessibility.md +77 -0
- package/references/anti-ai-patterns.md +74 -0
- package/references/audit-and-refactor.md +64 -0
- package/references/content-and-copy.md +75 -0
- package/references/design-directions.md +81 -0
- package/references/design-system.md +124 -0
- package/references/imagery-and-icons.md +87 -0
- package/references/motion.md +186 -0
- package/references/packages.md +127 -0
- package/references/product-brief.md +68 -0
- package/references/responsive.md +145 -0
- package/references/review-and-done.md +98 -0
- package/references/workflow.md +107 -0
- package/templates/design-plan.md +124 -0
- package/templates/image-prompt.md +71 -0
- package/templates/ui-audit.md +77 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Audit and Refactor
|
|
2
|
+
|
|
3
|
+
For "make this modern", "improve this UI", "this looks bad", and every redesign of something that already exists.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Superficial changes are not a redesign
|
|
8
|
+
|
|
9
|
+
If the response to "make this modern" is: new accent color, bigger radius, a gradient, new shadows, a new font — the work has not been done. Those change the skin and leave every real problem intact.
|
|
10
|
+
|
|
11
|
+
Diagnose first. Then fix what is actually wrong, in this order of impact:
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
1. Information architecture what is here, how it is grouped, what does not belong
|
|
15
|
+
2. Layout and composition structure, rhythm, alignment, density
|
|
16
|
+
3. Visual hierarchy what wins attention, and does it deserve to
|
|
17
|
+
4. Navigation can users find and return
|
|
18
|
+
5. Typography scale, contrast, measure, weight
|
|
19
|
+
6. Spacing consistency and grouping
|
|
20
|
+
7. Components consistency, states, variant sprawl
|
|
21
|
+
8. Color and surfaces roles, contrast, meaning
|
|
22
|
+
9. Imagery purpose, quality, placement
|
|
23
|
+
10. Interaction and motion feedback, transitions, error and empty states
|
|
24
|
+
11. Responsive mobile as a designed experience
|
|
25
|
+
12. Accessibility throughout
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Most interfaces that "look bad" have a hierarchy and spacing problem, not a color problem.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Audit first
|
|
33
|
+
|
|
34
|
+
Run the audit and present it before changing code. Template: `../templates/ui-audit.md`.
|
|
35
|
+
|
|
36
|
+
Keep it short and specific. Every problem names a location and a consequence:
|
|
37
|
+
|
|
38
|
+
> *Dashboard header — four equally-weighted actions, none primary. Users cannot tell which one starts the main task.*
|
|
39
|
+
|
|
40
|
+
not
|
|
41
|
+
|
|
42
|
+
> *Header could be improved.*
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Scope discipline
|
|
47
|
+
|
|
48
|
+
- do not rewrite an entire interface when focused changes reach the goal
|
|
49
|
+
- preserve working functionality and existing behavior exactly
|
|
50
|
+
- keep the project's conventions, even ones you would not choose
|
|
51
|
+
- no unrelated refactoring bundled into a design change
|
|
52
|
+
- when the redesign is large, stage it: tokens first, then shared components, then screens — so the product stays shippable throughout
|
|
53
|
+
|
|
54
|
+
## Removal is part of the work
|
|
55
|
+
|
|
56
|
+
Redesign deletes. Look for: duplicate components doing the same job, dead styles, one-off overrides, unused dependencies, decorative elements with no purpose, sections nobody uses, states that never occur.
|
|
57
|
+
|
|
58
|
+
A redesign that only adds is usually just a reskin.
|
|
59
|
+
|
|
60
|
+
## Result standard
|
|
61
|
+
|
|
62
|
+
After the work, the improvement must be **structural and visible**, not cosmetic: a clearer primary action, a real hierarchy, consistent components, a mobile layout that was designed, states that exist, and an identity that belongs to this product.
|
|
63
|
+
|
|
64
|
+
If a stakeholder cannot name three concrete things that got better, the redesign failed.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Content and Copy
|
|
2
|
+
|
|
3
|
+
Copy is not filled in after the design. Copy *is* the design — length, specificity, and voice determine layout, hierarchy, and whether the interface communicates anything.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Banned by default
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
Lorem ipsum dolor sit amet
|
|
11
|
+
Amazing solutions for your business
|
|
12
|
+
Transform your workflow
|
|
13
|
+
The future of innovation
|
|
14
|
+
Empower your team
|
|
15
|
+
Take your X to the next level
|
|
16
|
+
Seamlessly integrate everything
|
|
17
|
+
Built for the modern web
|
|
18
|
+
Unlock the power of...
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Allowed only when the user explicitly asked for placeholder text.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## What to write instead
|
|
26
|
+
|
|
27
|
+
When real copy is unavailable, write realistic product-specific copy from the requirements. Specific and provisional beats vague and permanent — and it exposes layout problems early, because real strings are uneven.
|
|
28
|
+
|
|
29
|
+
| Generic | Specific |
|
|
30
|
+
|---|---|
|
|
31
|
+
| "Transform your workflow" | "Close the month in two days, not two weeks" |
|
|
32
|
+
| "Powerful analytics" | "See which shifts cost the most overtime" |
|
|
33
|
+
| "Get Started" | "Create your first invoice" |
|
|
34
|
+
| "Learn more" | "See how routing works" |
|
|
35
|
+
| "Something went wrong" | "We couldn't reach the payment provider. Your card was not charged." |
|
|
36
|
+
| "No data" | "No shipments yet. Import a manifest to get started." |
|
|
37
|
+
|
|
38
|
+
Mark invented facts as invented. Never fabricate customer names, logos, testimonials, metrics, certifications, or awards. If a section needs social proof that does not exist, cut the section or leave a clearly labeled slot.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Interface copy rules
|
|
43
|
+
|
|
44
|
+
- **Buttons name the outcome.** "Send invoice", not "Submit". "Delete project", not "OK"
|
|
45
|
+
- **Labels over placeholders.** Placeholder text disappears on focus and fails accessibility as a label
|
|
46
|
+
- **Errors say what happened, why, and what to do next.** No error codes alone, no blame
|
|
47
|
+
- **Empty states teach.** What this is, why it is empty, one action to fill it
|
|
48
|
+
- **Loading states say what is loading** when it takes more than a moment
|
|
49
|
+
- **Confirmations state consequence and scope.** "Delete 14 records permanently?" not "Are you sure?"
|
|
50
|
+
- **Headings are scannable.** A reader skimming only the headings should understand the page
|
|
51
|
+
- **Sentence case** for interface text unless the brand demands otherwise. It reads faster
|
|
52
|
+
- **No exclamation marks** as a substitute for value. No congratulating the user for routine actions
|
|
53
|
+
- **Numbers are formatted** for locale, and units are always shown
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Voice
|
|
58
|
+
|
|
59
|
+
Match the sector and audience established in `product-brief.md`. Terse and technical for developer tools. Plain and reassuring for health and finance. Warm for consumer. Neutral and unambiguous for enterprise.
|
|
60
|
+
|
|
61
|
+
One voice throughout. A playful empty state inside a formal product reads as an accident.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Content shapes the layout
|
|
66
|
+
|
|
67
|
+
Design against realistic extremes before declaring a layout done:
|
|
68
|
+
|
|
69
|
+
- the longest plausible name, title, and label
|
|
70
|
+
- a translated string 40% longer
|
|
71
|
+
- empty, one item, and hundreds of items
|
|
72
|
+
- a missing image, a missing avatar, a null value
|
|
73
|
+
- the largest number the field can hold
|
|
74
|
+
|
|
75
|
+
A layout that only works with the copy that was invented for the mockup is not finished.
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Design Directions
|
|
2
|
+
|
|
3
|
+
Pick a direction from the product. Never from what is trending.
|
|
4
|
+
|
|
5
|
+
**Formula: one primary visual language + at most one supporting technique.**
|
|
6
|
+
Editorial + subtle bento. Swiss + expressive display type. Minimal + restrained glass surfaces. Flat + purposeful motion. Stacking four trends is how interfaces start looking generated.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Catalog
|
|
11
|
+
|
|
12
|
+
| Direction | Reads as | Fits | Fails when |
|
|
13
|
+
|---|---|---|---|
|
|
14
|
+
| **Minimalism** | Calm, confident, content-first | Content products, tools, premium goods | Content is genuinely complex and needs scaffolding |
|
|
15
|
+
| **Swiss / International** | Rigorous, objective, gridded | Editorial, data, institutional, portfolio | Product needs warmth or play |
|
|
16
|
+
| **Editorial** | Authored, opinionated, typographic | Publishing, research, brand-led marketing, long-form | Task-heavy app screens |
|
|
17
|
+
| **Neo-Brutalism** | Loud, honest, unpolished on purpose | Creative tools, youth brands, dev tools with attitude | Trust-sensitive sectors: finance, health, legal |
|
|
18
|
+
| **Bento** | Modular, scannable, systematic | Feature overviews, dashboards, product tours | Used as a default grid for unrelated content |
|
|
19
|
+
| **Glassmorphism** | Layered, atmospheric, soft depth | Media-rich surfaces, overlays over real imagery | Applied to flat backgrounds — becomes noise; hurts contrast |
|
|
20
|
+
| **Neumorphism** | Tactile, soft, physical | Controls, audio/hardware-adjacent interfaces | Accessibility matters — contrast is inherently weak |
|
|
21
|
+
| **Luxury / Premium** | Restrained, spacious, slow | Fashion, hospitality, high-value goods, private services | Users came to complete a task quickly |
|
|
22
|
+
| **Corporate / Enterprise** | Reliable, legible, unsurprising | B2B platforms, internal tools, gov | It becomes an excuse for zero identity |
|
|
23
|
+
| **Industrial** | Utilitarian, engineered, sturdy | Logistics, manufacturing, field ops, hardware | Consumer delight is the goal |
|
|
24
|
+
| **Futuristic / Cyberpunk** | Technical, high-energy, synthetic | Gaming, crypto, security, entertainment | Legibility and trust are load-bearing |
|
|
25
|
+
| **Retro / Y2K** | Nostalgic, playful, referential | Culture brands, music, indie products | Audience has no relationship to the reference |
|
|
26
|
+
| **Soft UI / Organic** | Friendly, approachable, rounded | Wellness, kids, health, consumer habit apps | Precision and density are required |
|
|
27
|
+
| **Flat / Material-inspired** | Familiar, systematic, efficient | Cross-platform apps, admin, mobile-first | Differentiation is the point |
|
|
28
|
+
| **Maximalist** | Dense, expressive, layered | Culture, entertainment, editorial features | Users need to find one thing fast |
|
|
29
|
+
| **Monochromatic** | Focused, disciplined, graphic | Tools, portfolios, brand sites | Color carries meaning (status, categories, data) |
|
|
30
|
+
| **Dark UI** | Focused, cinematic, low-fatigue | Media, dev tools, monitoring, night use | Content is long-form reading or print-adjacent |
|
|
31
|
+
| **Data-centric** | Dense, precise, scannable | Analytics, trading, observability, admin | The page is a marketing page |
|
|
32
|
+
| **Typography-focused** | Voice-led, confident | Editorial, agencies, manifestos, docs | Product is visual or transactional |
|
|
33
|
+
| **Image-led** | Aspirational, tangible | Commerce, travel, real estate, food | No real imagery exists and none can be produced |
|
|
34
|
+
| **Experimental** | Memorable, risky | Portfolios, launches, campaigns | Anything with a conversion or task target |
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Selecting
|
|
39
|
+
|
|
40
|
+
Weigh, in order: existing visual identity → sector expectations → audience → content type → primary task → brand personality. Trend relevance is a tiebreaker, never a driver.
|
|
41
|
+
|
|
42
|
+
Sanity checks before committing:
|
|
43
|
+
|
|
44
|
+
- Does the direction serve the *content* that actually exists?
|
|
45
|
+
- Does it survive the worst case — long strings, empty states, 40 rows, one product photo?
|
|
46
|
+
- Does it survive mobile?
|
|
47
|
+
- Would a designer in this sector recognize it as competent, not costume?
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Presenting options
|
|
52
|
+
|
|
53
|
+
Only when more than one direction genuinely fits. Three lines each, named, with the trade-off visible. Then ask.
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
Three directions fit this product:
|
|
57
|
+
|
|
58
|
+
A. Editorial Minimal
|
|
59
|
+
Strong typography, generous whitespace, asymmetric composition.
|
|
60
|
+
Best if the writing carries the product. Slower to scan.
|
|
61
|
+
|
|
62
|
+
B. Neo-Brutalist
|
|
63
|
+
High contrast, hard edges, bold type, expressive interaction.
|
|
64
|
+
Memorable and cheap to build. Polarizing for enterprise buyers.
|
|
65
|
+
|
|
66
|
+
C. Premium Modern
|
|
67
|
+
Restrained palette, refined type, image-led composition.
|
|
68
|
+
Signals quality. Requires real photography.
|
|
69
|
+
|
|
70
|
+
Which direction?
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Do not force a choice when the product answers it. Say the direction, give the reason, keep going.
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Making a direction specific
|
|
78
|
+
|
|
79
|
+
A named style is a starting point, not a design. Add at least two product-specific decisions that no other product would share — a layout that mirrors the actual workflow, a color drawn from the physical product, a type pairing from the sector's own history, a component shaped by the real data.
|
|
80
|
+
|
|
81
|
+
Without those, "Editorial Minimal" is just another template.
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# Design System
|
|
2
|
+
|
|
3
|
+
Define a small, coherent system before building many components. Small means enough to build the product and nothing more.
|
|
4
|
+
|
|
5
|
+
Token groups: **color · typography · spacing · radius · elevation · borders · motion · breakpoints · icon sizing · component states**
|
|
6
|
+
|
|
7
|
+
If the project already has tokens, extend them. Two competing systems is worse than an imperfect one.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Color
|
|
12
|
+
|
|
13
|
+
Define by role, never by literal name. `--color-danger`, not `--color-red-500` at the point of use.
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
background page ground
|
|
17
|
+
surface card / panel ground
|
|
18
|
+
surface-elevated popover, modal, dropdown
|
|
19
|
+
text primary content
|
|
20
|
+
text-muted secondary content, metadata
|
|
21
|
+
border dividers, input outlines
|
|
22
|
+
primary brand / primary action
|
|
23
|
+
primary-contrast text on primary
|
|
24
|
+
secondary supporting action or accent
|
|
25
|
+
success warning error info state colors, each with a text-safe and a fill variant
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Rules:
|
|
29
|
+
|
|
30
|
+
- one primary. An interface with three "primary" colors has none
|
|
31
|
+
- state colors are reserved for state. Never use `success` because green looked nice
|
|
32
|
+
- verify contrast at definition time, not review time (see `accessibility.md`)
|
|
33
|
+
- if the product is dark-mode-capable, define roles for both modes at once; do not invert at the end
|
|
34
|
+
- never scatter literal hex values through components
|
|
35
|
+
|
|
36
|
+
## Typography
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
family display (optional) + body (+ mono if the product shows code or figures)
|
|
40
|
+
scale display / h1 / h2 / h3 / body-lg / body / body-sm / caption
|
|
41
|
+
weight 2–3 weights maximum in use
|
|
42
|
+
line-height tight for display, comfortable for body (roughly 1.1–1.3 vs 1.5–1.7)
|
|
43
|
+
tracking negative on large display sizes, neutral on body
|
|
44
|
+
measure ~60–75 characters for body text
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Rules:
|
|
48
|
+
|
|
49
|
+
- do not reuse the same font pairing in every project; pick for this brand
|
|
50
|
+
- pick a scale ratio and stay on it; arbitrary sizes between steps break rhythm
|
|
51
|
+
- tabular figures for anything numeric that aligns in columns
|
|
52
|
+
- a heading level is a semantic rank, not a size. Style and semantics are set independently
|
|
53
|
+
|
|
54
|
+
## Spacing
|
|
55
|
+
|
|
56
|
+
One scale, used everywhere. A 4px base with steps at 4, 8, 12, 16, 24, 32, 48, 64, 96 covers most products.
|
|
57
|
+
|
|
58
|
+
Rules:
|
|
59
|
+
|
|
60
|
+
- `margin: 13px` in a project with a scale is a bug
|
|
61
|
+
- space belongs to the container's rhythm, not to one-off overrides
|
|
62
|
+
- define section rhythm too: the vertical gap between major page sections is a token, not a guess
|
|
63
|
+
- related items sit closer than unrelated ones. Proximity is hierarchy
|
|
64
|
+
|
|
65
|
+
## Radius
|
|
66
|
+
|
|
67
|
+
Pick a character and hold it: sharp (0) · subtle (2–4px) · medium (6–10px) · rounded (12–16px) · pill (full, for chips and avatars only).
|
|
68
|
+
|
|
69
|
+
Rules:
|
|
70
|
+
|
|
71
|
+
- do not default everything to a large radius
|
|
72
|
+
- nested radii: inner radius = outer radius − padding, or the corners look wrong
|
|
73
|
+
- one exception can be deliberate (pill avatars in a sharp system). Five exceptions is noise
|
|
74
|
+
|
|
75
|
+
## Elevation
|
|
76
|
+
|
|
77
|
+
Shadows model distance from the page. Most flat content needs none.
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
0 flat content
|
|
81
|
+
1 raised surface that can be interacted with
|
|
82
|
+
2 dropdown, popover
|
|
83
|
+
3 modal, dialog
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Rules:
|
|
87
|
+
|
|
88
|
+
- borders or surface contrast usually separate content better than shadows
|
|
89
|
+
- never stack multiple shadows for "depth" without a light-source rationale
|
|
90
|
+
- shadows in dark UI generally fail; use surface lightness instead
|
|
91
|
+
|
|
92
|
+
## Borders
|
|
93
|
+
|
|
94
|
+
Choose one strategy and apply it: border-led · shadow-led · surface-contrast-led · borderless. Mixing all four is what makes an interface look assembled.
|
|
95
|
+
|
|
96
|
+
## Motion
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
duration fast 120–160ms (hover, toggle)
|
|
100
|
+
base 200–260ms (dropdown, tab, expand)
|
|
101
|
+
slow 300–400ms (modal, page transition, large layout shift)
|
|
102
|
+
easing standard ease-out for enter, ease-in for exit
|
|
103
|
+
emphasized for large movement
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
See `motion.md` for when motion is justified at all, and for choreography, performance, and reduced-motion rules.
|
|
107
|
+
|
|
108
|
+
## Breakpoints
|
|
109
|
+
|
|
110
|
+
Follow the project's existing breakpoints. Otherwise pick three to four and name them by intent, not device. Design the *content's* breakpoints: break where the layout stops working, not where a phone model happens to end.
|
|
111
|
+
|
|
112
|
+
## Icon sizing
|
|
113
|
+
|
|
114
|
+
Two or three sizes, tied to the type scale (16 / 20 / 24 typical). Icons align optically with the text they accompany, and inherit color from context. See `imagery-and-icons.md`.
|
|
115
|
+
|
|
116
|
+
## Component states
|
|
117
|
+
|
|
118
|
+
Every interactive component defines: default · hover · focus-visible · active · disabled · loading · and where relevant selected, error, empty, success. A component without a focus state is unfinished.
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Implementation
|
|
123
|
+
|
|
124
|
+
Express tokens in whatever the project already uses: CSS custom properties, a theme file, a utility framework's config, platform resources. The mechanism matters less than the discipline — no literal values at the point of use, and no new value invented mid-build.
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Imagery and Icons
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## Icons
|
|
6
|
+
|
|
7
|
+
**Use the project's existing icon library.** Check the dependency manifest before anything else.
|
|
8
|
+
|
|
9
|
+
If none exists, pick one and use only it: Lucide · Heroicons · Phosphor · Tabler · Radix Icons.
|
|
10
|
+
|
|
11
|
+
### Rules
|
|
12
|
+
|
|
13
|
+
- **Never hand-write an SVG for an icon the library already has.** Import it
|
|
14
|
+
- **Never use emoji as UI icons.** They render differently per platform, ignore theme, carry unwanted tone, and announce badly to screen readers
|
|
15
|
+
- one library per project. Mixed icon sets are visible instantly — different stroke weights, different grids
|
|
16
|
+
- consistent semantics: one concept, one icon, everywhere. Trash means delete everywhere or nowhere
|
|
17
|
+
- consistent size tokens, aligned optically to adjacent text (`design-system.md`)
|
|
18
|
+
- icons inherit color from context; do not hardcode a color per icon
|
|
19
|
+
- an icon-only control needs an accessible name and, on desktop, a tooltip
|
|
20
|
+
- purely decorative icons are marked hidden from assistive technology
|
|
21
|
+
- no icon soup: an icon beside every list item, heading, and label is noise. Icons mark *actions* and *status*
|
|
22
|
+
|
|
23
|
+
Custom SVG is justified only for: the product's own logo or mark, a domain-specific glyph no library carries, or an illustration that is genuinely part of the design.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Images
|
|
28
|
+
|
|
29
|
+
Never invent an image, hotlink one, or embed an arbitrary asset. Mark the slot, state its purpose, and supply a generation prompt.
|
|
30
|
+
|
|
31
|
+
### Placeholder
|
|
32
|
+
|
|
33
|
+
Component form, when the project has or warrants one:
|
|
34
|
+
|
|
35
|
+
```tsx
|
|
36
|
+
<ImagePlaceholder
|
|
37
|
+
aspectRatio="16/9"
|
|
38
|
+
purpose="Hero — technician operating line equipment"
|
|
39
|
+
/>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Markup-free form, for any stack:
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
[IMAGE PLACEHOLDER]
|
|
46
|
+
Purpose: Hero background, modern industrial workforce
|
|
47
|
+
Aspect ratio: 16:9
|
|
48
|
+
Negative space: left third, for headline and CTA
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
The placeholder must reserve the real aspect ratio so layout does not shift when the asset lands.
|
|
52
|
+
|
|
53
|
+
### Every placeholder ships with a prompt
|
|
54
|
+
|
|
55
|
+
Template: `../templates/image-prompt.md`. A usable prompt specifies:
|
|
56
|
+
|
|
57
|
+
subject · composition · environment · lighting · camera or visual style · mood · color direction · aspect ratio · required negative space · elements that must not appear
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
Image Generation Prompt
|
|
61
|
+
|
|
62
|
+
Wide cinematic photograph of a modern industrial workforce on a clean
|
|
63
|
+
assembly floor: two technicians in safety gear reviewing a tablet beside
|
|
64
|
+
automated equipment. Natural side light from high windows, soft falloff.
|
|
65
|
+
Shot at 35mm, shallow depth of field, subject sharp, background softly
|
|
66
|
+
blurred. Realistic commercial photography, not stock-posed. Muted steel
|
|
67
|
+
and concrete palette with a single warm safety-orange accent. Composed
|
|
68
|
+
with the subjects on the right third and clear negative space across the
|
|
69
|
+
left third for headline and CTA text. 16:9.
|
|
70
|
+
|
|
71
|
+
Must not appear: logos, readable text, faces looking at camera, lens
|
|
72
|
+
flare, HDR over-processing, generic smiling stock poses.
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Rules
|
|
76
|
+
|
|
77
|
+
- images serve UX or storytelling. Never fill space with an image
|
|
78
|
+
- one hero image with a job beats four decorative ones
|
|
79
|
+
- specify the aspect ratio and hold it responsively; art-direct the crop per breakpoint when the subject demands it
|
|
80
|
+
- every content image gets real alt text; decorative images are marked as decorative (`accessibility.md`)
|
|
81
|
+
- define loading behavior: dimensions reserved, lazy below the fold, priority for the hero
|
|
82
|
+
- state the format expectation (modern format with fallback) so the slot is production-ready
|
|
83
|
+
- when real assets already exist in the project, use them instead of a placeholder
|
|
84
|
+
|
|
85
|
+
### Illustration and graphics
|
|
86
|
+
|
|
87
|
+
Prefer real artifacts — product screenshots, charts from real data, maps, documents — over abstract illustration. Abstract illustration is the default when there is nothing to show, and it usually means the section has nothing to say.
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
# Motion
|
|
2
|
+
|
|
3
|
+
Motion is an interface material, not decoration. It costs attention, battery, and comprehension when misused.
|
|
4
|
+
|
|
5
|
+
**A motion is justified only if removing it would make something harder to understand.** If nothing is lost, remove it.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## The six legitimate jobs
|
|
10
|
+
|
|
11
|
+
| Job | What it does | Example |
|
|
12
|
+
|---|---|---|
|
|
13
|
+
| **Feedback** | Confirms input was received | Press state, toggle flip, button spinner |
|
|
14
|
+
| **Continuity** | Preserves object identity across a change | A list item expanding into a detail view |
|
|
15
|
+
| **Hierarchy / spatial** | Shows where something came from and where it lives | Menu scaling from its trigger, drawer from its edge |
|
|
16
|
+
| **Progress** | Communicates that time is passing and how much | Skeletons, determinate bars, step transitions |
|
|
17
|
+
| **Attention** | Directs the eye to a genuine change | A row that just updated, a validation error appearing |
|
|
18
|
+
| **Brand** | Carries personality in a moment that already needed motion | The character of an easing curve, one signature transition |
|
|
19
|
+
|
|
20
|
+
Brand is last and rides along with the others. It never justifies motion on its own.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Tokens
|
|
25
|
+
|
|
26
|
+
Define once, in the design system, and use everywhere.
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
duration-instant 80–120ms press feedback, color change
|
|
30
|
+
duration-fast 140–180ms hover, small toggles, tooltips
|
|
31
|
+
duration-base 200–260ms dropdowns, tabs, accordions, small dialogs
|
|
32
|
+
duration-slow 280–400ms modals, drawers, large layout change, page transitions
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
ease-out entering elements, most UI motion
|
|
37
|
+
ease-in exiting elements, and faster than the enter
|
|
38
|
+
ease-in-out elements that move within the view and stay
|
|
39
|
+
spring / emphasized direct-manipulation gestures and large expressive movement
|
|
40
|
+
linear only for continuous indeterminate motion: spinners, marquees
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Rules of thumb:
|
|
44
|
+
|
|
45
|
+
- exit is faster than enter. Nobody wants to wait to dismiss something
|
|
46
|
+
- larger distance and larger surface get longer durations. A tooltip at 300ms feels broken; a full-screen sheet at 120ms feels like a glitch
|
|
47
|
+
- anything over ~400ms on a routine interaction reads as lag, not polish
|
|
48
|
+
- ease-out for almost everything. Linear on UI movement looks mechanical
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Choreography
|
|
53
|
+
|
|
54
|
+
- one thing leads. If three elements animate at once, either they are one group moving together, or the design has no focal point
|
|
55
|
+
- stagger sparingly: 20 to 40ms between items, capped at roughly five items. Longer chains turn into a wait
|
|
56
|
+
- animate **from the origin**: a menu grows from its trigger, a sheet slides from the edge it lives on, a detail view expands from the row that opened it
|
|
57
|
+
- keep the transform origin and the movement direction consistent across the product. Inconsistent direction destroys the spatial model
|
|
58
|
+
- continuity beats fade. When the same object exists before and after, move it; do not cross-fade one into the other
|
|
59
|
+
- when a shared-element transition is not feasible, a short cross-fade with a small positional shift is the honest fallback
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Per-component catalog
|
|
64
|
+
|
|
65
|
+
| Interaction | Treatment |
|
|
66
|
+
|---|---|
|
|
67
|
+
| Hover | Color, elevation, or 1 to 2px movement at fast duration. Not scale on large surfaces |
|
|
68
|
+
| Press | Instant, slightly inset or dimmed. Never delayed |
|
|
69
|
+
| Focus | Instant. A focus ring must never animate in — it must be there the moment focus lands |
|
|
70
|
+
| Toggle / switch | Knob travel plus track color, fast, with a distinct disabled treatment |
|
|
71
|
+
| Accordion / expand | Height and opacity together at base duration; content does not fade in after the box opens |
|
|
72
|
+
| Dropdown / popover | Scale from 0.96 plus fade, base duration, origin at the trigger |
|
|
73
|
+
| Tooltip | Fade only, fast, after a short open delay and with no delay on close |
|
|
74
|
+
| Modal | Backdrop fade plus content scale or rise at slow duration; exit at base |
|
|
75
|
+
| Drawer / sheet | Slide from its own edge, slow; drag-to-dismiss follows the finger 1:1 |
|
|
76
|
+
| Tabs | Indicator slides between tabs; panel content cross-fades quickly |
|
|
77
|
+
| Route change | Short directional transition matching navigation direction; back reverses it |
|
|
78
|
+
| List insert / remove | Neighbors move to their new positions so the user can track the change |
|
|
79
|
+
| Reorder / drag | Item follows the pointer exactly; others shift with a base-duration transition |
|
|
80
|
+
| Toast | Enter from a consistent edge, auto-dismiss with a visible timer or a pause on hover |
|
|
81
|
+
| Validation error | Appear without shifting the layout. No shake unless the product's voice earns it |
|
|
82
|
+
| Number / value change | Brief highlight of the changed value, not a counting animation, unless the count is the point |
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Loading and waiting
|
|
87
|
+
|
|
88
|
+
Match the treatment to the wait:
|
|
89
|
+
|
|
90
|
+
| Wait | Treatment |
|
|
91
|
+
|---|---|
|
|
92
|
+
| Under ~100ms | Nothing. A spinner that flashes is worse than no spinner |
|
|
93
|
+
| 100ms to 1s | Inline indicator on the control that was activated |
|
|
94
|
+
| 1s to 10s | Skeleton matching the final layout, or a determinate progress bar |
|
|
95
|
+
| Over 10s | Determinate progress, a step description, and a way to cancel or leave |
|
|
96
|
+
|
|
97
|
+
- skeletons mirror the real layout so nothing shifts when content lands. A skeleton that does not match is a second layout shift
|
|
98
|
+
- keep skeleton shimmer subtle, or use a static tint. Aggressive shimmer across a full page is visual noise
|
|
99
|
+
- optimistic updates respond immediately and reconcile on completion, with a clear, non-destructive rollback if the request fails
|
|
100
|
+
- never let a spinner replace content that is already on screen. Update in place
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Scroll
|
|
105
|
+
|
|
106
|
+
- scroll-driven progress indicators and sticky transitions are fine. Content that animates in on every scroll is not
|
|
107
|
+
- if content animates on entry, it must be visible without JavaScript and without the animation. Never gate content on an intersection observer firing
|
|
108
|
+
- parallax at most as a subtle depth cue on one element. Multi-layer parallax is a motion-sickness trigger and a performance cost
|
|
109
|
+
- no scroll hijacking. The user owns the scroll
|
|
110
|
+
- honor native smooth-scroll preferences instead of forcing a custom implementation
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## Performance
|
|
115
|
+
|
|
116
|
+
- animate **transform and opacity**. Both run on the compositor. Animating width, height, top, left, or margin forces layout on every frame
|
|
117
|
+
- when a size change is required, prefer a transform-based technique or accept the cost knowingly on a small element
|
|
118
|
+
- budget: 60fps, roughly 16ms per frame. Verify on a mid-range device, not a development laptop
|
|
119
|
+
- `will-change` only immediately around the animation, on a small number of elements. Left on permanently, it wastes memory and can make things worse
|
|
120
|
+
- avoid animating many elements at once on long lists; virtualize or cap the animated set
|
|
121
|
+
- no infinite animations off-screen. Pause when not visible
|
|
122
|
+
- prefer the platform's own transition primitives before adding an animation library (`packages.md`)
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## Accessibility
|
|
127
|
+
|
|
128
|
+
Reduced motion is a **replacement**, not a deletion. The information the motion carried must still arrive.
|
|
129
|
+
|
|
130
|
+
| Full motion | Reduced motion |
|
|
131
|
+
|---|---|
|
|
132
|
+
| Slide-in drawer | Instant appearance, or opacity only |
|
|
133
|
+
| Expanding detail view | Instant expand; keep the focus move |
|
|
134
|
+
| Parallax and scroll effects | Off entirely |
|
|
135
|
+
| Auto-advancing carousel | Stops; manual controls remain |
|
|
136
|
+
| Attention pulse | Static highlight or a border change |
|
|
137
|
+
| Page transition | Instant, with focus moved to the new heading |
|
|
138
|
+
| Spinner | Keep it, but reduce or stop rotation; keep the text label |
|
|
139
|
+
|
|
140
|
+
```css
|
|
141
|
+
@media (prefers-reduced-motion: reduce) {
|
|
142
|
+
*, *::before, *::after {
|
|
143
|
+
animation-duration: 0.01ms !important;
|
|
144
|
+
animation-iteration-count: 1 !important;
|
|
145
|
+
transition-duration: 0.01ms !important;
|
|
146
|
+
scroll-behavior: auto !important;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
That blanket rule is a floor, not a strategy. Where motion carried meaning, provide the reduced alternative explicitly. Express the equivalent in whatever the project's platform offers.
|
|
152
|
+
|
|
153
|
+
Also:
|
|
154
|
+
|
|
155
|
+
- motion is never the only channel carrying meaning. Pair it with text, state, or position
|
|
156
|
+
- nothing flashes more than three times per second
|
|
157
|
+
- anything moving or auto-updating for more than five seconds needs pause, stop, or hide controls
|
|
158
|
+
- motion must not steal focus or move focus unexpectedly
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## Anti-patterns
|
|
163
|
+
|
|
164
|
+
- entrance animation on every element as the page scrolls
|
|
165
|
+
- perpetual floating, bobbing, pulsing, or breathing elements
|
|
166
|
+
- bouncy overshoot in a professional or high-trust product
|
|
167
|
+
- animating a change the user did not cause
|
|
168
|
+
- decorative background loops, animated gradients, particle fields
|
|
169
|
+
- staggered chains longer than about five items
|
|
170
|
+
- transitions on elements that update frequently — the interface never settles
|
|
171
|
+
- carousels that auto-advance with no pause
|
|
172
|
+
- loading animations longer than the load
|
|
173
|
+
- motion that delays the user reaching content
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## Checklist
|
|
178
|
+
|
|
179
|
+
1. Every animation maps to one of the six jobs.
|
|
180
|
+
2. Durations and easings come from tokens, not per-component guesses.
|
|
181
|
+
3. Exits are faster than enters.
|
|
182
|
+
4. Movement originates where the user acted.
|
|
183
|
+
5. Only transform and opacity animate in hot paths.
|
|
184
|
+
6. Reduced motion has an explicit alternative, not just removal.
|
|
185
|
+
7. Nothing animates that the user did not trigger, except state they need to notice.
|
|
186
|
+
8. Verified on a mid-range device, not only on a fast one.
|