@imfusion/web-ui 0.6.1-dev.12.ge86ac0a1 → 0.6.1-dev.14.g8fac1dfb
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/README.md +102 -170
- package/dist/{code-Blo48PGr.js → code-C_56u-Vk.js} +2 -2
- package/dist/{icons-wBmF0U2x.js → icons-Cy1HAosO.js} +1 -1
- package/dist/icons.js +1 -1
- package/dist/index.js +31 -31
- package/dist/integrations/code-highlight.js +2 -2
- package/dist/integrations/image-display-options.js +1 -1
- package/package.json +1 -1
- package/src/llms/install-templates/AGENTS.md +15 -18
- package/src/llms/llms.gen.txt +33 -33
- package/src/llms/skills/imf-web-ui/SKILL.md +29 -39
- package/src/llms/skills/imf-web-ui-audit/SKILL.md +50 -102
- package/src/llms/skills/imf-web-ui-components/SKILL.md +47 -104
- package/src/llms/skills/imf-web-ui-conventions/SKILL.md +39 -52
- package/src/llms/skills/imf-web-ui-conventions/templates/AUDIT_CHECKLIST.md +1 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/agent-tooling.md +40 -62
- package/src/llms/skills/imf-web-ui-conventions/topics/assets.md +11 -12
- package/src/llms/skills/imf-web-ui-conventions/topics/authentication.md +31 -46
- package/src/llms/skills/imf-web-ui-conventions/topics/class-names.md +18 -23
- package/src/llms/skills/imf-web-ui-conventions/topics/components.md +20 -69
- package/src/llms/skills/imf-web-ui-conventions/topics/data.md +50 -146
- package/src/llms/skills/imf-web-ui-conventions/topics/docs-structure.md +17 -23
- package/src/llms/skills/imf-web-ui-conventions/topics/git.md +15 -20
- package/src/llms/skills/imf-web-ui-conventions/topics/library-boundary.md +28 -19
- package/src/llms/skills/imf-web-ui-conventions/topics/library-setup.md +20 -16
- package/src/llms/skills/imf-web-ui-conventions/topics/npm-project.md +28 -42
- package/src/llms/skills/imf-web-ui-conventions/topics/project-structure.md +28 -30
- package/src/llms/skills/imf-web-ui-conventions/topics/react.md +28 -74
- package/src/llms/skills/imf-web-ui-conventions/topics/styling.md +65 -62
- package/src/llms/skills/imf-web-ui-conventions/topics/testing.md +12 -14
- package/src/llms/skills/imf-web-ui-conventions/topics/tokens.md +9 -4
- package/src/llms/skills/imf-web-ui-conventions/topics/tooling.md +40 -68
- package/src/llms/skills/imf-web-ui-conventions/topics/typescript.md +26 -50
- package/src/llms/skills/imf-web-ui-conventions/topics/validation.md +19 -25
- package/src/llms/skills/imf-web-ui-setup/SKILL.md +43 -64
- package/src/llms/skills/imf-web-ui-update/SKILL.md +48 -114
- package/src/llms/skills/imf-web-ui-ux/SKILL.md +64 -92
- package/src/llms/skills/imf-web-ui-ux/references/forms.md +16 -36
- package/src/llms/skills/imf-web-ui-ux/references/usability-heuristics.md +14 -27
- package/src/llms/skills/imf-web-ui-ux/references/visual-design.md +22 -38
|
@@ -1,103 +1,75 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: imf-web-ui-ux
|
|
3
3
|
description:
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
flow, or feature UI — not for prop lookups (that's imf-web-ui-components)."
|
|
4
|
+
"Help shape screens and flows with @imfusion/web-ui. Use this whenever a task chooses between components, defines layout,
|
|
5
|
+
or needs empty/loading/error states, even when the user asks only for an implementation. Do not use it for a prop lookup."
|
|
7
6
|
---
|
|
8
7
|
|
|
9
|
-
#
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
UX experience — the whole experience of a screen, its visual design, and the usability where both meet. Follow it by default;
|
|
13
|
-
deviate when the product has a real reason to. Code-level patterns (tokens, layers, wrappers) live in
|
|
14
|
-
`imf-web-ui-conventions`; project wiring lives in the `library-setup` topic of `imf-web-ui-conventions`.
|
|
15
|
-
|
|
16
|
-
Component names below are real — verify any API against the docgen index (`imf-web-ui-components`) before use. Never invent a
|
|
17
|
-
component this library doesn't ship.
|
|
18
|
-
|
|
19
|
-
## Before recommending or building: the interview
|
|
20
|
-
|
|
21
|
-
If — and only if — the request is foggy and a human is available, ask what the conversation hasn't already answered, from
|
|
22
|
-
this list, and nothing more. This applies to recommendation questions, not just build tasks: when someone asks "which
|
|
23
|
-
component for X?" and the choice hinges on facts you don't have (how many controls, how often used, how much data), **ask
|
|
24
|
-
those questions first and recommend after** — don't recommend and then list caveats, because the caveats _are_ the interview,
|
|
25
|
-
inverted.
|
|
26
|
-
|
|
27
|
-
1. Who uses this screen, and how often? (daily power-user tool vs. occasional visit changes density and shortcuts)
|
|
28
|
-
2. What is the **one** primary action? (a screen with three primary buttons has zero)
|
|
29
|
-
3. What data does it show — shape and volume? (5 rows or 5,000 decides table vs. cards vs. search-first)
|
|
30
|
-
4. What happens when it's empty, loading, or failing?
|
|
31
|
-
5. Where does it live — full page, or a step inside another flow?
|
|
32
|
-
|
|
33
|
-
If no human is around: make the conservative choice, and state your assumptions in the handoff.
|
|
34
|
-
|
|
35
|
-
## Choosing the surface
|
|
36
|
-
|
|
37
|
-
- **Full page** — the default. Reach for an overlay only when context must be preserved behind the task.
|
|
38
|
-
- **`Drawer`** — a focused sub-task that interrupts the page: edit-details, multi-field create, confirm-with-context. This
|
|
39
|
-
library ships no modal `Dialog`; `Drawer` is the blocking surface. If a true centered dialog is genuinely required, raise
|
|
40
|
-
it upstream — don't hand-roll one.
|
|
41
|
-
- **`Popover`** — light, dismissable, contextual: a small form, a filter panel, extra actions. If it needs a heading and
|
|
42
|
-
three fields, it wanted to be a `Drawer`.
|
|
43
|
-
- **`Tooltip`** — hints only. Never essential information, never interactive content.
|
|
44
|
-
- **`Collapsible`** — progressive disclosure inside the page: advanced options, long secondary content.
|
|
45
|
-
- **`Tabs`** — parallel views of the same subject. If users must complete all of them, it's a flow, not tabs.
|
|
46
|
-
|
|
47
|
-
## Choosing between look-alikes
|
|
48
|
-
|
|
49
|
-
- **`Button` vs. `ChipLink` vs. `Chip`** — does it _do_ something (`Button`), _go_ somewhere (`ChipLink`), or _label_
|
|
50
|
-
something (`Chip`)?
|
|
51
|
-
- **`Table` alone vs. `Table` + a table library** — static, small data reads fine as bare `Table` parts; the moment sorting,
|
|
52
|
-
pagination, or column logic appears, drive the parts with a headless table library (TanStack Table recommended) you install
|
|
53
|
-
yourself, using `Table.SortableHeaderCell` for the sort glue.
|
|
54
|
-
- **`Callout` vs. transient feedback** — `Callout` is for persistent, in-place status (errors, warnings, empty-state hints).
|
|
55
|
-
The library ships no `Toast`; for fire-and-forget confirmations prefer inline feedback near the trigger, and raise the
|
|
56
|
-
toast need upstream rather than hand-rolling one.
|
|
57
|
-
- **`Input`/`Select`/`Checkbox`/`Switch`/`Slider`** — `Switch` for instant effect, `Checkbox` for submitted forms; `Select`
|
|
58
|
-
beyond ~5 options, radio-style choices below that; `Slider` only when the _relative_ position means more than the exact
|
|
59
|
-
number.
|
|
60
|
-
|
|
61
|
-
## Layout and hierarchy
|
|
62
|
-
|
|
63
|
-
- Frame the app with **`AppShell`**; inside it, compose **`Stack`** and **`Row`** with token-based gaps instead of
|
|
64
|
-
hand-written flex containers with magic-number margins. **`Separator`** over border hacks.
|
|
65
|
-
- Text hierarchy comes from **`Typo`** — pick levels by role (page title, section, body, caption), don't skip levels for
|
|
66
|
-
visual effect, don't style raw HTML headings next to it.
|
|
67
|
-
- **One primary action per view.** Everything else uses the quieter `Button` variants (see its docgen entry for the semantic
|
|
68
|
-
variant list). If two things compete for primary, decide which one the screen is _for_.
|
|
69
|
-
- Density follows the interview: power-user + high volume → compact tables, visible shortcuts; occasional use + low volume →
|
|
70
|
-
generous spacing, explanatory text.
|
|
71
|
-
|
|
72
|
-
## States are part of the screen
|
|
73
|
-
|
|
74
|
-
Every screen ships four states, not one:
|
|
75
|
-
|
|
76
|
-
- **Empty** — say what this screen _will_ show and what to do next; an empty `Table` with no explanation is a bug.
|
|
77
|
-
- **Loading** — `Spinner`, or skeletons for known layouts; keep the frame stable so content doesn't jump in.
|
|
78
|
-
- **Error** — `Callout` with what failed and what the user can do; never a blank region, never only a console log.
|
|
79
|
-
- **Loaded** — the one you were going to build anyway.
|
|
80
|
-
|
|
81
|
-
## Looking native
|
|
82
|
-
|
|
83
|
-
Custom UI the library doesn't cover should be indistinguishable from library UI: build it from `--imf-ui-*` tokens and
|
|
84
|
-
compose it with library primitives. The goal lives here; the mechanics (tokens, layers, wrappers) live in
|
|
8
|
+
# Shape the screen
|
|
9
|
+
|
|
10
|
+
Use this skill for screen-level decisions. Verify component APIs with `imf-web-ui-components`; put code and styling rules in
|
|
85
11
|
`imf-web-ui-conventions`.
|
|
86
12
|
|
|
87
|
-
|
|
13
|
+
The identity index marks components as stable or experimental. Experimental components are usable, but prefer wrapping one
|
|
14
|
+
when it is used across many call sites so API movement stays local.
|
|
15
|
+
|
|
16
|
+
## Ask only what matters
|
|
17
|
+
|
|
18
|
+
If the request is vague and a human can answer, ask these questions one at a time and stop once the choice is clear:
|
|
19
|
+
|
|
20
|
+
1. Who uses the screen, and how often?
|
|
21
|
+
2. What is its one primary action?
|
|
22
|
+
3. What data does it show, and roughly how much?
|
|
23
|
+
4. What should users see when it is empty, loading, or failing?
|
|
24
|
+
5. Is it a full page or part of another flow?
|
|
25
|
+
|
|
26
|
+
If the prompt already answers a question, do not ask it again. If nobody can answer, make the conservative choice and state
|
|
27
|
+
the assumption.
|
|
28
|
+
|
|
29
|
+
## Choose a surface
|
|
30
|
+
|
|
31
|
+
- Use a full page by default.
|
|
32
|
+
- Use `Drawer` for a focused task that keeps the current page in context.
|
|
33
|
+
- Use `Popover` for small contextual content or a light form.
|
|
34
|
+
- Use `Tooltip` for a hint only. It must not contain required or interactive information.
|
|
35
|
+
- Use `Collapsible` for secondary content inside the page.
|
|
36
|
+
- Use `Tabs` for parallel views of one subject. If users must complete every section, use a flow instead.
|
|
37
|
+
|
|
38
|
+
The library has no modal `Dialog` or `Toast`. Raise those gaps rather than hand-rolling a replacement without a product
|
|
39
|
+
reason.
|
|
40
|
+
|
|
41
|
+
## Choose between similar controls
|
|
42
|
+
|
|
43
|
+
- `Button` performs an action, `ChipLink` goes somewhere, and `Chip` labels something.
|
|
44
|
+
- Use plain `Table` parts for static small data. Pair them with a headless table library for sorting, pagination, or column
|
|
45
|
+
logic. TanStack Table is the recommended choice.
|
|
46
|
+
- Use `Callout` for persistent in-place status. Put transient confirmation near the action until a toast pattern exists.
|
|
47
|
+
- Use `Switch` for an immediate setting and `Checkbox` for a submitted choice.
|
|
48
|
+
- Use `Select` for a known list, and consider a different control when the list is very short or very large.
|
|
49
|
+
- Use `Slider` when relative position matters more than typing an exact value.
|
|
50
|
+
|
|
51
|
+
## Build the hierarchy
|
|
52
|
+
|
|
53
|
+
- Frame an application with `AppShell`.
|
|
54
|
+
- Compose `Stack` and `Row` for spacing and arrangement. Use `Separator` for a real division.
|
|
55
|
+
- Use `Typo` for text hierarchy instead of styling raw headings beside it.
|
|
56
|
+
- Give a view one primary action. Make other actions quieter.
|
|
57
|
+
- Choose density from the user's frequency and data volume: frequent work and large data need compact layouts; occasional
|
|
58
|
+
work benefits from more explanation and space.
|
|
59
|
+
|
|
60
|
+
## Cover the states
|
|
61
|
+
|
|
62
|
+
Plan these states with the loaded view:
|
|
88
63
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
64
|
+
- **Empty**: say what belongs here and what the user can do next.
|
|
65
|
+
- **Loading**: use `Spinner` or a stable skeleton; keep the frame from jumping.
|
|
66
|
+
- **Error**: explain what failed and the next action in a `Callout` near the problem.
|
|
67
|
+
- **Loaded**: the normal view.
|
|
92
68
|
|
|
93
|
-
##
|
|
69
|
+
## Keep custom UI native
|
|
94
70
|
|
|
95
|
-
|
|
96
|
-
|
|
71
|
+
When the library does not cover a piece, compose its primitives and use `--imf-ui-*` tokens. The implementation details are
|
|
72
|
+
in `imf-web-ui-conventions`.
|
|
97
73
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
- [references/visual-design.md](references/visual-design.md) — hierarchy, grouping, alignment, whitespace. Read when a screen
|
|
101
|
-
is functionally complete but looks wrong and you can't say why.
|
|
102
|
-
- [references/forms.md](references/forms.md) — form layout, labels, validation timing, error wording. Read before building
|
|
103
|
-
any form beyond two fields.
|
|
74
|
+
For a screen review, read the relevant reference under `references/`: `usability-heuristics.md`, `visual-design.md`, or
|
|
75
|
+
`forms.md`.
|
|
@@ -1,50 +1,30 @@
|
|
|
1
1
|
# Form UX
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
[errors](https://www.nngroup.com/articles/errors-forms-design-guidelines/)). Forms are where inexperienced UI work loses the
|
|
6
|
-
most users — a cited CHI study found guideline-compliant forms hit 78% one-try error-free submission vs. 42% for
|
|
7
|
-
non-compliant ones. Read before building any form beyond two fields.
|
|
8
|
-
|
|
9
|
-
The library ships the controls (`Input`, `Select`, `Checkbox`, `Switch`, `Slider`) but no form or field wrapper, so labels,
|
|
10
|
-
grouping, and where errors appear are composed by you. That's exactly where these rules apply. Composing the markup is not
|
|
11
|
-
the same as owning the state: form state and validation belong to a form library (see `imf-web-ui-conventions`), and these
|
|
12
|
-
rules govern how its errors get presented.
|
|
3
|
+
Read this before building a form with more than two fields. The library supplies controls; the form library owns state and
|
|
4
|
+
validation. These rules cover structure and feedback.
|
|
13
5
|
|
|
14
6
|
## Structure
|
|
15
7
|
|
|
16
|
-
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
|
|
21
|
-
- **Group by topic.** Related fields sit tight in a `Stack`; groups separate with larger whitespace (proximity is grouping —
|
|
22
|
-
see [visual-design.md](visual-design.md)). Keep groups accessible: a labeled `fieldset` or heading per group.
|
|
23
|
-
- **Match field size to expected input.** A two-letter field shouldn't be full-width; a free-text reason shouldn't be one
|
|
24
|
-
line.
|
|
8
|
+
- Remove fields that can be derived or asked later.
|
|
9
|
+
- Use one column by default. Put short, inseparable values such as city and postal code in a `Row`.
|
|
10
|
+
- Group related fields in a `Stack` and separate groups with more space.
|
|
11
|
+
- Use a labeled `Fieldset` or heading for each group.
|
|
12
|
+
- Match a field's size to the value it expects.
|
|
25
13
|
|
|
26
14
|
## Labels
|
|
27
15
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
errors. Persistent hints (format examples) go outside the field, stated _before_ the user types, not revealed by the error
|
|
31
|
-
afterward.
|
|
16
|
+
Use a visible `<label>` close to the control, usually above it. Do not use placeholder text as the only label. Put format
|
|
17
|
+
hints near the field before the user starts typing.
|
|
32
18
|
|
|
33
19
|
## Validation and errors
|
|
34
20
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
- **Error text is precise, human, and constructive**: what's wrong, and what to do — "Date must be in the future", not
|
|
41
|
-
"Invalid input". A form-level failure (server rejected) gets a `Callout` above the actions; field-level problems stay at
|
|
42
|
-
their fields.
|
|
43
|
-
- **Preserve the user's input.** An error never empties the field, and there is no Reset/Clear button — its main use is being
|
|
44
|
-
clicked by accident.
|
|
21
|
+
Validate when the user finishes a field, except where live feedback genuinely helps, such as password requirements. Keep the
|
|
22
|
+
error next to the field and use more than color to show it.
|
|
23
|
+
|
|
24
|
+
An error says what is wrong and how to fix it. Keep the user's input. A server or form-level failure belongs in a `Callout`
|
|
25
|
+
near the actions; field-level failures stay with their fields.
|
|
45
26
|
|
|
46
27
|
## Submission
|
|
47
28
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
form (see also heuristic 9 in [usability-heuristics.md](usability-heuristics.md)).
|
|
29
|
+
Use one primary `Button` whose label names the result, such as `Create project`. While submitting, keep the form visible and
|
|
30
|
+
show progress. A failed submission must leave the user's input on screen.
|
|
@@ -1,29 +1,16 @@
|
|
|
1
|
-
# Usability heuristics
|
|
1
|
+
# Usability heuristics
|
|
2
2
|
|
|
3
|
-
Nielsen's ten
|
|
4
|
-
|
|
5
|
-
when reviewing or reworking a flow. Each entry: the rule, then what it means in a web-ui app.
|
|
3
|
+
Use this checklist when reviewing a screen or flow. It is an application of Nielsen's ten heuristics, not a replacement for
|
|
4
|
+
user research.
|
|
6
5
|
|
|
7
|
-
1. **
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
are known; disable invalid actions instead of explaining them after the click; confirm before irreversible commitment.
|
|
19
|
-
6. **Recognition rather than recall** — keep options and context visible; don't force users to remember values across
|
|
20
|
-
screens. If step 2 needs a value from step 1, show it; that's what `Collapsible` summaries and persistent `Chip` labels
|
|
21
|
-
are for.
|
|
22
|
-
7. **Flexibility and efficiency of use** — accelerators for experts that novices never see. The interview's power-user answer
|
|
23
|
-
decides this: daily-use screens earn keyboard shortcuts and dense `Table` defaults.
|
|
24
|
-
8. **Aesthetic and minimalist design** — every extra element competes with the relevant ones. If a screen element doesn't
|
|
25
|
-
serve the primary action or the data, cut it — this is the design-side twin of "compose, don't configure."
|
|
26
|
-
9. **Help users recognize, diagnose, and recover from errors** — plain-language messages that state the problem precisely and
|
|
27
|
-
suggest the fix, in a `Callout` next to where it went wrong. "Something went wrong" is a violation, not a message.
|
|
28
|
-
10. **Help and documentation** — best if unneeded; when needed, contextual and task-focused. Prefer a one-line hint near the
|
|
29
|
-
control (not a `Tooltip` hiding essential information) over a help page.
|
|
6
|
+
1. **Show system status.** Give async actions visible progress and confirmation.
|
|
7
|
+
2. **Use the user's language.** Labels and ordering should match the domain, not an API's private names.
|
|
8
|
+
3. **Provide an exit.** Drawers and popovers need clear dismissal; destructive actions need confirmation or undo.
|
|
9
|
+
4. **Be consistent.** Reuse the library's established components and semantics.
|
|
10
|
+
5. **Prevent errors.** Constrain known choices and disable actions that cannot work.
|
|
11
|
+
6. **Support recognition.** Keep relevant options and context visible instead of making users remember them.
|
|
12
|
+
7. **Support frequent users.** Add keyboard shortcuts or dense layouts when the task is frequent and data-heavy.
|
|
13
|
+
8. **Remove decoration without a job.** Every element should support the action or the data.
|
|
14
|
+
9. **Make errors recoverable.** Say what failed and what to do next, near the problem.
|
|
15
|
+
10. **Keep help contextual.** Prefer a short hint beside a control to essential information hidden in a tooltip or separate
|
|
16
|
+
page.
|
|
@@ -1,38 +1,22 @@
|
|
|
1
|
-
# Visual design
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
## Grouping: proximity beats everything
|
|
24
|
-
|
|
25
|
-
- **Proximity is grouping.** Elements close together read as one unit — this overpowers color and shape cues. Tight gap
|
|
26
|
-
between a label and its control, larger gap between one group and the next. Use `Stack` gap steps for exactly this: small
|
|
27
|
-
within groups, large between them. Never equidistant spacing — it says nothing.
|
|
28
|
-
- **Common region.** A shared container (`Card`, a bordered region) makes enclosed items read as related. Powerful, and
|
|
29
|
-
clutter when overused — if `Stack` spacing already groups it, the border adds nothing.
|
|
30
|
-
- **Similarity.** Shared color/shape/size signals relatedness across distance — all `Chip`s of one meaning look the same
|
|
31
|
-
everywhere. Weaker than proximity, but it survives layout changes.
|
|
32
|
-
|
|
33
|
-
## Whitespace and the squint test
|
|
34
|
-
|
|
35
|
-
More space around an element gives it more attention — whitespace is an active tool, not leftover room. Verify with the
|
|
36
|
-
squint test: blur your eyes (or downscale a screenshot); the primary action and the screen's title should still dominate. If
|
|
37
|
-
everything blurs into one gray mass, contrast and spacing are too uniform — pick the one thing that matters and make the
|
|
38
|
-
styling say so.
|
|
1
|
+
# Visual design
|
|
2
|
+
|
|
3
|
+
Use this when a screen works but still looks wrong. Decide the hierarchy before choosing styles.
|
|
4
|
+
|
|
5
|
+
## Hierarchy
|
|
6
|
+
|
|
7
|
+
Write the intended order of attention: title, primary action, content, and supporting details. Use contrast and scale to make
|
|
8
|
+
that order visible. Keep variation limited; if everything is loud, nothing leads.
|
|
9
|
+
|
|
10
|
+
Reserve saturated status colors for meaning. The primary `Button` should be the strongest action treatment on the screen.
|
|
11
|
+
|
|
12
|
+
## Grouping
|
|
13
|
+
|
|
14
|
+
Use proximity first: tight gaps inside a group, larger gaps between groups. `Stack` gap values encode this relationship. Use
|
|
15
|
+
a shared `Card` or bordered region only when spacing alone does not make the relationship clear.
|
|
16
|
+
|
|
17
|
+
Similarity helps related elements stay recognisable across a layout. It supports proximity; it does not replace it.
|
|
18
|
+
|
|
19
|
+
## Whitespace
|
|
20
|
+
|
|
21
|
+
Space around an element gives it attention. Shrink or blur a screenshot as a quick check: the title and primary action should
|
|
22
|
+
still stand out. If the screen becomes one grey mass, its contrast and spacing are too even.
|