You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .changeset/clear-pages-compose.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,3 +7,4 @@ Improves guidance and examples delivered through the Primer Brand MCP tools:
7
7
- Improves guidance delivered through the `primer_brand_review` tool.
8
8
- Cleaner output from the `primer_brand_examples` tool.
9
9
- Add new page design guidance advising that `River` descriptions are limited to 160 characters and the default `50:50` image-to-text ratio is preferred.
10
+
- Improved guidance on imagery used in `Hero` and `River` components
Fixed missing styles for ESM form controls, where the dependent design tokens were missing . Affects `TextInput`, `Textarea`, `Select`, `Checkbox`, `Radio`, and `FormControl`.
Copy file name to clipboardExpand all lines: packages/mcp/content/page-design.md
+29-2Lines changed: 29 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,17 +65,39 @@ Resolve exact sizes and weights with `primer_brand_tokens`.
65
65
66
66
## Component & element patterns
67
67
68
+
### Generated dither backgrounds
69
+
70
+
**Always pair dither with product UI.** Dither is a supporting background texture, never standalone media or content.
71
+
72
+
- Use two separate layers for every product UI visual: a dither background and a contained product-shot foreground. Keep them as distinct layers, never one flattened image.
73
+
- Treat a solid subtle/gray surround as placeholder-only. Replace the entire surrounding surface with dither.
74
+
- When no screenshot is provided, proactively create one lightweight, representative product UI mockup to show that product imagery matters and that the user should replace it with their own screenshot.
75
+
- When product UI does not fit the brief, use a relevant non-dither wallpaper, approved illustration, or video.
76
+
- Apply dither only as the background of an outer media wrapper.
77
+
- Never pass dither to `Hero.Image`, `Image`, `<img>`, or `<picture>`, or make it the direct image child of `River.Visual`.
78
+
- Layer the product shot above the dither, leaving dither visible around it.
79
+
- In Hero media, make the dither wrapper span the full viewport width.
80
+
- In River media, make the dither wrapper fill the `River.Visual` cell.
81
+
68
82
### Hero
69
83
70
84
**Do**
71
85
72
-
- Include relevant media and a label. Prefer a real product shot via `Hero.Image` / `Hero.Video`; use Asset Generator `create_product_landscape` when generating one, or `create_wallpaper` when a product shot does not fit.
86
+
- Every Hero must include relevant visual media and a label unless the brief explicitly requires a text-only Hero.
87
+
- A missing input screenshot is not a reason to omit Hero media.
88
+
- For one non-product media asset, use `Hero.Image` / `Hero.Video`.
89
+
- For product UI, use the two-layer treatment in **Generated dither backgrounds**. Do not render product UI directly through `Hero.Image`.
90
+
- Place a product UI media band immediately after the Hero copy.
91
+
- Constrain only the product-shot foreground to the shared content-grid width; the full-width media band is not permission to make the product shot itself bleed full-width.
92
+
- Use a single flattened, precomposed landscape image only when the brief explicitly requires one.
73
93
- Keep decorative or illustrative media inside the shared grid with a stable aspect ratio and a token-backed maximum height so it cannot dominate the page or bleed full-width.
74
94
- If needed, place custom media after `Hero`; use `trailingComponent` only when it must live inside the Hero composition.
75
95
76
96
**Don't**
77
97
78
-
- Add irrelevant hero media or use social templates such as `create_social_square` or `create_landscape` for hero media.
98
+
- Finish a Hero as text and actions only because the brief did not provide an image.
99
+
- Add irrelevant hero media, or use social or open-graph templates for hero media.
100
+
- Put dither behind the Hero copy, inside `Hero.Image`, inside the content grid, or in a flattened product shot. The dither is the full-bleed media-band background; the product shot is the contained foreground.
79
101
- Let decorative or illustrative Hero media grow arbitrarily tall or bleed outside the shared grid.
80
102
81
103
### River
@@ -85,10 +107,15 @@ Resolve exact sizes and weights with `primer_brand_tokens`.
85
107
- Use `<River variant="gridline" align="start">` throughout a page; omitting `align` also means start.
86
108
- Keep River descriptions to a maximum of 160 characters.
87
109
- Prefer the default `50:50` image-to-text ratio where possible; set `imageTextRatio="60:40"` only when the visual needs more space or emphasis.
110
+
- When a River explains a product feature, prefer real product UI over a standalone wallpaper.
111
+
- For River product UI, use the two-layer treatment in **Generated dither backgrounds** inside `River.Visual`.
112
+
- Use a standalone non-dither wallpaper only when no meaningful product UI can demonstrate the feature.
88
113
89
114
**Don't**
90
115
91
116
- Zigzag gridline Rivers with `align="end"`.
117
+
- Render dither as the direct image child of `River.Visual`; it must cover the full visual cell as the background behind a separate product shot.
118
+
- Use a wallpaper as the only River visual when a product shot would communicate the feature; wallpaper-only product Rivers read as placeholders.
'This Hero has no visual media. Heroes require `Hero.Image`, `Hero.Video`, or a deliberate full-width dither background with a separate product-shot foreground unless the brief explicitly asks for text only.',
168
+
evidence: evidence(match[0]),
169
+
})
170
+
}
171
+
returnfindings
172
+
},
173
+
}
174
+
175
+
/** Product-looking media must use the required dither background treatment. */
176
+
constproductShotNeedsDither: Rule={
177
+
id: 'product-shot-needs-dither',
178
+
run(code){
179
+
// Words that mean "this is real product UI" — layout bits plus GitHub feature names.
'Product UI must not use a default/subtle gray media surface. Put the product shot in a contained foreground layer and replace the entire surrounding media background with full-width dither.',
251
+
evidence: evidence(tag),
252
+
})
253
+
}
254
+
returnfindings
255
+
},
256
+
}
257
+
258
+
/** Dither is supporting background texture, never the image content itself. */
'Dither must never be rendered as image content. Use it only as an edge-to-edge background behind a separate, contained product shot; if no product screenshot is available, omit the dither.',
0 commit comments