@shavin/skills 0.0.0-stage → 0.1.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 +193 -0
- package/CHANGELOG.md +27 -0
- package/LICENSE +21 -0
- package/README.md +48 -2
- package/bin/hex-policy.mjs +157 -0
- package/bin/install.mjs +219 -0
- package/bin/lint-tokens.mjs +178 -0
- package/build.mjs +540 -0
- package/commands/add-composition.md +14 -0
- package/commands/apply-theme.md +59 -0
- package/commands/audit-layout.md +15 -0
- package/commands/audit-ui.md +42 -0
- package/commands/compose-page.md +16 -0
- package/commands/create-block.md +79 -0
- package/commands/create-primitive.md +40 -0
- package/commands/create-screen.md +45 -0
- package/commands/create-theme.md +41 -0
- package/cursor/shavin.mdc +14 -0
- package/package.json +66 -4
- package/posix-path.mjs +7 -0
- package/skills/core-rules.md +294 -0
- package/skills/layout-choreography/SKILL.md +102 -0
- package/skills/layout-choreography/references/fallbacks-and-accessibility.md +76 -0
- package/skills/layout-choreography/references/scenes.md +113 -0
- package/skills/layout-choreography/references/shavin-timelines.md +100 -0
- package/skills/layout-choreography/references/tech-and-performance.md +147 -0
- package/skills/layout-compositions/SKILL.md +149 -0
- package/skills/layout-compositions/references/adapters/shavin-ui.md +122 -0
- package/skills/layout-compositions/references/adapters/tailwind-html.md +100 -0
- package/skills/layout-compositions/references/component-language.md +105 -0
- package/skills/layout-compositions/references/compositions/conversion.md +286 -0
- package/skills/layout-compositions/references/compositions/documentation.md +125 -0
- package/skills/layout-compositions/references/compositions/editorial.md +126 -0
- package/skills/layout-compositions/references/compositions/expressive.md +151 -0
- package/skills/layout-compositions/references/compositions/features.md +262 -0
- package/skills/layout-compositions/references/compositions/gallery.md +172 -0
- package/skills/layout-compositions/references/compositions/hero.md +184 -0
- package/skills/layout-compositions/references/compositions/proof.md +194 -0
- package/skills/layout-compositions/references/compositions/structural.md +173 -0
- package/skills/layout-compositions/references/distinctiveness.md +65 -0
- package/skills/layout-compositions/references/foundations.md +119 -0
- package/skills/layout-compositions/references/metadata-schema.md +64 -0
- package/skills/layout-compositions/references/page-recipes.md +143 -0
- package/skills/layout-compositions/references/selection-guide.md +207 -0
- package/skills/layout-compositions/references/treatments.md +60 -0
- package/skills/layout-compositions/references/unsection-source-examples.md +92 -0
- package/skills/layout-compositions/references/visual-review.md +40 -0
- package/skills/layout-compositions/scripts/render_wireframes.py +138 -0
- package/skills/layout-compositions/scripts/validate_library.py +165 -0
- package/skills/layout-motion/SKILL.md +83 -0
- package/skills/layout-motion/references/composition-motion-map.md +69 -0
- package/skills/layout-motion/references/presets.md +209 -0
- package/skills/layout-motion/references/tokens.md +100 -0
- package/skills/shavin-app/SKILL.md +242 -0
- package/skills/shavin-app/patterns.md +35 -0
- package/skills/shavin-studio/SKILL.md +97 -0
- package/skills/shavin-webpage/SKILL.md +210 -0
- package/skills/shavin-webpage/editorial-craft.md +117 -0
- package/skills/shavin-webpage/page-architecture.md +137 -0
- package/skills/shavin-webpage/style-recipes.md +107 -0
- package/skills/visual-compositor/SKILL.md +200 -0
- package/skills/visual-compositor/anti-patterns.md +109 -0
- package/skills/visual-compositor/audit-checklist.md +162 -0
- package/skills/visual-compositor/cognitive-layer.md +287 -0
- package/skills/visual-compositor/composition-motion-map.md +167 -0
- package/skills/visual-compositor/concentric-laws.md +147 -0
- package/skills/visual-compositor/docs-mode.md +32 -0
- package/skills/visual-compositor/editorial-mode.md +48 -0
- package/skills/visual-compositor/font-pairings.md +224 -0
- package/skills/visual-compositor/graphics-and-assets.md +128 -0
- package/skills/visual-compositor/interface-polish.md +125 -0
- package/skills/visual-compositor/layout-restraint.md +80 -0
- package/skills/visual-compositor/motion-and-physics.md +257 -0
- package/skills/visual-compositor/page-motion-presets.md +246 -0
- package/skills/visual-compositor/references/EDITORIAL_EXPRESSIVE.md +163 -0
- package/skills/visual-compositor/spacing-core.md +386 -0
- package/skills/visual-compositor/spacing-dense.md +63 -0
- package/skills/visual-compositor/spacing-marketing.md +192 -0
- package/skills/visual-compositor/typography-rules.md +114 -0
- package/token-budget.json +86 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# Foundations: rules shared by every composition
|
|
2
|
+
|
|
3
|
+
Composition entries only state what is specific to them. Everything here applies to all of them, so it lives in one place. Read it once per page-building task.
|
|
4
|
+
|
|
5
|
+
Contents: 1 Measure · 2 Concentric radii · 3 Spacing and rhythm · 4 Responsive · 5 Accessibility · 6 Performance · 7 States and stress tests · 8 Motion baseline
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 1. Measure (line length)
|
|
10
|
+
|
|
11
|
+
Measure is set in `ch` (a unit that scales with the font), not in rem or pixels. A fixed `max-w-2xl` (672px) is only right at one specific font size.
|
|
12
|
+
|
|
13
|
+
| Text role | Target | Notes |
|
|
14
|
+
|---|---|---|
|
|
15
|
+
| Body / long reading | 60–72ch | Serif can run slightly longer; give serif a little more line-height |
|
|
16
|
+
| Lead / sub-headline | 45–58ch | Centred sub-headlines over ~2 lines read badly: left-align or shorten |
|
|
17
|
+
| Display headline | Wrap to 2–4 lines | Use `text-balance`; tune by eye, not by a fixed ch |
|
|
18
|
+
| Large pull quote | 28–45ch | Measure at the quote's own size |
|
|
19
|
+
| Caption / meta | ≤ 50ch | |
|
|
20
|
+
| Code | Don't wrap | Scroll horizontally inside its own container |
|
|
21
|
+
|
|
22
|
+
Use `text-pretty` on body copy to avoid orphans where supported. `max-w-2xl` (42rem / 672px) is the fallback for 16–18px body text.
|
|
23
|
+
|
|
24
|
+
## 2. Concentric radii
|
|
25
|
+
|
|
26
|
+
`@shavin/ui` uses a concentric radius system: when a rounded surface sits inside a padded rounded surface, the inner radius should be the outer radius minus the padding, so the curves stay parallel.
|
|
27
|
+
|
|
28
|
+
**Use `radius="concentric"` on any component nested inside a padded panel** — it auto-computes `R_inner = max(floor, R_outer - P)` (floor = `min(radius-lg, radius-panel / 2)`) by walking up the tree to find the nearest ancestor with a radius + padding.
|
|
29
|
+
|
|
30
|
+
Manual fallback if needed:
|
|
31
|
+
```css
|
|
32
|
+
:root { --radius-panel: 20px; }
|
|
33
|
+
.panel { border-radius: var(--radius-panel); padding: var(--panel-pad, 24px); }
|
|
34
|
+
.panel-inner { border-radius: max(calc(var(--radius-panel) - var(--panel-pad, 24px)), 4px); }
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Tailwind utilities for manual concentric: `rounded-panel-inner`, `rounded-panel-p3`, `rounded-panel-p5`.
|
|
38
|
+
|
|
39
|
+
- With padding of 0 (an edge-to-edge image), the child uses the parent's radius.
|
|
40
|
+
- Never give parent and child the same radius when padding is non-zero.
|
|
41
|
+
- Container surfaces use `rounded-[var(--radius-panel)]`; controls use `rounded-[var(--radius-lg)]`. Never literal `rounded-lg`, `rounded-xl`, `rounded-2xl`.
|
|
42
|
+
|
|
43
|
+
## 3. Spacing and rhythm
|
|
44
|
+
|
|
45
|
+
Section padding scale (vertical, per side). This is the canonical table; other skill files defer to it. Older names map as compact→`strip`, default→`body`, spacious→`hero` (`md:py-32`).
|
|
46
|
+
|
|
47
|
+
**`Section` has no padding by default** (`size="none"`). Always choose a role below for content sections — a bare `<Section>` is a flat band (use that only for utility screens or when you set custom `py-*`).
|
|
48
|
+
|
|
49
|
+
| Role | Use | Classes | `<Section size>` |
|
|
50
|
+
|---|---|---|---|
|
|
51
|
+
| none | Utility screens (auth, 404), custom spacing | `—` (no padding) | `size="none"` (default) |
|
|
52
|
+
| strip | Logo wall, stat bar, announcement | `py-10 md:py-14` | `size="strip"` |
|
|
53
|
+
| body | Features, pricing, testimonials, FAQ | `py-16 md:py-24` | `size="body"` |
|
|
54
|
+
| hero | Hero, statement, closing CTA | `py-24 md:py-32` | `size="hero"` |
|
|
55
|
+
| compact | App / dashboard panels | `py-8 md:py-12` | `size="compact"` |
|
|
56
|
+
|
|
57
|
+
Floor: never below `py-12` on mobile for marketing sections. Archetype overrides (Apple-style `py-28 md:py-44`, tagline reveal `py-28 md:py-40`) are explicitly scoped exceptions, not defaults.
|
|
58
|
+
|
|
59
|
+
Inside sections: grid gap 6 (24px) for card grids; 12 (48px) between text and media columns; 20 (80px) between stacked feature rows.
|
|
60
|
+
|
|
61
|
+
**Rhythm rules**
|
|
62
|
+
- No three consecutive sections with the same grid. Three F1s in a row is a template.
|
|
63
|
+
- Adjacent sections must differ in at least one of: background, alignment, density, column count.
|
|
64
|
+
- Alternate quiet and loud: after a dense section (F2, P2) put a low-density one (T1, C1).
|
|
65
|
+
- Container tokens: body content = `Container size="lg"` (72rem, 1152px), reading ≈ 68ch (`sm`), wide breakout only for media (`full`). `xl` (88rem) is for the nav and footer: it never caps at 1280px.
|
|
66
|
+
|
|
67
|
+
## 4. Responsive
|
|
68
|
+
|
|
69
|
+
- Build mobile-first. Every composition's `Grid:` line lists the breakpoints; follow them.
|
|
70
|
+
- Stack order is reading order, and DOM order is importance order. Reorder visually with CSS only, and only where the composition says so.
|
|
71
|
+
- Horizontal scroll is allowed only inside a dedicated scroller (rails, tables, code). The page body must never scroll sideways.
|
|
72
|
+
- Two-column splits stack at `lg` (1024px), not `md`, unless both columns are light.
|
|
73
|
+
- Tabs that don't fit become a scrollable tablist or an accordion.
|
|
74
|
+
- Tables scroll inside a wrapper with a visible edge cue and a sticky first column.
|
|
75
|
+
- Test widths: 360, 768, 1024, 1440 and one ultra-wide (container must cap).
|
|
76
|
+
- Touch: 44px automatic; AA min 24px; custom `hit-area`.
|
|
77
|
+
- Safe areas: fixed/sticky bars respect `env(safe-area-inset-*)`.
|
|
78
|
+
|
|
79
|
+
**Item-count orphans.** If the grid has N columns and the item count leaves a short last row, fix the content or the layout instead of accepting it: 4 items in 3 columns → 2×2; 5 → add one or use F2; 7 → 6 or 8.
|
|
80
|
+
|
|
81
|
+
## 5. Accessibility baseline
|
|
82
|
+
|
|
83
|
+
- One `<h1>`; heading levels never skip; landmarks (`header`, `nav`, `main`, `footer`) present and labelled when repeated.
|
|
84
|
+
- Skip link first. `:focus-visible` styling on every interactive element, never removed.
|
|
85
|
+
- Contrast: 4.5:1 for body text, 3:1 for large text and UI boundaries. Text on media needs a scrim.
|
|
86
|
+
- Meaning never depends on colour alone (badges, status, check/cross).
|
|
87
|
+
- Images: meaningful `alt`; decorative `alt=""`. Logos that identify a company get the company name.
|
|
88
|
+
- Patterns: tabs follow the ARIA tabs pattern (roving tabindex, arrow keys); accordions are heading + button with `aria-expanded`; carousels have real buttons and no autoplay.
|
|
89
|
+
- Auto-moving content that lasts over 5 seconds (marquees, video, tickers) needs a way to pause, stop or hide (WCAG 2.2.2). Hover-only pausing is not enough.
|
|
90
|
+
- `prefers-reduced-motion: reduce` is honoured everywhere: content is present and complete without animation.
|
|
91
|
+
- Forms: visible labels, errors tied with `aria-describedby`, `autocomplete` set.
|
|
92
|
+
- Dynamic results (filters, price toggles, copy-to-clipboard) announce changes via a live region.
|
|
93
|
+
|
|
94
|
+
## 6. Performance
|
|
95
|
+
|
|
96
|
+
- The hero media is usually the LCP element: eager-load it with high fetch priority and explicit `width`/`height`. Everything below the fold is `loading="lazy"`.
|
|
97
|
+
- Reserve space (`aspect-ratio`, fixed heights) so nothing shifts. Use `tabular-nums` for changing numbers.
|
|
98
|
+
- Prefer CSS over JS. Animate `transform` and `opacity` only.
|
|
99
|
+
- Heavy blur, mesh and backdrop filters cost paint time on phones: pre-render or simplify.
|
|
100
|
+
- Web-vitals targets ("good"): LCP ≤ 2.5s, INP ≤ 200ms, CLS ≤ 0.1.
|
|
101
|
+
|
|
102
|
+
## 7. States and stress tests
|
|
103
|
+
|
|
104
|
+
Before delivering, mentally (or actually) run each section through:
|
|
105
|
+
|
|
106
|
+
| Stress | What to check |
|
|
107
|
+
|---|---|
|
|
108
|
+
| 3× longer headline / title | Wraps cleanly, no overflow, balance holds |
|
|
109
|
+
| Missing image | Layout holds; a fallback surface, not a hole |
|
|
110
|
+
| Fewer / more items than the contract | Composition still valid, or switch composition |
|
|
111
|
+
| Long translated strings (+30–40%) | Buttons, tabs and nav don't break |
|
|
112
|
+
| RTL | Use logical properties (`ps-`, `me-`, `text-start`) |
|
|
113
|
+
| Dark mode | Tokens flip cleanly; hairlines and glows still visible |
|
|
114
|
+
| No JS / reduced motion | All content visible, nothing waiting on animation |
|
|
115
|
+
| Empty / loading / error (forms, filters, search) | Each has a designed state |
|
|
116
|
+
|
|
117
|
+
## 8. Motion baseline
|
|
118
|
+
|
|
119
|
+
Default to Tier 0 (no motion). Layouts expose `data-slot` names from their `slots` metadata so motion can attach without changing structure. Use `layout-motion` for Tier 1 and `layout-choreography` for Tier 2. Content must be visible and complete without either.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Composition entry schema
|
|
2
|
+
|
|
3
|
+
Every composition lives in `references/compositions/<family>.md` and follows one format. Consistency is what lets the model select by metadata and lets `scripts/validate_library.py` catch mistakes.
|
|
4
|
+
|
|
5
|
+
## Entry template
|
|
6
|
+
|
|
7
|
+
````markdown
|
|
8
|
+
### XX1 · Name of the Composition
|
|
9
|
+
```yaml
|
|
10
|
+
id: XX1
|
|
11
|
+
name: Name of the Composition
|
|
12
|
+
family: <file stem, e.g. hero>
|
|
13
|
+
job: understanding
|
|
14
|
+
density: medium
|
|
15
|
+
styles: [marketing, hybrid]
|
|
16
|
+
treatments: [carded, flat, open]
|
|
17
|
+
media: [product-ui, code]
|
|
18
|
+
items: 3-6
|
|
19
|
+
slots: [headline, sub, cta, media]
|
|
20
|
+
motion: tier1
|
|
21
|
+
```
|
|
22
|
+
**Best for:** one or two sentences.
|
|
23
|
+
**Avoid when:** the situations where it fails, with the better alternative's ID.
|
|
24
|
+
**Grid:** what happens at `base`, then `md`/`lg`. Spans, gaps, order.
|
|
25
|
+
```wf
|
|
26
|
+
Row of text
|
|
27
|
+
{1:1} Cell | Cell
|
|
28
|
+
```
|
|
29
|
+
**Contract:** content requirements: counts, lengths, required media, semantics.
|
|
30
|
+
**Watch:** failure modes: responsive, accessibility, performance, states.
|
|
31
|
+
````
|
|
32
|
+
|
|
33
|
+
Write the wireframe with the DSL, then run `python scripts/render_wireframes.py references/compositions/<file>.md` to convert it to an aligned box.
|
|
34
|
+
|
|
35
|
+
## Fields
|
|
36
|
+
|
|
37
|
+
| Key | Values |
|
|
38
|
+
|---|---|
|
|
39
|
+
| `id` | 1–2 capital letters + number (`ST1`, `H2`). Unique. Never reuse a retired ID. |
|
|
40
|
+
| `name` | Human name. |
|
|
41
|
+
| `family` | Must equal the file name without `.md`. |
|
|
42
|
+
| `job` | `attention` · `orientation` · `understanding` · `credibility` · `desire` · `action` · `reference` |
|
|
43
|
+
| `density` | `low` · `medium` · `high` |
|
|
44
|
+
| `styles` | list from: `structural` · `marketing` · `editorial` · `hybrid` · `documentation` · `expressive` |
|
|
45
|
+
| `treatments` | list from: `carded` · `ruled` · `flat` · `full-bleed` · `open` |
|
|
46
|
+
| `media` | list from: `none` · `product-ui` · `code` · `photo` · `illustration` · `video` · `data` · `logos` |
|
|
47
|
+
| `items` | Free text: how many things it holds (`3-6`, `n/a`, `1 lead + 4-8`). |
|
|
48
|
+
| `slots` | List of named parts. Motion attaches to these via `data-slot`. |
|
|
49
|
+
| `motion` | `tier0` (static only) · `tier1` (light presets suit it) · `choreography-ok` (a scene may be layered on top) |
|
|
50
|
+
|
|
51
|
+
## Required labelled lines
|
|
52
|
+
|
|
53
|
+
`**Best for:**` · `**Avoid when:**` · `**Grid:**` · `**Contract:**` · `**Watch:**`, in that order, each present.
|
|
54
|
+
|
|
55
|
+
## Registering a new composition
|
|
56
|
+
|
|
57
|
+
1. Add the entry to the right family file (or create a new family file; the file stem becomes the family).
|
|
58
|
+
2. Add the ID to `references/selection-guide.md` (decision table and overview table).
|
|
59
|
+
3. Reference it from any recipe in `references/page-recipes.md` where it belongs.
|
|
60
|
+
4. Run `python scripts/validate_library.py`. Fix every error.
|
|
61
|
+
|
|
62
|
+
## Retiring or changing
|
|
63
|
+
|
|
64
|
+
Don't renumber. Change the entry in place. If a composition is removed, leave a one-line note in the family file so old references resolve to an explanation.
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# Page recipes
|
|
2
|
+
|
|
3
|
+
A recipe is a starting sequence, not a template to copy. It answers "what order do these sections go in, and why?" Pick the closest recipe, then swap or drop sections to fit the real content and mutate at least two knobs from `distinctiveness.md`.
|
|
4
|
+
|
|
5
|
+
Every recipe assumes ST5 (page shell) underneath. A validator checks that every ID below exists.
|
|
6
|
+
|
|
7
|
+
Contents: SaaS launch · Developer tool / open source · Documentation site · Editorial / magazine · Portfolio / studio · Pricing and conversion · Storefront · Case study · Hybrid (product + docs + blog)
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## SaaS product launch
|
|
12
|
+
|
|
13
|
+
**Arc:** attention → credibility → understanding → desire → decision → action.
|
|
14
|
+
|
|
15
|
+
| # | Section | Composition | Notes |
|
|
16
|
+
|---|---|---|---|
|
|
17
|
+
| 1 | Navigation | ST1 | One primary action |
|
|
18
|
+
| 2 | Hero | H1, or H2 if copy is long | Photo / mesh / video backdrop, or product UI |
|
|
19
|
+
| 3 | Proof bar | S1 or T3 | Pick one, not both |
|
|
20
|
+
| 4 | Core value | F3 (2–3 rows) or F6 | The "how it works" moment |
|
|
21
|
+
| 5 | Breadth | F2 | Only with ≥ 5 items of mixed priority |
|
|
22
|
+
| 6 | Voice | T1 | Specific outcome quote |
|
|
23
|
+
| 7 | Plans | P1 | Link to P2 if needed |
|
|
24
|
+
| 8 | Objections | Q2 | |
|
|
25
|
+
| 9 | Close | C1 | Same CTA wording as the hero |
|
|
26
|
+
| 10 | Footer | ST3 | |
|
|
27
|
+
|
|
28
|
+
**Rhythm:** quiet (S1) → loud (F3) → dense (F2) → quiet (T1) → dense (P1) → quiet (Q2, C1).
|
|
29
|
+
|
|
30
|
+
## Developer tool / open source
|
|
31
|
+
|
|
32
|
+
**Arc:** show, don't tell. Get them to run it.
|
|
33
|
+
|
|
34
|
+
| # | Section | Composition | Notes |
|
|
35
|
+
|---|---|---|---|
|
|
36
|
+
| 1 | Navigation | ST1 | Docs and GitHub links visible |
|
|
37
|
+
| 2 | Hero | H2 (code on the right) | A real, runnable snippet |
|
|
38
|
+
| 3 | Numbers | S1 | The user's figures, else plausible placeholders |
|
|
39
|
+
| 4 | Capabilities | F5 (by language or use case) | |
|
|
40
|
+
| 5 | Breadth | F2 | |
|
|
41
|
+
| 6 | Install | C2 | Copy button |
|
|
42
|
+
| 7 | Questions | Q1 | Code-friendly answers |
|
|
43
|
+
| 8 | Footer | ST3 | |
|
|
44
|
+
|
|
45
|
+
## Documentation site
|
|
46
|
+
|
|
47
|
+
**Arc:** orient fast, then get out of the way.
|
|
48
|
+
|
|
49
|
+
| # | Page | Composition | Notes |
|
|
50
|
+
|---|---|---|---|
|
|
51
|
+
| 1 | Landing | ST1, D4, ST3 | Search first |
|
|
52
|
+
| 2 | Guide pages | D1 | Prose, code, callouts |
|
|
53
|
+
| 3 | Reference pages | D2 inside D1 | Sticky code rail |
|
|
54
|
+
| 4 | Release notes | D3 | Feed available |
|
|
55
|
+
| 5 | Support | Q1 | |
|
|
56
|
+
|
|
57
|
+
No motion beyond Tier 0/1 (scroll-spy, copy feedback).
|
|
58
|
+
|
|
59
|
+
## Editorial / magazine
|
|
60
|
+
|
|
61
|
+
**Arc:** front page ranks; article pages absorb; archive lets people wander.
|
|
62
|
+
|
|
63
|
+
| # | Page or section | Composition | Notes |
|
|
64
|
+
|---|---|---|---|
|
|
65
|
+
| 1 | Front | ST1, E3 | Editors set the ranking |
|
|
66
|
+
| 2 | Article | E1 | 68ch column, breakout figures |
|
|
67
|
+
| 3 | Essay | E2 | Margin notes at `xl` |
|
|
68
|
+
| 4 | Archive | E4 | Year groups |
|
|
69
|
+
| 5 | Footer | ST4 | Signature close |
|
|
70
|
+
|
|
71
|
+
Prefer `open` or `ruled` treatments. Cards are the wrong default here.
|
|
72
|
+
|
|
73
|
+
## Portfolio / studio (expressive)
|
|
74
|
+
|
|
75
|
+
**Arc:** a point of view, proof of work, a way to reach you.
|
|
76
|
+
|
|
77
|
+
| # | Section | Composition | Notes |
|
|
78
|
+
|---|---|---|---|
|
|
79
|
+
| 1 | Navigation | ST1 (minimal) | |
|
|
80
|
+
| 2 | Opening | H5 or H3 or X2 | Spend the page's boldness here |
|
|
81
|
+
| 3 | Work | X5 (index) or G4 | Hover preview needs a touch fallback |
|
|
82
|
+
| 4 | Gallery | X4 | Native scroll first |
|
|
83
|
+
| 5 | About | X3 | Long scrolling side |
|
|
84
|
+
| 6 | Collage moment | X1 | Optional, once |
|
|
85
|
+
| 7 | Contact | C4 | |
|
|
86
|
+
| 8 | Footer | ST4 | |
|
|
87
|
+
|
|
88
|
+
Static layout must be complete first. Add `layout-motion`, then `layout-choreography` if the brief calls for scroll-linked scenes.
|
|
89
|
+
|
|
90
|
+
## Pricing and conversion
|
|
91
|
+
|
|
92
|
+
**Arc:** reassure, compare, resolve doubts, close.
|
|
93
|
+
|
|
94
|
+
| # | Section | Composition | Notes |
|
|
95
|
+
|---|---|---|---|
|
|
96
|
+
| 1 | Header | ST1, H1 (short) | Headline about value, not price |
|
|
97
|
+
| 2 | Plans | P1 | Or P3 for a single plan |
|
|
98
|
+
| 3 | Detail | P2 | Only for technical buyers |
|
|
99
|
+
| 4 | Proof | T2 | |
|
|
100
|
+
| 5 | Objections | Q2 | |
|
|
101
|
+
| 6 | Close | C1 | |
|
|
102
|
+
|
|
103
|
+
## Storefront
|
|
104
|
+
|
|
105
|
+
**Arc:** see it, browse, trust it, leave an email.
|
|
106
|
+
|
|
107
|
+
| # | Section | Composition | Notes |
|
|
108
|
+
|---|---|---|---|
|
|
109
|
+
| 1 | Navigation | ST1 | Cart or basket as the primary action |
|
|
110
|
+
| 2 | Hero | H4 or H3 (real photo), H6 for several products | One collection link, no pitch |
|
|
111
|
+
| 3 | Reassurance | F1 (3 items) | Shipping, returns, materials or origin |
|
|
112
|
+
| 4 | Products | G6 (4–12 items) or G2 (12+) | Grid of `Card`: image, name, price, one `Button` |
|
|
113
|
+
| 5 | Story | F3 (2 rows) or G4 | Maker or brand story with photos |
|
|
114
|
+
| 6 | Reviews | T2 | Placeholder voices are fine |
|
|
115
|
+
| 7 | Questions | Q2 | Shipping, returns, sizing |
|
|
116
|
+
| 8 | Newsletter | C5 | |
|
|
117
|
+
| 9 | Footer | ST3 | |
|
|
118
|
+
|
|
119
|
+
## Case study
|
|
120
|
+
|
|
121
|
+
**Arc:** context, challenge, outcome, next.
|
|
122
|
+
|
|
123
|
+
| # | Section | Composition | Notes |
|
|
124
|
+
|---|---|---|---|
|
|
125
|
+
| 1 | Opening | H3 or H5 | Client, one-line outcome |
|
|
126
|
+
| 2 | Results | S2 | With baselines |
|
|
127
|
+
| 3 | Story | E1 | Breakout figures |
|
|
128
|
+
| 4 | Quote | T1 | |
|
|
129
|
+
| 5 | More work | G4 | |
|
|
130
|
+
| 6 | Close | C1 | |
|
|
131
|
+
|
|
132
|
+
## Hybrid (product + docs + blog)
|
|
133
|
+
|
|
134
|
+
**Arc:** one brand, three modes, one dominant treatment.
|
|
135
|
+
|
|
136
|
+
| # | Area | Composition | Notes |
|
|
137
|
+
|---|---|---|---|
|
|
138
|
+
| 1 | Marketing home | Use the SaaS launch recipe | |
|
|
139
|
+
| 2 | Docs | D4, D1, D2 | Switch to `ruled` |
|
|
140
|
+
| 3 | Blog | E3, E1, E4 | Switch to `open` |
|
|
141
|
+
| 4 | Shared frame | ST1, ST3 | Same nav and footer across modes |
|
|
142
|
+
|
|
143
|
+
Keep the tokens the same across modes and vary only the treatment and density. Shared brand, different jobs.
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
# Selection guide
|
|
2
|
+
|
|
3
|
+
Choose by content signals, not by vibe. For each section: answer the questions, pick the composition, then check its `Avoid when:` line in the composition file. Every composition ID appears here at least once.
|
|
4
|
+
|
|
5
|
+
Contents: 0 How to decide · 1 Structural · 2 Hero · 3 Features · 4 Proof · 5 Conversion · 6 Gallery · 7 Editorial · 8 Documentation · 9 Expressive · 10 Style routing · 11 Overview table
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 0. How to decide
|
|
10
|
+
|
|
11
|
+
1. **What is this section's job?** attention · orientation · understanding · credibility · desire · action · reference. The job (in each composition's metadata) is the first filter.
|
|
12
|
+
2. **What real content exists?** Count items, measure copy length, list the real visuals (product UI, code, photo, data). A composition whose `Contract:` your content can't meet is the wrong composition.
|
|
13
|
+
3. **What does the reader do here?** Read, scan, compare, browse, decide, copy code.
|
|
14
|
+
4. **Tie-breakers, in order:** (a) fits the content contract → (b) matches the page's style and treatment → (c) differs from the neighbouring sections → (d) is simpler.
|
|
15
|
+
|
|
16
|
+
## 1. Structural
|
|
17
|
+
|
|
18
|
+
| Need | Use | Tie-breaker |
|
|
19
|
+
|---|---|---|
|
|
20
|
+
| Site navigation | ST1 | Always, unless the page is a one-action campaign |
|
|
21
|
+
| Time-bound message above the nav | ST2 | Only if it expires; else put it in a hero or C1 |
|
|
22
|
+
| Footer as second navigation | ST3 | ≥ 3 link groups |
|
|
23
|
+
| Footer as signature | ST4 | Few links; brand-led, editorial or portfolio |
|
|
24
|
+
| Page frame, landmarks, container widths | ST5 | Every page |
|
|
25
|
+
| Dashboard / admin / settings frame | ST6 | Persistent nav + working area |
|
|
26
|
+
|
|
27
|
+
## 2. Hero
|
|
28
|
+
|
|
29
|
+
| Content signal | Use | Tie-breaker |
|
|
30
|
+
|---|---|---|
|
|
31
|
+
| One promise, photo/mesh/video or product UI, ≤ 2-line sub | H1 | Sub > 2 lines → H2 |
|
|
32
|
+
| Product UI or code snippet, longer copy | H2 | Copy left-aligned; media 1:1 or 5:7 |
|
|
33
|
+
| One strong portrait/object image, editorial tone | H3 | Needs a real image; else H5 |
|
|
34
|
+
| Cinematic photo/video, mood over explanation | H4 | Needs a scrim plan and a poster; text stays short |
|
|
35
|
+
| A few product moments around a short statement, consumer tone | H6 | Dense UI → H2; invented content → H1 or H5 |
|
|
36
|
+
| Only words, strong voice, no product visual | H5 | 3–12 word headline |
|
|
37
|
+
|
|
38
|
+
**Pick the hero by what the first screen can show.** If the page has no product UI to show, use a real photo (H3 or H4) before H5: you find the image yourself on Unsplash or Lummi (Pexels for video) and place it with `bgImage` or `bgVideo` behind a scrim. Show no caption, credit line or note about it on the page. If you cannot get one, mark the slot in a code comment only, and never render placeholder text. Use H5 only when the voice is the point.
|
|
39
|
+
|
|
40
|
+
**Hero by audience.** Start from the first column, then check it against the content you have.
|
|
41
|
+
|
|
42
|
+
| Page is for | First choice | Fallback |
|
|
43
|
+
|---|---|---|
|
|
44
|
+
| Physical goods, food, lifestyle, hospitality | H4 or H3 with a real photo | H6 for several products |
|
|
45
|
+
| B2B or SaaS product | H1 or H2 on a photo, mesh or video backdrop (`bgImage`, `bgOverlays`, `bgVideo`) | H5 |
|
|
46
|
+
| Developer tool | H2 with a runnable snippet | H5 |
|
|
47
|
+
| Studio, agency, portfolio | H5 at `5xl` (four words or fewer, else `4xl`), or H3 | H4 |
|
|
48
|
+
| Community, nonprofit, retreat, event | H3 or H4 with a real photo | H5 |
|
|
49
|
+
| Docs front door | D4, never a hero | |
|
|
50
|
+
|
|
51
|
+
Do not rebuild the product's UI from components as the hero visual unless you are highly confident in the result; it reads as a placeholder. Backgrounds: a mesh or gradient overlay (`bgOverlays`) is a valid hero media when no photo fits. Always set `surface="dark-always"` or `"light-always"` on a section with a background, and check the result with `render_check`.
|
|
52
|
+
|
|
53
|
+
## 3. Features
|
|
54
|
+
|
|
55
|
+
| Content signal | Use | Tie-breaker |
|
|
56
|
+
|---|---|---|
|
|
57
|
+
| 3, 4 or 6 parallel items | F1 | 5 or 7 items → fix count or F2 |
|
|
58
|
+
| 5–9 items of mixed priority | F2 | Fewer than 5 → F1 |
|
|
59
|
+
| 2–4 capabilities each with a big visual | F3 | 5+ → F6 |
|
|
60
|
+
| Browsable peers (studies, templates) | F4 | Content must be read → F1 or F5 |
|
|
61
|
+
| Personas / modes / languages | F5 | > 5 tabs → vertical list or F6 |
|
|
62
|
+
| Narrative, one visual updating with steps | F6 | Independent visuals → F3 |
|
|
63
|
+
| Real sequence (onboarding, phases, history) | F7 | Not ordered → F1 |
|
|
64
|
+
| Two-sided "old way vs. new way" with a figure each | F8 | More than 2 sides or row-level detail → P2 |
|
|
65
|
+
| "Connects to your stack" ambient icon scatter | F9 | Needs to be a clickable directory → T3 or G2 |
|
|
66
|
+
|
|
67
|
+
## 4. Proof
|
|
68
|
+
|
|
69
|
+
| Content signal | Use | Tie-breaker |
|
|
70
|
+
|---|---|---|
|
|
71
|
+
| 3–4 short KPIs under the hero | S1 | Needs explanation → S2 |
|
|
72
|
+
| 2 or 4 metrics with context/baseline | S2 | Three items → S1 |
|
|
73
|
+
| KPIs where one moment of motion helps | S3 | Never for years or versions |
|
|
74
|
+
| One strong named endorsement | T1 | Several voices → T2 |
|
|
75
|
+
| 3 or 6 varied voices | T2 | Very uneven lengths → trim or masonry |
|
|
76
|
+
| ≥ 6 recognisable logos, must be legible | T3 | |
|
|
77
|
+
| ≥ 8 logos, compact ambient strip | T4 | Fewer than 8 → T3 |
|
|
78
|
+
| Logos and quotes both wanted | Two sections: T3 or T4, then T1 or T2 | Never one section. Together the quote loses weight and both get cramped |
|
|
79
|
+
|
|
80
|
+
## 5. Conversion
|
|
81
|
+
|
|
82
|
+
| Content signal | Use | Tie-breaker |
|
|
83
|
+
|---|---|---|
|
|
84
|
+
| Closing ask, one action | C1 | Default closer |
|
|
85
|
+
| Developer install / copy-run | C2 | Non-technical audience → C1 |
|
|
86
|
+
| Emotional, brand-led ending | C3 | Hero uses the same glow → C1 |
|
|
87
|
+
| Enquiry / contact / intake | C4 | A single email link would do → C1 with mailto |
|
|
88
|
+
| Single-field email/newsletter capture | C5 | More than one field → C4 |
|
|
89
|
+
| 2–3 plans | P1 | Many differentiators → add P2 |
|
|
90
|
+
| Many features across plans | P2 | Phone-first audience → per-plan accordion |
|
|
91
|
+
| One plan | P3 | Pair with T1 or T2 |
|
|
92
|
+
| Short FAQ answers | Q2 | Default FAQ |
|
|
93
|
+
| Long or code-heavy FAQ answers | Q1 | Mostly phone traffic → Q2 |
|
|
94
|
+
|
|
95
|
+
## 6. Gallery
|
|
96
|
+
|
|
97
|
+
| Content signal | Use | Tie-breaker |
|
|
98
|
+
|---|---|---|
|
|
99
|
+
| Visual catalogue, order irrelevant | G1 | Order matters → grid with row spans |
|
|
100
|
+
| 12+ items in categories | G2 | Under ~12 → plain grid |
|
|
101
|
+
| Ambient ecosystem teaser | G3 | Always link on to G1 or G2 |
|
|
102
|
+
| Selected work with outcomes | G4 | No real outcome → G1 |
|
|
103
|
+
| People / team | G5 | Need consent for photos and names |
|
|
104
|
+
| Priced goods to browse and buy, 4–12 items | G6 | 12+ and filtered → G2; no photos → F1 |
|
|
105
|
+
|
|
106
|
+
## 7. Editorial
|
|
107
|
+
|
|
108
|
+
| Content signal | Use | Tie-breaker |
|
|
109
|
+
|---|---|---|
|
|
110
|
+
| Article / essay / case-study body | E1 | Reference-style page → D1 |
|
|
111
|
+
| Long essay with asides and notes | E2 | Few notes → E1 with footnotes |
|
|
112
|
+
| Publication home with ranked stories | E3 | Equal-weight stories → E4 |
|
|
113
|
+
| Chronological or thematic index | E4 | Image-led → G4 |
|
|
114
|
+
|
|
115
|
+
## 8. Documentation
|
|
116
|
+
|
|
117
|
+
| Content signal | Use | Tie-breaker |
|
|
118
|
+
|---|---|---|
|
|
119
|
+
| Guides and handbook pages | D1 | Single article → E1 |
|
|
120
|
+
| Endpoint / SDK reference | D2 | Conceptual guides → D1 |
|
|
121
|
+
| Release notes | D3 | Rare releases with a story → E1 |
|
|
122
|
+
| Docs front door | D4 | Never a marketing page |
|
|
123
|
+
|
|
124
|
+
## 9. Expressive
|
|
125
|
+
|
|
126
|
+
| Content signal | Use | Tie-breaker |
|
|
127
|
+
|---|---|---|
|
|
128
|
+
| Strong assets, composition is the message | X1 | Sparse assets → H5 or X2 |
|
|
129
|
+
| Manifesto / statement, ≤ ~25 words | X2 | Longer copy → E1 |
|
|
130
|
+
| Story section, long scrolling side | X3 | Short scrolling side → F3 |
|
|
131
|
+
| Lateral browse of large images | X4 | Comparison needed → G1 or G2 |
|
|
132
|
+
| Project index, hover reveals image | X5 | Touch-first audience → needs the inline-thumbnail fallback |
|
|
133
|
+
|
|
134
|
+
## 10. Style routing
|
|
135
|
+
|
|
136
|
+
| Style | Default families | Default treatment | Default motion tier |
|
|
137
|
+
|---|---|---|---|
|
|
138
|
+
| Marketing (SaaS, product) | H1/H2, S1, F1–F5, T1–T4, P*, Q*, C* | carded, or flat for a softer look | Tier 1 |
|
|
139
|
+
| Editorial (publication, essay) | E1–E4, H3/H5, T1, ST4 | open or ruled | Tier 0, Tier 1 for reveals |
|
|
140
|
+
| Documentation | D1–D4, Q1, ST1, ST3 | ruled or flat | Tier 0 |
|
|
141
|
+
| Structural (app, dashboard) | ST5, ST6, ST1 | carded or ruled | Tier 0–1 |
|
|
142
|
+
| Hybrid (product + docs + blog) | Marketing home + D4/D1 + E1 | Pick one dominant treatment | Tier 1 |
|
|
143
|
+
| Expressive (awwwards-style) | H3/H4/H5, X1–X5, G4, ST4 | open or full-bleed | Tier 1, then choreography if requested |
|
|
144
|
+
|
|
145
|
+
Motion tier escalation: start at Tier 0. Go to Tier 1 (`layout-motion`) for reveals, hovers, count-ups and marquees. Go to Tier 2 (`layout-choreography`) only for pinned, scrubbed, timeline-driven or page-transition work, and only after the static layout is complete.
|
|
146
|
+
|
|
147
|
+
## 11. Overview table
|
|
148
|
+
|
|
149
|
+
| ID | Name | Job | Density | Media it needs |
|
|
150
|
+
|---|---|---|---|---|
|
|
151
|
+
| ST1 | Navigation Bar | orientation | low | none |
|
|
152
|
+
| ST2 | Announcement Bar | attention | low | none |
|
|
153
|
+
| ST3 | Sitemap Footer | orientation | high | none |
|
|
154
|
+
| ST4 | Statement Footer | desire | low | none |
|
|
155
|
+
| ST5 | Page Shell | orientation | low | none |
|
|
156
|
+
| ST6 | App Shell | orientation | high | none |
|
|
157
|
+
| H1 | Centered Statement Hero | attention | low | product UI |
|
|
158
|
+
| H2 | Split Hero | understanding | medium | product UI or code |
|
|
159
|
+
| H3 | Asymmetric Hero | desire | medium | photo / illustration |
|
|
160
|
+
| H4 | Full-Bleed Media Hero | attention | low | video / photo |
|
|
161
|
+
| H5 | Type-Led Statement Hero | attention | low | none |
|
|
162
|
+
| H6 | Floating Elements Hero | attention | low | product UI / photo |
|
|
163
|
+
| F1 | 3-Column Feature Grid | understanding | medium | optional |
|
|
164
|
+
| F2 | Bento Grid | desire | high | product UI / data |
|
|
165
|
+
| F3 | Alternating Z-Pattern | understanding | medium | large visuals |
|
|
166
|
+
| F4 | Card Rail | understanding | medium | thumbnails |
|
|
167
|
+
| F5 | Tabbed Feature Explorer | understanding | high | UI / code |
|
|
168
|
+
| F6 | Sticky Scroll Steps | understanding | medium | UI states |
|
|
169
|
+
| F7 | Process / Timeline | understanding | medium | optional |
|
|
170
|
+
| F8 | Comparison Split | understanding | medium | data / illustration |
|
|
171
|
+
| F9 | Ecosystem / Integration Diagram | understanding | low | illustration / logos |
|
|
172
|
+
| S1 | Horizontal Stat Bar | credibility | low | data |
|
|
173
|
+
| S2 | Large Number + Description | credibility | medium | data |
|
|
174
|
+
| S3 | Count-Up Row | attention | low | data |
|
|
175
|
+
| T1 | Single Large Quote | credibility | low | portrait |
|
|
176
|
+
| T2 | Testimonial Card Grid | credibility | medium | portraits |
|
|
177
|
+
| T3 | Logo Grid | credibility | low | logos |
|
|
178
|
+
| T4 | Marquee Logo Strip | credibility | low | logos |
|
|
179
|
+
| C1 | Centered CTA Banner | action | low | none |
|
|
180
|
+
| C2 | Split CTA (Text + Code) | action | medium | code |
|
|
181
|
+
| C3 | Full-Width Gradient CTA | action | low | none |
|
|
182
|
+
| C4 | Contact Split | action | medium | none |
|
|
183
|
+
| C5 | Newsletter Capture Banner | action | low | none |
|
|
184
|
+
| P1 | 3-Tier Pricing Table | action | high | none |
|
|
185
|
+
| P2 | Feature Comparison Matrix | understanding | high | data |
|
|
186
|
+
| P3 | Single Card Plan | action | low | none |
|
|
187
|
+
| Q1 | Two-Column FAQ | understanding | high | optional code |
|
|
188
|
+
| Q2 | Centered Accordion Stack | understanding | medium | none |
|
|
189
|
+
| G1 | Masonry Grid | desire | medium | images |
|
|
190
|
+
| G2 | Filterable Grid | reference | high | images |
|
|
191
|
+
| G3 | Marquee Rows | desire | medium | images |
|
|
192
|
+
| G4 | Case Study Index | credibility | medium | photo |
|
|
193
|
+
| G5 | People Grid | credibility | medium | portraits |
|
|
194
|
+
| G6 | Product Grid | desire | medium | photo |
|
|
195
|
+
| E1 | Article Page | reference | medium | optional |
|
|
196
|
+
| E2 | Longform with Margin Notes | reference | high | optional |
|
|
197
|
+
| E3 | Magazine Front | orientation | high | photo |
|
|
198
|
+
| E4 | Archive List | reference | high | none |
|
|
199
|
+
| D1 | Docs Shell | reference | high | code |
|
|
200
|
+
| D2 | API Reference | reference | high | code |
|
|
201
|
+
| D3 | Changelog | reference | medium | none |
|
|
202
|
+
| D4 | Docs Landing | orientation | medium | none |
|
|
203
|
+
| X1 | Broken-Grid Collage | desire | medium | strong images |
|
|
204
|
+
| X2 | Oversized Type Wall | attention | low | none |
|
|
205
|
+
| X3 | Sticky Split | understanding | medium | images |
|
|
206
|
+
| X4 | Horizontal Track Gallery | desire | medium | large images |
|
|
207
|
+
| X5 | Index with Hover Preview | desire | medium | photo |
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Treatments: how a composition is dressed
|
|
2
|
+
|
|
3
|
+
A **composition** is the arrangement (columns, spans, order). A **treatment** is the container language wrapped around it: whether items sit in cards, between rules, on flat blocks, edge to edge, or in open space. The same skeleton in a different treatment produces a different style, so one composition serves many styles instead of needing a copy for each.
|
|
4
|
+
|
|
5
|
+
Contents: 1 The five treatments · 2 Converting between treatments · 3 Mixing rules · 4 Worked example · 5 Which treatment for which style
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 1. The five treatments
|
|
10
|
+
|
|
11
|
+
| Treatment | Container | Dividers | Radius / shadow | Feels like |
|
|
12
|
+
|---|---|---|---|---|
|
|
13
|
+
| **carded** | `bg-surface` panel with `border-hairline` | Gaps between cards | `rounded-[var(--radius-panel)]`, shadow optional | Product UI, SaaS, dashboards |
|
|
14
|
+
| **ruled** | No fill; `border-hairline` rules separate items | Horizontal/vertical rules, whitespace | None | Editorial, documentation, technical |
|
|
15
|
+
|
|
16
|
+
> **Alignment rule (ruled lists).** When a ruled list has a label/title column next to a description column, the label column MUST use a **fixed width** (`sm:w-72 shrink-0`, `sm:w-56 shrink-0`, etc.) so every description starts at the same x position. Never use `grid-cols-[auto_1fr]` or bare `shrink-0` without a width — content of different lengths (`.gitignore` vs `SHAVIN.md`) will push descriptions out of alignment. Pick the widest label as the column width and apply it uniformly to every row.
|
|
17
|
+
| **flat** | `bg-canvas-subtle` fills, no border, no shadow | Colour change or gaps | `rounded-[var(--radius-panel)]`, no shadow | Friendly, modern, calm |
|
|
18
|
+
| **full-bleed** | Edge-to-edge media or colour; content overlays it | Section boundaries | None | Cinematic, immersive |
|
|
19
|
+
| **open** | No containers at all; space and type do the work | Whitespace, scale | None | Expressive, brand-led, publishing |
|
|
20
|
+
|
|
21
|
+
## 2. Converting between treatments
|
|
22
|
+
|
|
23
|
+
Start from the composition's grid (unchanged) and swap the container language:
|
|
24
|
+
|
|
25
|
+
1. Remove the panel fill, border and shadow (→ ruled/open), or replace them with a fill only (→ flat).
|
|
26
|
+
2. Turn card gaps into rules: `divide-x divide-hairline`/`divide-y divide-hairline` or `border-t border-hairline` per item, with the gap becoming padding.
|
|
27
|
+
3. Move padding inside items so type keeps the same distance from the rule as it had from the card edge.
|
|
28
|
+
4. Where a card gave media a rounded frame, decide: keep the frame (flat), square it (ruled), or let it run to the edge (full-bleed/open).
|
|
29
|
+
5. Re-check contrast and focus rings: without card boundaries, hover and focus states carry more weight.
|
|
30
|
+
|
|
31
|
+
## 3. Mixing rules
|
|
32
|
+
|
|
33
|
+
- One dominant treatment per page and at most one brand treatment (for example, `ruled` throughout with a `full-bleed` closing CTA).
|
|
34
|
+
- Docs pages inside a marketing site switch to `ruled` or `flat`; editorial pages switch to `open` or `ruled`. Tokens stay the same.
|
|
35
|
+
- Don't mix carded and flat in adjacent sections; it reads as inconsistency.
|
|
36
|
+
- Radius scale is one system: concentric inside padded panels (`foundations.md` §2). Use `rounded-panel-inner` or `rounded-panel-p5` for nested radii.
|
|
37
|
+
|
|
38
|
+
## 4. Worked example: F1 (3-Column Feature Grid)
|
|
39
|
+
|
|
40
|
+
Same grid (`base` 1 · `sm` 2 · `lg` 3), same slots (`item-media`, `item-title`, `item-desc`):
|
|
41
|
+
|
|
42
|
+
| Treatment | Item container | Result |
|
|
43
|
+
|---|---|---|
|
|
44
|
+
| carded | `bg-surface border border-hairline rounded-[var(--radius-panel)] p-6`, media in an inner `rounded-panel-inner` block | Standard SaaS feature tiles |
|
|
45
|
+
| ruled | No panel; `border-t border-hairline pt-6` on each item; no media frame | Editorial "three points" |
|
|
46
|
+
| flat | `bg-canvas-subtle rounded-[var(--radius-panel)] p-6`, no border | Softer, friendlier tiles |
|
|
47
|
+
| open | No container; large number/label typographic lead; generous gap | Statement-style list |
|
|
48
|
+
| full-bleed | Not suitable: choose a different composition (F6 or H4) | |
|
|
49
|
+
|
|
50
|
+
Some compositions don't support every treatment; the `treatments` list in each composition's metadata says which do.
|
|
51
|
+
|
|
52
|
+
## 5. Which treatment for which style
|
|
53
|
+
|
|
54
|
+
| Style | Primary | Brand |
|
|
55
|
+
|---|---|---|
|
|
56
|
+
| Marketing / SaaS | carded or flat | full-bleed closing CTA (C3) |
|
|
57
|
+
| Editorial | open or ruled | full-bleed image breaks |
|
|
58
|
+
| Documentation | ruled or flat | carded callouts |
|
|
59
|
+
| Structural / app | carded or ruled | none |
|
|
60
|
+
| Expressive | open or full-bleed | flat colour blocks |
|