@schilling.mark.a/software-methodology 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/.github/copilot-instructions.md +106 -0
- package/LICENSE +21 -0
- package/README.md +174 -0
- package/atdd-workflow/SKILL.md +117 -0
- package/atdd-workflow/references/green-phase.md +38 -0
- package/atdd-workflow/references/red-phase.md +62 -0
- package/atdd-workflow/references/refactor-phase.md +75 -0
- package/bdd-specification/SKILL.md +88 -0
- package/bdd-specification/references/example-mapping.md +105 -0
- package/bdd-specification/references/gherkin-patterns.md +214 -0
- package/cicd-pipeline/SKILL.md +64 -0
- package/cicd-pipeline/references/deployment-rollback.md +176 -0
- package/cicd-pipeline/references/environment-promotion.md +159 -0
- package/cicd-pipeline/references/pipeline-stages.md +198 -0
- package/clean-code/SKILL.md +77 -0
- package/clean-code/references/behavioral-patterns.md +329 -0
- package/clean-code/references/creational-patterns.md +197 -0
- package/clean-code/references/enterprise-patterns.md +334 -0
- package/clean-code/references/solid.md +230 -0
- package/clean-code/references/structural-patterns.md +238 -0
- package/continuous-improvement/SKILL.md +69 -0
- package/continuous-improvement/references/measurement.md +133 -0
- package/continuous-improvement/references/process-update.md +118 -0
- package/continuous-improvement/references/root-cause-analysis.md +144 -0
- package/dist/atdd-workflow.skill +0 -0
- package/dist/bdd-specification.skill +0 -0
- package/dist/cicd-pipeline.skill +0 -0
- package/dist/clean-code.skill +0 -0
- package/dist/continuous-improvement.skill +0 -0
- package/dist/green-implementation.skill +0 -0
- package/dist/product-strategy.skill +0 -0
- package/dist/story-mapping.skill +0 -0
- package/dist/ui-design-system.skill +0 -0
- package/dist/ui-design-workflow.skill +0 -0
- package/dist/ux-design.skill +0 -0
- package/dist/ux-research.skill +0 -0
- package/docs/INTEGRATION.md +229 -0
- package/docs/QUICKSTART.md +126 -0
- package/docs/SHARING.md +828 -0
- package/docs/SKILLS.md +296 -0
- package/green-implementation/SKILL.md +155 -0
- package/green-implementation/references/angular-patterns.md +239 -0
- package/green-implementation/references/common-rejections.md +180 -0
- package/green-implementation/references/playwright-patterns.md +321 -0
- package/green-implementation/references/rxjs-patterns.md +161 -0
- package/package.json +57 -0
- package/product-strategy/SKILL.md +71 -0
- package/product-strategy/references/business-model-canvas.md +199 -0
- package/product-strategy/references/canvas-alignment.md +108 -0
- package/product-strategy/references/value-proposition-canvas.md +159 -0
- package/project-templates/context.md.template +56 -0
- package/project-templates/test-strategy.md.template +87 -0
- package/story-mapping/SKILL.md +104 -0
- package/story-mapping/references/backbone.md +66 -0
- package/story-mapping/references/release-planning.md +92 -0
- package/story-mapping/references/task-template.md +78 -0
- package/story-mapping/references/walking-skeleton.md +63 -0
- package/ui-design-system/SKILL.md +48 -0
- package/ui-design-system/references/accessibility.md +134 -0
- package/ui-design-system/references/components.md +257 -0
- package/ui-design-system/references/design-tokens.md +209 -0
- package/ui-design-system/references/layout.md +136 -0
- package/ui-design-system/references/typography.md +114 -0
- package/ui-design-workflow/SKILL.md +90 -0
- package/ui-design-workflow/references/acceptance-targets.md +144 -0
- package/ui-design-workflow/references/component-selection.md +108 -0
- package/ui-design-workflow/references/scenario-to-ui.md +151 -0
- package/ui-design-workflow/references/screen-flows.md +116 -0
- package/ux-design/SKILL.md +75 -0
- package/ux-design/references/information-architecture.md +144 -0
- package/ux-design/references/interaction-patterns.md +141 -0
- package/ux-design/references/onboarding.md +159 -0
- package/ux-design/references/usability-evaluation.md +132 -0
- package/ux-research/SKILL.md +75 -0
- package/ux-research/references/journey-mapping.md +168 -0
- package/ux-research/references/mental-models.md +106 -0
- package/ux-research/references/personas.md +102 -0
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
# Components
|
|
2
|
+
|
|
3
|
+
## Component Catalog
|
|
4
|
+
|
|
5
|
+
Every standard component is specified here. When implementing, match the spec exactly. When a component is missing from this catalog, consult ui-design-workflow's `references/component-selection.md` to decide whether to create one.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Button
|
|
10
|
+
|
|
11
|
+
### Variants
|
|
12
|
+
|
|
13
|
+
| Variant | Use | Background | Text | Border |
|
|
14
|
+
|---|---|---|---|---|
|
|
15
|
+
| Primary | Main CTA, one per screen | color.brand.primary.default | color.text.inverse | none |
|
|
16
|
+
| Secondary | Supporting action | color.surface.card | color.text.primary | border.color.default |
|
|
17
|
+
| Ghost | Tertiary action, inline | transparent | color.brand.primary.default | none |
|
|
18
|
+
| Danger | Destructive action | color.feedback.error.default | color.text.inverse | none |
|
|
19
|
+
|
|
20
|
+
### Sizes
|
|
21
|
+
|
|
22
|
+
| Size | Height | Padding (H) | Font | Use |
|
|
23
|
+
|---|---|---|---|---|
|
|
24
|
+
| sm | 32px | spacing.md | type.body.sm | Compact contexts, tables |
|
|
25
|
+
| md | 40px | spacing.lg | type.body.md | Default |
|
|
26
|
+
| lg | 48px | spacing.xl | type.body.lg | Hero CTAs, landing pages |
|
|
27
|
+
|
|
28
|
+
### States
|
|
29
|
+
|
|
30
|
+
- **Hover:** background shifts one step darker on the scale
|
|
31
|
+
- **Active/Pressed:** background shifts two steps darker
|
|
32
|
+
- **Focus:** border.width.medium ring in border.color.focus, offset 2px
|
|
33
|
+
- **Disabled:** opacity 0.4, cursor not-allowed, no hover/active states
|
|
34
|
+
- **Loading:** show spinner, disable interaction, maintain width
|
|
35
|
+
|
|
36
|
+
### Rules
|
|
37
|
+
- One primary button per screen (or per logical section)
|
|
38
|
+
- Icon + label preferred over label alone for clarity
|
|
39
|
+
- Never use a button for navigation — use a link
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Input
|
|
44
|
+
|
|
45
|
+
### Variants
|
|
46
|
+
|
|
47
|
+
| Variant | Use |
|
|
48
|
+
|---|---|
|
|
49
|
+
| Text | Single-line free text |
|
|
50
|
+
| Textarea | Multi-line text (min 3 rows) |
|
|
51
|
+
| Number | Numeric values |
|
|
52
|
+
| Password | Masked input |
|
|
53
|
+
| Select | Single choice from a list |
|
|
54
|
+
| Multi-select | Multiple choices from a list |
|
|
55
|
+
|
|
56
|
+
### Anatomy
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
[Label] ← type.label, color.text.primary
|
|
60
|
+
[Input field] ← border.radius.sm, border.color.default
|
|
61
|
+
[Helper text — optional] ← type.body.sm, color.text.secondary
|
|
62
|
+
[Error message — replaces helper when invalid] ← type.body.sm, color.feedback.error.text
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### States
|
|
66
|
+
|
|
67
|
+
- **Default:** border.color.default, border.width.thin
|
|
68
|
+
- **Hover:** border.color.hover
|
|
69
|
+
- **Focus:** border.color.focus, border.width.medium
|
|
70
|
+
- **Filled:** same as default (no visual change just because it has a value)
|
|
71
|
+
- **Disabled:** background color.neutral.100, text color.text.disabled, border color.neutral.100
|
|
72
|
+
- **Error:** border color.feedback.error.border, error message visible below
|
|
73
|
+
|
|
74
|
+
### Rules
|
|
75
|
+
- Label is always visible. Never use placeholder as the label.
|
|
76
|
+
- Placeholder text is supplementary only — what to type, not what the field is for.
|
|
77
|
+
- Required fields: append ` *` to the label. Explain what `*` means once per form.
|
|
78
|
+
- Error messages are inline, directly below the field that failed. Never at the top of the form alone.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Alert / Banner
|
|
83
|
+
|
|
84
|
+
### Variants
|
|
85
|
+
|
|
86
|
+
| Variant | Icon | Background | Border | Use |
|
|
87
|
+
|---|---|---|---|---|
|
|
88
|
+
| Error | ✕ circle | color.feedback.error.default (light) | color.feedback.error.default | Form-level errors, failed operations |
|
|
89
|
+
| Success | ✓ circle | color.feedback.success.default (light) | color.feedback.success.default | Completed operations |
|
|
90
|
+
| Warning | ! triangle | color.feedback.warning.default (light) | color.feedback.warning.default | Non-blocking cautions |
|
|
91
|
+
| Info | ℹ circle | color.feedback.info.default (light) | color.feedback.info.default | Contextual information |
|
|
92
|
+
|
|
93
|
+
### Anatomy
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
[Icon] [Title — type.label]
|
|
97
|
+
[Message — type.body.sm]
|
|
98
|
+
[Action link — optional]
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Rules
|
|
102
|
+
- Alerts are for messages that need user attention. Not for decoration.
|
|
103
|
+
- Dismissible alerts have a close button (top-right corner).
|
|
104
|
+
- Page-level alerts sit directly below the page header.
|
|
105
|
+
- Inline alerts sit within the content, near the context they describe.
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Table
|
|
110
|
+
|
|
111
|
+
### Structure
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
┌──────────┬──────────┬──────────┬──────────┐
|
|
115
|
+
│ Header │ Header │ Header │ Header │ ← type.label, color.neutral.500, border-bottom
|
|
116
|
+
├──────────┼──────────┼──────────┼──────────┤ border.width.medium
|
|
117
|
+
│ Cell │ Cell │ Cell │ Cell │ ← type.body.md, color.text.primary
|
|
118
|
+
├──────────┼──────────┼──────────┼──────────┤ border-bottom border.width.thin
|
|
119
|
+
│ Cell │ Cell │ Cell │ Cell │
|
|
120
|
+
└──────────┴──────────┴──────────┴──────────┘
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### States
|
|
124
|
+
|
|
125
|
+
- **Row hover:** background color.neutral.100
|
|
126
|
+
- **Row selected:** background color.brand.primary (very light tint), left border accent
|
|
127
|
+
- **Sortable column:** header shows sort indicator (↑↓ default, ↑ asc, ↓ desc)
|
|
128
|
+
- **Empty:** full-width row with centered empty state message
|
|
129
|
+
|
|
130
|
+
### Rules
|
|
131
|
+
- Right-align numeric columns. Left-align everything else.
|
|
132
|
+
- Truncate long cell content with ellipsis. Tooltip on hover shows full value.
|
|
133
|
+
- On mobile (xs), tables become horizontal-scroll or collapse to card stacks.
|
|
134
|
+
- First column is always a text identifier — never an action column.
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Card
|
|
139
|
+
|
|
140
|
+
### Anatomy
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
┌─────────────────────────────┐
|
|
144
|
+
│ [Image — optional, full-width top] │
|
|
145
|
+
├─────────────────────────────┤
|
|
146
|
+
│ [Title — type.h4] │ ← padding: spacing.lg all sides
|
|
147
|
+
│ [Subtitle — type.body.sm] │
|
|
148
|
+
│ │
|
|
149
|
+
│ [Content] │
|
|
150
|
+
│ │
|
|
151
|
+
│ [Actions — bottom-aligned] │
|
|
152
|
+
└─────────────────────────────┘
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Styles
|
|
156
|
+
|
|
157
|
+
- Background: color.surface.card
|
|
158
|
+
- Border: border.width.thin, border.color.default
|
|
159
|
+
- Radius: border.radius.md
|
|
160
|
+
- Elevation: elevation.1 at rest, elevation.2 on hover (if clickable)
|
|
161
|
+
- Padding: spacing.lg (24px) all sides
|
|
162
|
+
|
|
163
|
+
### Rules
|
|
164
|
+
- Cards at the same level use the same size. No mixed heights in a grid.
|
|
165
|
+
- If a card is clickable, the entire card is the click target — not just the title.
|
|
166
|
+
- Clickable cards show elevation change on hover. Non-clickable cards do not.
|
|
167
|
+
- Limit to 3–4 content elements per card. More = use a detail page instead.
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## Navigation Bar
|
|
172
|
+
|
|
173
|
+
### Top Nav (desktop)
|
|
174
|
+
|
|
175
|
+
```
|
|
176
|
+
[Logo] [Nav Item] [Nav Item] [Nav Item] [User Avatar] [Action]
|
|
177
|
+
^^^^^^^^^^^^
|
|
178
|
+
Active item: color.brand.primary, border-bottom border.width.medium
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### Sidebar Nav (mobile or app-style)
|
|
182
|
+
|
|
183
|
+
```
|
|
184
|
+
┌──────────────┐
|
|
185
|
+
│ [Logo] │
|
|
186
|
+
│ │
|
|
187
|
+
│ [Nav Item] │ ← type.body.md, color.text.primary
|
|
188
|
+
│ [Nav Item] │ ← active: background color.neutral.100, left border accent
|
|
189
|
+
│ [Nav Item] │
|
|
190
|
+
│ [Sub Item] │ ← indented spacing.lg, type.body.sm
|
|
191
|
+
│ │
|
|
192
|
+
│ ──────────── │
|
|
193
|
+
│ [Nav Item] │ ← secondary group, separated by divider
|
|
194
|
+
└──────────────┘
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### Rules
|
|
198
|
+
- Active item is always visually distinct — never ambiguous.
|
|
199
|
+
- Nav items use ubiquitous language. Match the story map activity names.
|
|
200
|
+
- Maximum depth: two levels (item + sub-item). No deeper nesting.
|
|
201
|
+
- Mobile: hamburger menu opens a full-screen or drawer sidebar.
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## Modal
|
|
206
|
+
|
|
207
|
+
### Anatomy
|
|
208
|
+
|
|
209
|
+
```
|
|
210
|
+
┌─── Overlay (color.surface.overlay, 50% opacity) ───┐
|
|
211
|
+
│ │
|
|
212
|
+
│ ┌──────────────────────────────────┐ │
|
|
213
|
+
│ │ [Title — type.h3] [✕ Close]│ │
|
|
214
|
+
│ │ ──────────────────────────── │ │
|
|
215
|
+
│ │ [Content] │ │
|
|
216
|
+
│ │ │ │
|
|
217
|
+
│ │ [Cancel] [Primary Action] │ ← actions bottom-right
|
|
218
|
+
│ └──────────────────────────────────┘ │
|
|
219
|
+
│ │
|
|
220
|
+
└─────────────────────────────────────────────────────┘
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### Sizes
|
|
224
|
+
|
|
225
|
+
| Size | Width | Use |
|
|
226
|
+
|---|---|---|
|
|
227
|
+
| sm | 400px | Confirmations, simple forms |
|
|
228
|
+
| md | 600px | Standard forms, detail views |
|
|
229
|
+
| lg | 800px | Complex forms, data entry |
|
|
230
|
+
| xl | 90vw (max 1000px) | Wizards, multi-step flows |
|
|
231
|
+
|
|
232
|
+
### Rules
|
|
233
|
+
- Focus traps inside the modal. Tab cycles within it. Escape closes it.
|
|
234
|
+
- Always provide a close button (✕) AND a cancel action button.
|
|
235
|
+
- Modals block the page. Use sparingly — prefer inline editing or dedicated pages for complex flows.
|
|
236
|
+
- Confirmation modals: state what will happen clearly. Destructive action button is Danger variant.
|
|
237
|
+
- On mobile, modals become full-screen or bottom sheets.
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
## Badge / Tag
|
|
242
|
+
|
|
243
|
+
### Variants
|
|
244
|
+
|
|
245
|
+
| Variant | Background | Text | Use |
|
|
246
|
+
|---|---|---|---|
|
|
247
|
+
| Default | color.neutral.100 | color.text.primary | Neutral labels |
|
|
248
|
+
| Primary | color.brand.primary (light) | color.brand.primary.default | Active, featured |
|
|
249
|
+
| Success | color.feedback.success.default (light) | color.feedback.success.text | Completed, active |
|
|
250
|
+
| Error | color.feedback.error.default (light) | color.feedback.error.text | Failed, blocked |
|
|
251
|
+
| Warning | color.feedback.warning.default (light) | color.feedback.warning.text | Pending, caution |
|
|
252
|
+
|
|
253
|
+
### Rules
|
|
254
|
+
- Badges are labels, not actions. They don't do anything when clicked (unless explicitly linked).
|
|
255
|
+
- Text: type.caption or type.overline. Never larger.
|
|
256
|
+
- Radius: border.radius.full (pill shape) for status badges. border.radius.sm for category tags.
|
|
257
|
+
- Maximum 3 badges visible at once. More = use a "+N more" indicator.
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
# Design Tokens
|
|
2
|
+
|
|
3
|
+
## What Are Design Tokens?
|
|
4
|
+
|
|
5
|
+
Named values that represent every visual decision in the system. Code references tokens, never raw values. Changing a token changes every place it's used — instantly consistent.
|
|
6
|
+
|
|
7
|
+
## Naming Convention
|
|
8
|
+
|
|
9
|
+
Three levels: **category.semantic.variant**
|
|
10
|
+
|
|
11
|
+
- `color.primary.default` — not `#3B82F6`
|
|
12
|
+
- `spacing.md` — not `16px`
|
|
13
|
+
- `border.radius.sm` — not `4px`
|
|
14
|
+
|
|
15
|
+
Category = what kind of value. Semantic = what it's for. Variant = which version.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Color Tokens
|
|
20
|
+
|
|
21
|
+
### Semantic Color Groups
|
|
22
|
+
|
|
23
|
+
Every color token is named for its PURPOSE, not its hue.
|
|
24
|
+
|
|
25
|
+
**Brand**
|
|
26
|
+
```
|
|
27
|
+
color.brand.primary.default — primary actions, key CTAs
|
|
28
|
+
color.brand.primary.hover — primary action hover state
|
|
29
|
+
color.brand.primary.active — primary action pressed state
|
|
30
|
+
color.brand.primary.disabled — primary action when inactive
|
|
31
|
+
color.brand.secondary.default — secondary actions
|
|
32
|
+
color.brand.secondary.hover
|
|
33
|
+
color.brand.secondary.active
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**Feedback**
|
|
37
|
+
```
|
|
38
|
+
color.feedback.error.default — error backgrounds, icons
|
|
39
|
+
color.feedback.error.text — error message text
|
|
40
|
+
color.feedback.error.border — error input borders
|
|
41
|
+
color.feedback.success.default — success backgrounds, icons
|
|
42
|
+
color.feedback.success.text — success message text
|
|
43
|
+
color.feedback.warning.default — warning backgrounds, icons
|
|
44
|
+
color.feedback.warning.text — warning message text
|
|
45
|
+
color.feedback.info.default — info backgrounds, icons
|
|
46
|
+
color.feedback.info.text — info message text
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**Neutral**
|
|
50
|
+
```
|
|
51
|
+
color.neutral.0 — pure white (page background)
|
|
52
|
+
color.neutral.50 — lightest gray (card backgrounds)
|
|
53
|
+
color.neutral.100 — light gray (hover backgrounds)
|
|
54
|
+
color.neutral.200 — borders, dividers
|
|
55
|
+
color.neutral.300 — placeholder text, disabled borders
|
|
56
|
+
color.neutral.400 — placeholder text
|
|
57
|
+
color.neutral.500 — secondary text
|
|
58
|
+
color.neutral.600 — body text
|
|
59
|
+
color.neutral.700 — headings
|
|
60
|
+
color.neutral.800 — high-emphasis text
|
|
61
|
+
color.neutral.900 — maximum contrast text
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**Surface**
|
|
65
|
+
```
|
|
66
|
+
color.surface.page — page/app background
|
|
67
|
+
color.surface.card — card, panel backgrounds
|
|
68
|
+
color.surface.overlay — modal/drawer backdrop
|
|
69
|
+
color.surface.elevated — dropdown, tooltip backgrounds
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**Text**
|
|
73
|
+
```
|
|
74
|
+
color.text.primary — main body text
|
|
75
|
+
color.text.secondary — supporting text, labels
|
|
76
|
+
color.text.disabled — disabled text
|
|
77
|
+
color.text.inverse — text on dark backgrounds
|
|
78
|
+
color.text.link — link text (default)
|
|
79
|
+
color.text.link.hover — link text on hover
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Color Scale Rule
|
|
83
|
+
|
|
84
|
+
Pick ONE base hue per semantic group. Generate the full scale from it using consistent lightness steps. Do not mix ad-hoc colors.
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Spacing Tokens
|
|
89
|
+
|
|
90
|
+
A consistent scale. Every margin, padding, gap uses a token from this scale. Nothing else.
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
spacing.xs — 4px (tight internal padding)
|
|
94
|
+
spacing.sm — 8px (compact gaps)
|
|
95
|
+
spacing.md — 16px (standard gaps, default padding)
|
|
96
|
+
spacing.lg — 24px (section internal spacing)
|
|
97
|
+
spacing.xl — 32px (between sections)
|
|
98
|
+
spacing.2xl — 48px (major section breaks)
|
|
99
|
+
spacing.3xl — 64px (page-level spacing)
|
|
100
|
+
spacing.4xl — 96px (hero/banner spacing)
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
**Rule:** Each step is roughly 1.5× the previous. Never invent a value between steps. If nothing fits, use the closest step.
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## Border Tokens
|
|
108
|
+
|
|
109
|
+
**Radius**
|
|
110
|
+
```
|
|
111
|
+
border.radius.none — 0px (tables, full-bleed)
|
|
112
|
+
border.radius.sm — 4px (inputs, small elements)
|
|
113
|
+
border.radius.md — 8px (cards, buttons)
|
|
114
|
+
border.radius.lg — 12px (modals, large panels)
|
|
115
|
+
border.radius.xl — 16px (feature cards)
|
|
116
|
+
border.radius.full — 999px (pills, avatars)
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
**Width**
|
|
120
|
+
```
|
|
121
|
+
border.width.thin — 1px
|
|
122
|
+
border.width.medium — 2px (focus rings, active borders)
|
|
123
|
+
border.width.thick — 3px (accents, progress bars)
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**Color** — use neutral scale for borders:
|
|
127
|
+
```
|
|
128
|
+
border.color.default — color.neutral.200 (resting borders)
|
|
129
|
+
border.color.hover — color.neutral.300 (hovered borders)
|
|
130
|
+
border.color.focus — color.brand.primary.default (focused inputs)
|
|
131
|
+
border.color.error — color.feedback.error.border
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Elevation Tokens
|
|
137
|
+
|
|
138
|
+
Controls depth perception via shadow. Each level implies a specific use case.
|
|
139
|
+
|
|
140
|
+
```
|
|
141
|
+
elevation.0 — no shadow (flat, inline elements)
|
|
142
|
+
elevation.1 — subtle shadow (cards at rest)
|
|
143
|
+
elevation.2 — soft shadow (cards on hover, dropdowns)
|
|
144
|
+
elevation.3 — medium shadow (popovers, tooltips)
|
|
145
|
+
elevation.4 — strong shadow (modals, drawers)
|
|
146
|
+
elevation.5 — heavy shadow (full-screen overlays)
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
**Rule:** Never skip levels. A card goes 0→1 on hover, not 0→3.
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
## Motion Tokens
|
|
154
|
+
|
|
155
|
+
Controls animation timing and easing for consistency.
|
|
156
|
+
|
|
157
|
+
**Duration**
|
|
158
|
+
```
|
|
159
|
+
motion.duration.fast — 100ms (micro-interactions: button press, toggle)
|
|
160
|
+
motion.duration.base — 200ms (standard transitions: hover, focus)
|
|
161
|
+
motion.duration.slow — 300ms (larger transitions: modal open, panel slide)
|
|
162
|
+
motion.duration.slower — 500ms (complex animations: page transitions)
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
**Easing**
|
|
166
|
+
```
|
|
167
|
+
motion.easing.default — ease-out (most transitions)
|
|
168
|
+
motion.easing.enter — ease-out (elements appearing)
|
|
169
|
+
motion.easing.exit — ease-in (elements disappearing)
|
|
170
|
+
motion.easing.spring — cubic-bezier (playful, bouncy — use sparingly)
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## Project Setup Template
|
|
176
|
+
|
|
177
|
+
Populate this into `/docs/ui-design/design-system.md` when starting a project. Replace every `[VALUE]` with your project's actual value.
|
|
178
|
+
|
|
179
|
+
```markdown
|
|
180
|
+
# Project Design System
|
|
181
|
+
|
|
182
|
+
## Tokens
|
|
183
|
+
|
|
184
|
+
### Colors
|
|
185
|
+
| Token | Value | Usage |
|
|
186
|
+
|-------|-------|-------|
|
|
187
|
+
| color.brand.primary.default | [VALUE] | Primary CTAs |
|
|
188
|
+
| color.brand.primary.hover | [VALUE] | Primary CTA hover |
|
|
189
|
+
| color.brand.secondary.default | [VALUE] | Secondary actions |
|
|
190
|
+
| color.feedback.error.default | [VALUE] | Error states |
|
|
191
|
+
| color.feedback.success.default | [VALUE] | Success states |
|
|
192
|
+
| color.feedback.warning.default | [VALUE] | Warning states |
|
|
193
|
+
| color.text.primary | [VALUE] | Body text |
|
|
194
|
+
| color.text.secondary | [VALUE] | Supporting text |
|
|
195
|
+
| color.surface.page | [VALUE] | Page background |
|
|
196
|
+
| color.surface.card | [VALUE] | Card background |
|
|
197
|
+
|
|
198
|
+
### Spacing
|
|
199
|
+
[Use the standard spacing scale from design-tokens.md unless project requires deviation]
|
|
200
|
+
|
|
201
|
+
### Borders
|
|
202
|
+
[Use standard border tokens unless project requires deviation]
|
|
203
|
+
|
|
204
|
+
### Elevation
|
|
205
|
+
[Use standard elevation tokens unless project requires deviation]
|
|
206
|
+
|
|
207
|
+
### Motion
|
|
208
|
+
[Use standard motion tokens unless project requires deviation]
|
|
209
|
+
```
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# Layout
|
|
2
|
+
|
|
3
|
+
## Grid System
|
|
4
|
+
|
|
5
|
+
All page layouts use a 12-column grid. Columns and gutters use spacing tokens.
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
| col | col | col | col | col | col | col | col | col | col | col | col |
|
|
9
|
+
^^^ ^^^ ^^^ ^^^ ^^^ ^^^ ^^^ ^^^ ^^^ ^^^ ^^^ ^^^
|
|
10
|
+
gutter between every column = spacing.md (16px)
|
|
11
|
+
page margin (left and right) = spacing.xl (32px)
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
### Column Spans
|
|
15
|
+
|
|
16
|
+
Common layouts expressed in column counts:
|
|
17
|
+
|
|
18
|
+
| Layout | Columns | Use case |
|
|
19
|
+
|--------|---------|----------|
|
|
20
|
+
| Full width | 12 | Hero, banner, full-width table |
|
|
21
|
+
| Main + sidebar | 8 + 4 | Content page with navigation or details |
|
|
22
|
+
| Main + narrow sidebar | 9 + 3 | Content page with compact sidebar |
|
|
23
|
+
| Two equal | 6 + 6 | Comparison, side-by-side cards |
|
|
24
|
+
| Three equal | 4 + 4 + 4 | Feature cards, stat cards |
|
|
25
|
+
| Four equal | 3 + 3 + 3 + 3 | Product grid, icon grid |
|
|
26
|
+
| Centered content | 8 (centered) | Forms, articles, focused reading |
|
|
27
|
+
|
|
28
|
+
### Nesting
|
|
29
|
+
|
|
30
|
+
Grids can nest. A 6-column section can contain its own 12-column sub-grid. The inner grid's columns are proportional to the parent's width.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Responsive Breakpoints
|
|
35
|
+
|
|
36
|
+
Design mobile-first. Start with the smallest screen, add complexity at each breakpoint.
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
xs — 0px–599px — single column, stacked layout
|
|
40
|
+
sm — 600px–899px — two columns available
|
|
41
|
+
md — 900px–1199px — three columns available, sidebar layouts
|
|
42
|
+
lg — 1200px–1535px — full layout, all columns active
|
|
43
|
+
xl — 1536px+ — max-width container centered, no further expansion
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Responsive Rules
|
|
47
|
+
|
|
48
|
+
- **Stack on xs.** Everything is single column. No side-by-side layouts below 600px.
|
|
49
|
+
- **Max-width container.** At xl and above, content stops expanding. Center the container with auto margins.
|
|
50
|
+
- **Touch targets.** On xs and sm, all interactive elements are at least 44×44px.
|
|
51
|
+
- **Typography scales down.** Heading sizes reduce at smaller breakpoints. See `references/typography.md`.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Page Structure
|
|
56
|
+
|
|
57
|
+
Every page follows this structure. Sections use spacing tokens for vertical rhythm.
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
┌─────────────────────────────────────┐
|
|
61
|
+
│ Top Navigation Bar │ ← fixed or sticky, full-width
|
|
62
|
+
├─────────────────────────────────────┤
|
|
63
|
+
│ Page Header │ ← title, subtitle, primary action
|
|
64
|
+
│ spacing.xl below │
|
|
65
|
+
├─────────────────────────────────────┤
|
|
66
|
+
│ Content Area │ ← grid-based layout
|
|
67
|
+
│ │
|
|
68
|
+
│ spacing.xl between major sections │
|
|
69
|
+
│ spacing.lg between items │
|
|
70
|
+
│ │
|
|
71
|
+
├─────────────────────────────────────┤
|
|
72
|
+
│ Footer (if applicable) │ ← full-width
|
|
73
|
+
└─────────────────────────────────────┘
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Page Header Patterns
|
|
77
|
+
|
|
78
|
+
**Simple header:**
|
|
79
|
+
```
|
|
80
|
+
[Page Title]
|
|
81
|
+
[Subtitle or description — optional] [Primary Action Button]
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Header with tabs:**
|
|
85
|
+
```
|
|
86
|
+
[Page Title]
|
|
87
|
+
[Tab 1] [Tab 2] [Tab 3] [Primary Action Button]
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
**Header with breadcrumb:**
|
|
91
|
+
```
|
|
92
|
+
[Home] > [Section] > [Current Page]
|
|
93
|
+
[Page Title] [Primary Action Button]
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## Spacing Rules
|
|
99
|
+
|
|
100
|
+
### Vertical Spacing (between elements)
|
|
101
|
+
|
|
102
|
+
| Relationship | Token |
|
|
103
|
+
|---|---|
|
|
104
|
+
| Items in a list or form | spacing.md (16px) |
|
|
105
|
+
| Related groups (label + input) | spacing.xs (4px) |
|
|
106
|
+
| Sections within a card | spacing.lg (24px) |
|
|
107
|
+
| Cards or major blocks | spacing.xl (32px) |
|
|
108
|
+
| Page sections | spacing.2xl (48px) |
|
|
109
|
+
|
|
110
|
+
### Horizontal Spacing
|
|
111
|
+
|
|
112
|
+
| Relationship | Token |
|
|
113
|
+
|---|---|
|
|
114
|
+
| Icon to label | spacing.xs (4px) |
|
|
115
|
+
| Items in a toolbar or button group | spacing.sm (8px) |
|
|
116
|
+
| Columns in a form (label → input) | spacing.md (16px) |
|
|
117
|
+
| Card internal padding | spacing.lg (24px) |
|
|
118
|
+
|
|
119
|
+
### Card Padding
|
|
120
|
+
|
|
121
|
+
All cards use uniform internal padding:
|
|
122
|
+
- Compact card: `spacing.md` (16px) all sides
|
|
123
|
+
- Standard card: `spacing.lg` (24px) all sides
|
|
124
|
+
- Spacious card: `spacing.xl` (32px) all sides
|
|
125
|
+
|
|
126
|
+
Pick one size per card type and use it consistently across the product.
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Layout Anti-Patterns
|
|
131
|
+
|
|
132
|
+
- **Pixel-perfect alignment obsession.** Use the grid and spacing tokens. If something doesn't snap to the grid, adjust the design, not the code.
|
|
133
|
+
- **Inconsistent card padding.** Every card of the same type uses the same padding. Period.
|
|
134
|
+
- **Ignoring empty states.** Every list or data view needs a designed empty state. It's not an afterthought — it's the first thing new users see.
|
|
135
|
+
- **Horizontal scrolling on mobile.** If content overflows on xs, it's a layout failure. Stack, truncate, or simplify.
|
|
136
|
+
- **Nesting too deep.** If you're nesting grids more than two levels, the layout is too complex. Break it into separate screens or use progressive disclosure.
|