@deriv-com/dds-marketing 1.0.0 → 1.0.2
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/.llm/components/accordion.md +1 -1
- package/.llm/components/accordionitem.md +1 -1
- package/.llm/components/aspectratio.md +1 -1
- package/.llm/components/background.md +371 -0
- package/.llm/components/badge.md +1 -1
- package/.llm/components/bottomsheet.md +1 -1
- package/.llm/components/breadcrumb.md +1 -1
- package/.llm/components/breadcrumbitem.md +1 -1
- package/.llm/components/button.md +10 -6
- package/.llm/components/buttonicon.md +3 -3
- package/.llm/components/card.md +1 -1
- package/.llm/components/cardbody.md +1 -1
- package/.llm/components/cardbutton.md +1 -1
- package/.llm/components/checkbox.md +1 -1
- package/.llm/components/ctabanner.md +26 -1
- package/.llm/components/ctabannerslider.md +22 -1
- package/.llm/components/divider.md +1 -1
- package/.llm/components/dropdownmenu.md +2 -2
- package/.llm/components/faqaccordion.md +1 -1
- package/.llm/components/featurebullets.md +1 -1
- package/.llm/components/featurecards.md +1 -1
- package/.llm/components/featurescroll.md +1 -1
- package/.llm/components/featuresplit.md +1 -1
- package/.llm/components/filterchip.md +1 -1
- package/.llm/components/footer.md +1 -1
- package/.llm/components/footergroup.md +1 -1
- package/.llm/components/grid.md +1 -1
- package/.llm/components/icon.md +13 -3
- package/.llm/components/illustrationcard.md +236 -0
- package/.llm/components/illustrationscene.md +233 -0
- package/.llm/components/landinghero.md +25 -1
- package/.llm/components/link.md +4 -4
- package/.llm/components/logocolumns.md +1 -1
- package/.llm/components/logorows.md +1 -1
- package/.llm/components/menuitem.md +1 -1
- package/.llm/components/navbar.md +1 -1
- package/.llm/components/navbaritem.md +1 -1
- package/.llm/components/navbarmenu.md +1 -1
- package/.llm/components/navbarmenugroup.md +1 -1
- package/.llm/components/navbarpanel.md +1 -1
- package/.llm/components/navbarswitcher.md +1 -1
- package/.llm/components/navbarswitcheroption.md +1 -1
- package/.llm/components/option.md +1 -1
- package/.llm/components/pageheader.md +22 -1
- package/.llm/components/pagination.md +1 -1
- package/.llm/components/paginationdots.md +1 -1
- package/.llm/components/producthero.md +1 -1
- package/.llm/components/removablechip.md +1 -1
- package/.llm/components/row.md +1 -1
- package/.llm/components/scroller.md +1 -1
- package/.llm/components/searchinput.md +1 -1
- package/.llm/components/segmentedcontrol.md +1 -1
- package/.llm/components/segmentedcontrolitem.md +1 -1
- package/.llm/components/select.md +1 -1
- package/.llm/components/selectchip.md +1 -1
- package/.llm/components/spinner.md +1 -1
- package/.llm/components/stack.md +1 -1
- package/.llm/components/statusdot.md +1 -1
- package/.llm/components/subdomainnavbar.md +1 -1
- package/.llm/components/tab.md +3 -3
- package/.llm/components/table.md +1 -1
- package/.llm/components/tablebody.md +1 -1
- package/.llm/components/tablecell.md +1 -1
- package/.llm/components/tablehead.md +1 -1
- package/.llm/components/tableheadercell.md +1 -1
- package/.llm/components/tablerow.md +1 -1
- package/.llm/components/tablist.md +1 -1
- package/.llm/components/testimonialrow.md +1 -1
- package/.llm/components/testimonialslider.md +1 -1
- package/.llm/components/textarea.md +1 -1
- package/.llm/components/textinput.md +1 -1
- package/.llm/components/tooltip.md +1 -1
- package/.llm/components/typography.md +1 -1
- package/.llm/digest/background.md +52 -0
- package/.llm/digest/ctabanner.md +4 -0
- package/.llm/digest/ctabannerslider.md +3 -0
- package/.llm/digest/illustrationcard.md +46 -0
- package/.llm/digest/illustrationscene.md +51 -0
- package/.llm/digest/landinghero.md +7 -0
- package/.llm/digest/pageheader.md +3 -0
- package/.llm/index.md +7 -0
- package/.llm/rules.md +20 -10
- package/.llm/tokens.md +11 -0
- package/AGENTS.md +7 -5
- package/dist/components/blocks/cta-banner/CtaBanner.d.ts +1 -1
- package/dist/components/blocks/cta-banner/CtaBanner.js +3 -2
- package/dist/components/blocks/cta-banner/CtaBanner.types.d.ts +5 -0
- package/dist/components/blocks/cta-banner/cta-banner-impl.css +8 -0
- package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.d.ts +1 -1
- package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.js +5 -4
- package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.types.d.ts +4 -0
- package/dist/components/blocks/cta-banner-slider/cta-banner-slider-impl.css +8 -0
- package/dist/components/blocks/landing-hero/LandingHero.d.ts +1 -1
- package/dist/components/blocks/landing-hero/LandingHero.js +4 -3
- package/dist/components/blocks/landing-hero/LandingHero.types.d.ts +7 -3
- package/dist/components/blocks/page-header/PageHeader.d.ts +1 -1
- package/dist/components/blocks/page-header/PageHeader.js +3 -2
- package/dist/components/blocks/page-header/PageHeader.types.d.ts +4 -0
- package/dist/components/blocks/page-header/page-header-impl.css +8 -0
- package/dist/components/core/background/Background.css +69 -0
- package/dist/components/core/background/Background.d.ts +21 -0
- package/dist/components/core/background/Background.js +36 -0
- package/dist/components/core/background/Background.types.d.ts +36 -0
- package/dist/components/core/background/Background.types.js +9 -0
- package/dist/components/core/background/background-impl.css +427 -0
- package/dist/components/core/background/halftone.d.ts +123 -0
- package/dist/components/core/background/halftone.js +682 -0
- package/dist/components/core/background/use-halftone.d.ts +15 -0
- package/dist/components/core/background/use-halftone.js +27 -0
- package/dist/components/core/background/use-offscreen.d.ts +10 -0
- package/dist/components/core/background/use-offscreen.js +30 -0
- package/dist/components/core/background/use-spotlight.d.ts +13 -0
- package/dist/components/core/background/use-spotlight.js +65 -0
- package/dist/components/core/illustration-card/IllustrationCard.css +40 -0
- package/dist/components/core/illustration-card/IllustrationCard.d.ts +22 -0
- package/dist/components/core/illustration-card/IllustrationCard.js +82 -0
- package/dist/components/core/illustration-card/IllustrationCard.types.d.ts +23 -0
- package/dist/components/core/illustration-card/IllustrationCard.types.js +8 -0
- package/dist/components/core/illustration-card/illustration-card-impl.css +27 -0
- package/dist/components/core/illustration-scene/IllustrationScene.css +44 -0
- package/dist/components/core/illustration-scene/IllustrationScene.d.ts +14 -0
- package/dist/components/core/illustration-scene/IllustrationScene.js +16 -0
- package/dist/components/core/illustration-scene/IllustrationScene.types.d.ts +33 -0
- package/dist/components/core/illustration-scene/IllustrationScene.types.js +8 -0
- package/dist/components/core/illustration-scene/illustration-scene-impl.css +40 -0
- package/dist/components/core/link/Link.js +5 -5
- package/dist/components/core/tab/Tab.types.d.ts +1 -1
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.js +6 -0
- package/dist/marketing.css +24 -0
- package/package.json +1 -1
|
@@ -118,7 +118,7 @@ This is the phone's breakpoint, size.breakpoint.md, and not the wider one that d
|
|
|
118
118
|
|
|
119
119
|
What this is not about is every row of controls. A set of filter chips, a pagination strip, a toolbar, a link sitting after a sentence — none of these is the page asking for something, and stacking them to full width would turn a strip the eye skims into a list it has to read. The test is whether the row is the call to action the section was written for.
|
|
120
120
|
Guidance only — cannot be checked automatically.
|
|
121
|
-
- **Never nest one interactive element inside another** — Nested interactive elements produce ambiguous hit targets and an unreachable inner control for keyboard and screen-reader users. This is why the rule cannot live on any single component — it constrains Button, Link,
|
|
121
|
+
- **Never nest one interactive element inside another** — Nested interactive elements produce ambiguous hit targets and an unreachable inner control for keyboard and screen-reader users. This is why the rule cannot live on any single component — it constrains Button, Link, CardButton and TextInput simultaneously.
|
|
122
122
|
Guidance only — cannot be checked automatically.
|
|
123
123
|
- **A section that paints a ground sets the ink to go with it** — A page sits on color.bg.page, and a section that separates itself from it takes one of three grounds. color.bg.subtle is the light one and needs nothing further — the page's own ink still reads on it. The other two are dark and do not: color.bg.brand-strong takes color.fg.on-brand-strong, and color.bg.brand takes color.fg.on-solid. Both are white, and both are written as the role rather than the white they resolve to. Set one of those backgrounds without its ink and the text inherits whatever the page was already using, which is near-black on a dark band — legible to nobody, and invisible to every check here, because each pair passes contrast on its own and nothing can tell whether a section used both.
|
|
124
124
|
|
|
@@ -61,6 +61,14 @@ Accepts: Button, Link
|
|
|
61
61
|
Use when: The one action the message asks for, or two at most. The coral is the banner's ground, so the primary is Button variant="inverse" tone="brand" — a primary Button is coral on coral, and the tone keeps it near-black in both themes — and a second is Button variant="secondary" tone="brand" — a white tint with a white label, fixed in both themes like the band.
|
|
62
62
|
Never for: A third action, or a primary Button: coral on the coral ground is a button nobody can see.
|
|
63
63
|
|
|
64
|
+
### background — `halftone` | `grid`
|
|
65
|
+
|
|
66
|
+
- `halftone` — A halftone drawn behind the band's content: white dots on the band's own coral, following the pointer over the band. Drawn by Background, placed as a layer under the content, so the band's own layout is untouched.
|
|
67
|
+
- `grid` — A fine rule grid behind the band's content: white hairlines on the coral, fading in towards the foot, brightening in a soft circle around the pointer. Drawn by Background as a layer under the band's own content, by the stylesheet alone — quieter than the halftone, and nothing runs at rest
|
|
68
|
+
|
|
69
|
+
Use when: The band is the page's one standout moment and wants more than a flat fill. Leave it out and the band is its flat ground, as it always was
|
|
70
|
+
Never for: More than one band on a page. The pattern is what makes a band the one a reader remembers, and two of them make neither
|
|
71
|
+
|
|
64
72
|
## Accessibility
|
|
65
73
|
|
|
66
74
|
Guaranteed by the component. Write none of it by hand: the ids these attributes point at are generated per instance, so an attribute set from outside either says the same thing twice or points at nothing.
|
|
@@ -83,7 +91,7 @@ This is the phone's breakpoint, size.breakpoint.md, and not the wider one that d
|
|
|
83
91
|
|
|
84
92
|
What this is not about is every row of controls. A set of filter chips, a pagination strip, a toolbar, a link sitting after a sentence — none of these is the page asking for something, and stacking them to full width would turn a strip the eye skims into a list it has to read. The test is whether the row is the call to action the section was written for.
|
|
85
93
|
Guidance only — cannot be checked automatically.
|
|
86
|
-
- **Never nest one interactive element inside another** — Nested interactive elements produce ambiguous hit targets and an unreachable inner control for keyboard and screen-reader users. This is why the rule cannot live on any single component — it constrains Button, Link,
|
|
94
|
+
- **Never nest one interactive element inside another** — Nested interactive elements produce ambiguous hit targets and an unreachable inner control for keyboard and screen-reader users. This is why the rule cannot live on any single component — it constrains Button, Link, CardButton and TextInput simultaneously.
|
|
87
95
|
Guidance only — cannot be checked automatically.
|
|
88
96
|
- **A section that paints a ground sets the ink to go with it** — A page sits on color.bg.page, and a section that separates itself from it takes one of three grounds. color.bg.subtle is the light one and needs nothing further — the page's own ink still reads on it. The other two are dark and do not: color.bg.brand-strong takes color.fg.on-brand-strong, and color.bg.brand takes color.fg.on-solid. Both are white, and both are written as the role rather than the white they resolve to. Set one of those backgrounds without its ink and the text inherits whatever the page was already using, which is near-black on a dark band — legible to nobody, and invisible to every check here, because each pair passes contrast on its own and nothing can tell whether a section used both.
|
|
89
97
|
|
|
@@ -184,3 +192,20 @@ import { Button, CtaBanner } from '@deriv-com/dds-marketing'
|
|
|
184
192
|
// Nested under a section's own h2
|
|
185
193
|
<CtaBanner title="Trade on any device" headingLevel="h3" />
|
|
186
194
|
```
|
|
195
|
+
|
|
196
|
+
### A patterned ground
|
|
197
|
+
|
|
198
|
+
White dots or a white rule grid on the coral band, behind the words and answering the pointer — drawn by Background under the band's own content.
|
|
199
|
+
|
|
200
|
+
```tsx
|
|
201
|
+
import { Button, CtaBanner } from '@deriv-com/dds-marketing'
|
|
202
|
+
|
|
203
|
+
// halftone — move the pointer over it
|
|
204
|
+
<CtaBanner title="Join 3M+ global traders" description="Open an account in minutes and start trading the world's markets." actions={<Button variant="inverse" href="/signup" tone="brand">Open account</Button>} background="halftone" />
|
|
205
|
+
|
|
206
|
+
// grid — move the pointer over it
|
|
207
|
+
<CtaBanner title="Join 3M+ global traders" description="Open an account in minutes and start trading the world's markets." actions={<Button variant="inverse" href="/signup" tone="brand">Open account</Button>} background="grid" />
|
|
208
|
+
|
|
209
|
+
// without — the flat ground
|
|
210
|
+
<CtaBanner title="Join 3M+ global traders" description="Open an account in minutes and start trading the world's markets." actions={<Button variant="inverse" href="/signup" tone="brand">Open account</Button>} />
|
|
211
|
+
```
|
|
@@ -71,6 +71,13 @@ Use when: The name the dots are announced by, as a group inside the banner. Its
|
|
|
71
71
|
|
|
72
72
|
Use when: The word each dot is announced by, before its number — 'Slide 2'. Translate it with the page, as controlsLabel is; a page that translates only the group's name still has every dot announced in English.
|
|
73
73
|
|
|
74
|
+
### background — `grid`
|
|
75
|
+
|
|
76
|
+
- `grid` — A fine rule grid behind the slides: white hairlines on the coral, fading in towards the foot, brightening in a soft circle around the pointer. Drawn by Background as a layer under the band's content, by the stylesheet alone, so it holds still while the slides move and costs nothing at rest
|
|
77
|
+
|
|
78
|
+
Use when: The band is the page's one standout promotion and wants more than a flat fill. Leave it out and the band is its flat coral, as it always was
|
|
79
|
+
Never for: More than one patterned band on a page. The pattern is what makes a band the one a reader remembers, and two of them make neither
|
|
80
|
+
|
|
74
81
|
## Accessibility
|
|
75
82
|
|
|
76
83
|
Guaranteed by the component. Write none of it by hand: the ids these attributes point at are generated per instance, so an attribute set from outside either says the same thing twice or points at nothing.
|
|
@@ -98,7 +105,7 @@ This is the phone's breakpoint, size.breakpoint.md, and not the wider one that d
|
|
|
98
105
|
|
|
99
106
|
What this is not about is every row of controls. A set of filter chips, a pagination strip, a toolbar, a link sitting after a sentence — none of these is the page asking for something, and stacking them to full width would turn a strip the eye skims into a list it has to read. The test is whether the row is the call to action the section was written for.
|
|
100
107
|
Guidance only — cannot be checked automatically.
|
|
101
|
-
- **Never nest one interactive element inside another** — Nested interactive elements produce ambiguous hit targets and an unreachable inner control for keyboard and screen-reader users. This is why the rule cannot live on any single component — it constrains Button, Link,
|
|
108
|
+
- **Never nest one interactive element inside another** — Nested interactive elements produce ambiguous hit targets and an unreachable inner control for keyboard and screen-reader users. This is why the rule cannot live on any single component — it constrains Button, Link, CardButton and TextInput simultaneously.
|
|
102
109
|
Guidance only — cannot be checked automatically.
|
|
103
110
|
- **A section that paints a ground sets the ink to go with it** — A page sits on color.bg.page, and a section that separates itself from it takes one of three grounds. color.bg.subtle is the light one and needs nothing further — the page's own ink still reads on it. The other two are dark and do not: color.bg.brand-strong takes color.fg.on-brand-strong, and color.bg.brand takes color.fg.on-solid. Both are white, and both are written as the role rather than the white they resolve to. Set one of those backgrounds without its ink and the text inherits whatever the page was already using, which is near-black on a dark band — legible to nobody, and invisible to every check here, because each pair passes contrast on its own and nothing can tell whether a section used both.
|
|
104
111
|
|
|
@@ -202,3 +209,17 @@ import { CtaBannerSlider } from '@deriv-com/dds-marketing'
|
|
|
202
209
|
// Headlines at h3, under a section's h2 — they look the same
|
|
203
210
|
<CtaBannerSlider slides={[{"title":"Join 3M+ global traders","description":"Open an account in minutes and start trading the world's markets.","primaryAction":{"label":"Open account","href":"/signup"}},{"title":"Analyse markets with AI-powered insights","description":"Charts and signals that keep up with the market, on every platform.","primaryAction":{"label":"Try TradersView","href":"/tradersview"}}]} headingLevel="h3" />
|
|
204
211
|
```
|
|
212
|
+
|
|
213
|
+
### A patterned ground
|
|
214
|
+
|
|
215
|
+
A white rule grid on the coral band behind the slides, brightening around the pointer — drawn by Background under the band's own content.
|
|
216
|
+
|
|
217
|
+
```tsx
|
|
218
|
+
import { CtaBannerSlider } from '@deriv-com/dds-marketing'
|
|
219
|
+
|
|
220
|
+
// grid — move the pointer over it
|
|
221
|
+
<CtaBannerSlider slides={[{"title":"Join 3M+ global traders","description":"Open an account in minutes and start trading the world's markets.","primaryAction":{"label":"Open account","href":"/signup"},"secondaryAction":{"label":"Learn more","href":"/about"}},{"title":"Analyse markets with AI-powered insights","description":"Charts and signals that keep up with the market, on every platform.","primaryAction":{"label":"Try TradersView","href":"/tradersview"}}]} background="grid" />
|
|
222
|
+
|
|
223
|
+
// without — the flat coral
|
|
224
|
+
<CtaBannerSlider slides={[{"title":"Join 3M+ global traders","description":"Open an account in minutes and start trading the world's markets.","primaryAction":{"label":"Open account","href":"/signup"},"secondaryAction":{"label":"Learn more","href":"/about"}},{"title":"Analyse markets with AI-powered insights","description":"Charts and signals that keep up with the market, on every platform.","primaryAction":{"label":"Try TradersView","href":"/tradersview"}}]} />
|
|
225
|
+
```
|
|
@@ -95,7 +95,7 @@ This is the phone's breakpoint, size.breakpoint.md, and not the wider one that d
|
|
|
95
95
|
|
|
96
96
|
What this is not about is every row of controls. A set of filter chips, a pagination strip, a toolbar, a link sitting after a sentence — none of these is the page asking for something, and stacking them to full width would turn a strip the eye skims into a list it has to read. The test is whether the row is the call to action the section was written for.
|
|
97
97
|
Guidance only — cannot be checked automatically.
|
|
98
|
-
- **Never nest one interactive element inside another** — Nested interactive elements produce ambiguous hit targets and an unreachable inner control for keyboard and screen-reader users. This is why the rule cannot live on any single component — it constrains Button, Link,
|
|
98
|
+
- **Never nest one interactive element inside another** — Nested interactive elements produce ambiguous hit targets and an unreachable inner control for keyboard and screen-reader users. This is why the rule cannot live on any single component — it constrains Button, Link, CardButton and TextInput simultaneously.
|
|
99
99
|
Guidance only — cannot be checked automatically.
|
|
100
100
|
- **A section that paints a ground sets the ink to go with it** — A page sits on color.bg.page, and a section that separates itself from it takes one of three grounds. color.bg.subtle is the light one and needs nothing further — the page's own ink still reads on it. The other two are dark and do not: color.bg.brand-strong takes color.fg.on-brand-strong, and color.bg.brand takes color.fg.on-solid. Both are white, and both are written as the role rather than the white they resolve to. Set one of those backgrounds without its ink and the text inherits whatever the page was already using, which is near-black on a dark band — legible to nobody, and invisible to every check here, because each pair passes contrast on its own and nothing can tell whether a section used both.
|
|
101
101
|
|
|
@@ -36,7 +36,7 @@ DropdownMenu renders 6 elements. A token binding names the part it applies to.
|
|
|
36
36
|
|
|
37
37
|
That is the one structural difference from product's menu, and it was forced rather than chosen: when this was built, this package's Button was an anchor with a required href, so it was a link and could not be a trigger; ButtonIcon is a real button and has no words. A set of destinations is chosen by reading them, so the trigger needs words, and nothing in this package draws a button with words. Drawing one here is the only honest answer left — and it is confined to this component rather than offered as a new button, because the moment it takes a variant it is a second place a button is decided.
|
|
38
38
|
|
|
39
|
-
It wears the secondary button's look — an outlined pill, no fill — and takes no variant to change it. A menu of supporting destinations is not the step a page was built to produce, so the brand fill would be the one thing on the band claiming to be the point, and `one-primary-per-
|
|
39
|
+
It wears the secondary button's look — an outlined pill, no fill — and takes no variant to change it. A menu of supporting destinations is not the step a page was built to produce, so the brand fill would be the one thing on the band claiming to be the point, and `one-primary-per-action-group` is the rule that says why. One look, because there is one job.
|
|
40
40
|
|
|
41
41
|
A real `<button>`, with `type="button"` set rather than left to the element's own default of submit: a language picker dropped into a newsletter band would otherwise send the form on the way to opening.
|
|
42
42
|
|
|
@@ -204,7 +204,7 @@ This is the phone's breakpoint, size.breakpoint.md, and not the wider one that d
|
|
|
204
204
|
|
|
205
205
|
What this is not about is every row of controls. A set of filter chips, a pagination strip, a toolbar, a link sitting after a sentence — none of these is the page asking for something, and stacking them to full width would turn a strip the eye skims into a list it has to read. The test is whether the row is the call to action the section was written for.
|
|
206
206
|
Guidance only — cannot be checked automatically.
|
|
207
|
-
- **Never nest one interactive element inside another** — Nested interactive elements produce ambiguous hit targets and an unreachable inner control for keyboard and screen-reader users. This is why the rule cannot live on any single component — it constrains Button, Link,
|
|
207
|
+
- **Never nest one interactive element inside another** — Nested interactive elements produce ambiguous hit targets and an unreachable inner control for keyboard and screen-reader users. This is why the rule cannot live on any single component — it constrains Button, Link, CardButton and TextInput simultaneously.
|
|
208
208
|
Guidance only — cannot be checked automatically.
|
|
209
209
|
- **A section that paints a ground sets the ink to go with it** — A page sits on color.bg.page, and a section that separates itself from it takes one of three grounds. color.bg.subtle is the light one and needs nothing further — the page's own ink still reads on it. The other two are dark and do not: color.bg.brand-strong takes color.fg.on-brand-strong, and color.bg.brand takes color.fg.on-solid. Both are white, and both are written as the role rather than the white they resolve to. Set one of those backgrounds without its ink and the text inherits whatever the page was already using, which is near-black on a dark band — legible to nobody, and invisible to every check here, because each pair passes contrast on its own and nothing can tell whether a section used both.
|
|
210
210
|
|
|
@@ -76,7 +76,7 @@ This is the phone's breakpoint, size.breakpoint.md, and not the wider one that d
|
|
|
76
76
|
|
|
77
77
|
What this is not about is every row of controls. A set of filter chips, a pagination strip, a toolbar, a link sitting after a sentence — none of these is the page asking for something, and stacking them to full width would turn a strip the eye skims into a list it has to read. The test is whether the row is the call to action the section was written for.
|
|
78
78
|
Guidance only — cannot be checked automatically.
|
|
79
|
-
- **Never nest one interactive element inside another** — Nested interactive elements produce ambiguous hit targets and an unreachable inner control for keyboard and screen-reader users. This is why the rule cannot live on any single component — it constrains Button, Link,
|
|
79
|
+
- **Never nest one interactive element inside another** — Nested interactive elements produce ambiguous hit targets and an unreachable inner control for keyboard and screen-reader users. This is why the rule cannot live on any single component — it constrains Button, Link, CardButton and TextInput simultaneously.
|
|
80
80
|
Guidance only — cannot be checked automatically.
|
|
81
81
|
- **A section that paints a ground sets the ink to go with it** — A page sits on color.bg.page, and a section that separates itself from it takes one of three grounds. color.bg.subtle is the light one and needs nothing further — the page's own ink still reads on it. The other two are dark and do not: color.bg.brand-strong takes color.fg.on-brand-strong, and color.bg.brand takes color.fg.on-solid. Both are white, and both are written as the role rather than the white they resolve to. Set one of those backgrounds without its ink and the text inherits whatever the page was already using, which is near-black on a dark band — legible to nobody, and invisible to every check here, because each pair passes contrast on its own and nothing can tell whether a section used both.
|
|
82
82
|
|
|
@@ -123,7 +123,7 @@ This is the phone's breakpoint, size.breakpoint.md, and not the wider one that d
|
|
|
123
123
|
|
|
124
124
|
What this is not about is every row of controls. A set of filter chips, a pagination strip, a toolbar, a link sitting after a sentence — none of these is the page asking for something, and stacking them to full width would turn a strip the eye skims into a list it has to read. The test is whether the row is the call to action the section was written for.
|
|
125
125
|
Guidance only — cannot be checked automatically.
|
|
126
|
-
- **Never nest one interactive element inside another** — Nested interactive elements produce ambiguous hit targets and an unreachable inner control for keyboard and screen-reader users. This is why the rule cannot live on any single component — it constrains Button, Link,
|
|
126
|
+
- **Never nest one interactive element inside another** — Nested interactive elements produce ambiguous hit targets and an unreachable inner control for keyboard and screen-reader users. This is why the rule cannot live on any single component — it constrains Button, Link, CardButton and TextInput simultaneously.
|
|
127
127
|
Guidance only — cannot be checked automatically.
|
|
128
128
|
- **A section that paints a ground sets the ink to go with it** — A page sits on color.bg.page, and a section that separates itself from it takes one of three grounds. color.bg.subtle is the light one and needs nothing further — the page's own ink still reads on it. The other two are dark and do not: color.bg.brand-strong takes color.fg.on-brand-strong, and color.bg.brand takes color.fg.on-solid. Both are white, and both are written as the role rather than the white they resolve to. Set one of those backgrounds without its ink and the text inherits whatever the page was already using, which is near-black on a dark band — legible to nobody, and invisible to every check here, because each pair passes contrast on its own and nothing can tell whether a section used both.
|
|
129
129
|
|
|
@@ -97,7 +97,7 @@ This is the phone's breakpoint, size.breakpoint.md, and not the wider one that d
|
|
|
97
97
|
|
|
98
98
|
What this is not about is every row of controls. A set of filter chips, a pagination strip, a toolbar, a link sitting after a sentence — none of these is the page asking for something, and stacking them to full width would turn a strip the eye skims into a list it has to read. The test is whether the row is the call to action the section was written for.
|
|
99
99
|
Guidance only — cannot be checked automatically.
|
|
100
|
-
- **Never nest one interactive element inside another** — Nested interactive elements produce ambiguous hit targets and an unreachable inner control for keyboard and screen-reader users. This is why the rule cannot live on any single component — it constrains Button, Link,
|
|
100
|
+
- **Never nest one interactive element inside another** — Nested interactive elements produce ambiguous hit targets and an unreachable inner control for keyboard and screen-reader users. This is why the rule cannot live on any single component — it constrains Button, Link, CardButton and TextInput simultaneously.
|
|
101
101
|
Guidance only — cannot be checked automatically.
|
|
102
102
|
- **A section that paints a ground sets the ink to go with it** — A page sits on color.bg.page, and a section that separates itself from it takes one of three grounds. color.bg.subtle is the light one and needs nothing further — the page's own ink still reads on it. The other two are dark and do not: color.bg.brand-strong takes color.fg.on-brand-strong, and color.bg.brand takes color.fg.on-solid. Both are white, and both are written as the role rather than the white they resolve to. Set one of those backgrounds without its ink and the text inherits whatever the page was already using, which is near-black on a dark band — legible to nobody, and invisible to every check here, because each pair passes contrast on its own and nothing can tell whether a section used both.
|
|
103
103
|
|
|
@@ -152,7 +152,7 @@ This is the phone's breakpoint, size.breakpoint.md, and not the wider one that d
|
|
|
152
152
|
|
|
153
153
|
What this is not about is every row of controls. A set of filter chips, a pagination strip, a toolbar, a link sitting after a sentence — none of these is the page asking for something, and stacking them to full width would turn a strip the eye skims into a list it has to read. The test is whether the row is the call to action the section was written for.
|
|
154
154
|
Guidance only — cannot be checked automatically.
|
|
155
|
-
- **Never nest one interactive element inside another** — Nested interactive elements produce ambiguous hit targets and an unreachable inner control for keyboard and screen-reader users. This is why the rule cannot live on any single component — it constrains Button, Link,
|
|
155
|
+
- **Never nest one interactive element inside another** — Nested interactive elements produce ambiguous hit targets and an unreachable inner control for keyboard and screen-reader users. This is why the rule cannot live on any single component — it constrains Button, Link, CardButton and TextInput simultaneously.
|
|
156
156
|
Guidance only — cannot be checked automatically.
|
|
157
157
|
- **A section that paints a ground sets the ink to go with it** — A page sits on color.bg.page, and a section that separates itself from it takes one of three grounds. color.bg.subtle is the light one and needs nothing further — the page's own ink still reads on it. The other two are dark and do not: color.bg.brand-strong takes color.fg.on-brand-strong, and color.bg.brand takes color.fg.on-solid. Both are white, and both are written as the role rather than the white they resolve to. Set one of those backgrounds without its ink and the text inherits whatever the page was already using, which is near-black on a dark band — legible to nobody, and invisible to every check here, because each pair passes contrast on its own and nothing can tell whether a section used both.
|
|
158
158
|
|
|
@@ -115,7 +115,7 @@ This is the phone's breakpoint, size.breakpoint.md, and not the wider one that d
|
|
|
115
115
|
|
|
116
116
|
What this is not about is every row of controls. A set of filter chips, a pagination strip, a toolbar, a link sitting after a sentence — none of these is the page asking for something, and stacking them to full width would turn a strip the eye skims into a list it has to read. The test is whether the row is the call to action the section was written for.
|
|
117
117
|
Guidance only — cannot be checked automatically.
|
|
118
|
-
- **Never nest one interactive element inside another** — Nested interactive elements produce ambiguous hit targets and an unreachable inner control for keyboard and screen-reader users. This is why the rule cannot live on any single component — it constrains Button, Link,
|
|
118
|
+
- **Never nest one interactive element inside another** — Nested interactive elements produce ambiguous hit targets and an unreachable inner control for keyboard and screen-reader users. This is why the rule cannot live on any single component — it constrains Button, Link, CardButton and TextInput simultaneously.
|
|
119
119
|
Guidance only — cannot be checked automatically.
|
|
120
120
|
- **A section that paints a ground sets the ink to go with it** — A page sits on color.bg.page, and a section that separates itself from it takes one of three grounds. color.bg.subtle is the light one and needs nothing further — the page's own ink still reads on it. The other two are dark and do not: color.bg.brand-strong takes color.fg.on-brand-strong, and color.bg.brand takes color.fg.on-solid. Both are white, and both are written as the role rather than the white they resolve to. Set one of those backgrounds without its ink and the text inherits whatever the page was already using, which is near-black on a dark band — legible to nobody, and invisible to every check here, because each pair passes contrast on its own and nothing can tell whether a section used both.
|
|
121
121
|
|
|
@@ -140,7 +140,7 @@ This is the phone's breakpoint, size.breakpoint.md, and not the wider one that d
|
|
|
140
140
|
|
|
141
141
|
What this is not about is every row of controls. A set of filter chips, a pagination strip, a toolbar, a link sitting after a sentence — none of these is the page asking for something, and stacking them to full width would turn a strip the eye skims into a list it has to read. The test is whether the row is the call to action the section was written for.
|
|
142
142
|
Guidance only — cannot be checked automatically.
|
|
143
|
-
- **Never nest one interactive element inside another** — Nested interactive elements produce ambiguous hit targets and an unreachable inner control for keyboard and screen-reader users. This is why the rule cannot live on any single component — it constrains Button, Link,
|
|
143
|
+
- **Never nest one interactive element inside another** — Nested interactive elements produce ambiguous hit targets and an unreachable inner control for keyboard and screen-reader users. This is why the rule cannot live on any single component — it constrains Button, Link, CardButton and TextInput simultaneously.
|
|
144
144
|
Guidance only — cannot be checked automatically.
|
|
145
145
|
- **A section that paints a ground sets the ink to go with it** — A page sits on color.bg.page, and a section that separates itself from it takes one of three grounds. color.bg.subtle is the light one and needs nothing further — the page's own ink still reads on it. The other two are dark and do not: color.bg.brand-strong takes color.fg.on-brand-strong, and color.bg.brand takes color.fg.on-solid. Both are white, and both are written as the role rather than the white they resolve to. Set one of those backgrounds without its ink and the text inherits whatever the page was already using, which is near-black on a dark band — legible to nobody, and invisible to every check here, because each pair passes contrast on its own and nothing can tell whether a section used both.
|
|
146
146
|
|
|
@@ -167,7 +167,7 @@ This is the phone's breakpoint, size.breakpoint.md, and not the wider one that d
|
|
|
167
167
|
|
|
168
168
|
What this is not about is every row of controls. A set of filter chips, a pagination strip, a toolbar, a link sitting after a sentence — none of these is the page asking for something, and stacking them to full width would turn a strip the eye skims into a list it has to read. The test is whether the row is the call to action the section was written for.
|
|
169
169
|
Guidance only — cannot be checked automatically.
|
|
170
|
-
- **Never nest one interactive element inside another** — Nested interactive elements produce ambiguous hit targets and an unreachable inner control for keyboard and screen-reader users. This is why the rule cannot live on any single component — it constrains Button, Link,
|
|
170
|
+
- **Never nest one interactive element inside another** — Nested interactive elements produce ambiguous hit targets and an unreachable inner control for keyboard and screen-reader users. This is why the rule cannot live on any single component — it constrains Button, Link, CardButton and TextInput simultaneously.
|
|
171
171
|
Guidance only — cannot be checked automatically.
|
|
172
172
|
- **A section that paints a ground sets the ink to go with it** — A page sits on color.bg.page, and a section that separates itself from it takes one of three grounds. color.bg.subtle is the light one and needs nothing further — the page's own ink still reads on it. The other two are dark and do not: color.bg.brand-strong takes color.fg.on-brand-strong, and color.bg.brand takes color.fg.on-solid. Both are white, and both are written as the role rather than the white they resolve to. Set one of those backgrounds without its ink and the text inherits whatever the page was already using, which is near-black on a dark band — legible to nobody, and invisible to every check here, because each pair passes contrast on its own and nothing can tell whether a section used both.
|
|
173
173
|
|
|
@@ -139,7 +139,7 @@ This is the phone's breakpoint, size.breakpoint.md, and not the wider one that d
|
|
|
139
139
|
|
|
140
140
|
What this is not about is every row of controls. A set of filter chips, a pagination strip, a toolbar, a link sitting after a sentence — none of these is the page asking for something, and stacking them to full width would turn a strip the eye skims into a list it has to read. The test is whether the row is the call to action the section was written for.
|
|
141
141
|
Guidance only — cannot be checked automatically.
|
|
142
|
-
- **Never nest one interactive element inside another** — Nested interactive elements produce ambiguous hit targets and an unreachable inner control for keyboard and screen-reader users. This is why the rule cannot live on any single component — it constrains Button, Link,
|
|
142
|
+
- **Never nest one interactive element inside another** — Nested interactive elements produce ambiguous hit targets and an unreachable inner control for keyboard and screen-reader users. This is why the rule cannot live on any single component — it constrains Button, Link, CardButton and TextInput simultaneously.
|
|
143
143
|
Guidance only — cannot be checked automatically.
|
|
144
144
|
- **A section that paints a ground sets the ink to go with it** — A page sits on color.bg.page, and a section that separates itself from it takes one of three grounds. color.bg.subtle is the light one and needs nothing further — the page's own ink still reads on it. The other two are dark and do not: color.bg.brand-strong takes color.fg.on-brand-strong, and color.bg.brand takes color.fg.on-solid. Both are white, and both are written as the role rather than the white they resolve to. Set one of those backgrounds without its ink and the text inherits whatever the page was already using, which is near-black on a dark band — legible to nobody, and invisible to every check here, because each pair passes contrast on its own and nothing can tell whether a section used both.
|
|
145
145
|
|
package/.llm/components/grid.md
CHANGED
|
@@ -132,7 +132,7 @@ This is the phone's breakpoint, size.breakpoint.md, and not the wider one that d
|
|
|
132
132
|
|
|
133
133
|
What this is not about is every row of controls. A set of filter chips, a pagination strip, a toolbar, a link sitting after a sentence — none of these is the page asking for something, and stacking them to full width would turn a strip the eye skims into a list it has to read. The test is whether the row is the call to action the section was written for.
|
|
134
134
|
Guidance only — cannot be checked automatically.
|
|
135
|
-
- **Never nest one interactive element inside another** — Nested interactive elements produce ambiguous hit targets and an unreachable inner control for keyboard and screen-reader users. This is why the rule cannot live on any single component — it constrains Button, Link,
|
|
135
|
+
- **Never nest one interactive element inside another** — Nested interactive elements produce ambiguous hit targets and an unreachable inner control for keyboard and screen-reader users. This is why the rule cannot live on any single component — it constrains Button, Link, CardButton and TextInput simultaneously.
|
|
136
136
|
Guidance only — cannot be checked automatically.
|
|
137
137
|
- **A section that paints a ground sets the ink to go with it** — A page sits on color.bg.page, and a section that separates itself from it takes one of three grounds. color.bg.subtle is the light one and needs nothing further — the page's own ink still reads on it. The other two are dark and do not: color.bg.brand-strong takes color.fg.on-brand-strong, and color.bg.brand takes color.fg.on-solid. Both are white, and both are written as the role rather than the white they resolve to. Set one of those backgrounds without its ink and the text inherits whatever the page was already using, which is near-black on a dark band — legible to nobody, and invisible to every check here, because each pair passes contrast on its own and nothing can tell whether a section used both.
|
|
138
138
|
|
package/.llm/components/icon.md
CHANGED
|
@@ -75,11 +75,21 @@ This is the phone's breakpoint, size.breakpoint.md, and not the wider one that d
|
|
|
75
75
|
|
|
76
76
|
What this is not about is every row of controls. A set of filter chips, a pagination strip, a toolbar, a link sitting after a sentence — none of these is the page asking for something, and stacking them to full width would turn a strip the eye skims into a list it has to read. The test is whether the row is the call to action the section was written for.
|
|
77
77
|
Guidance only — cannot be checked automatically.
|
|
78
|
-
- **
|
|
78
|
+
- **Light weight needs size to survive, and the largest step wants it** — Quill ships every system glyph three times — light, regular and solid — as separate components chosen at the import site. Icon has no weight prop and cannot have one, so nothing in this system can observe the choice, let alone enforce it.
|
|
79
|
+
|
|
80
|
+
Size settles the light weight, from both ends. At xs its thinnest strokes fall below a pixel and drop out, leaving a shape that reads as broken rather than as light, so light belongs at md and above. At the top of the ramp it is the better weight rather than merely an allowed one: a glyph carries its stroke weight through any scale, so a regular glyph drawn for 24px renders its strokes at twice that width at xl, and reads as heavy rather than confident. A marketing page puts glyphs at that size — a callout, a highlighted block — where a product screen rarely does, which is why this half is Marketing's own. At rest, regular from sm through lg, and light at xl.
|
|
81
|
+
|
|
82
|
+
What size does not settle is regular against solid. That is a question about what the glyph means, and icon-weight-within-a-set answers it. This rule previously claimed size decided all three, and named steps above xl that the ramp no longer has — the first is the fault Product's version of this rule was corrected for.
|
|
79
83
|
Guidance only — cannot be checked automatically.
|
|
80
|
-
- **
|
|
84
|
+
- **In a set of icons, weight marks the current one** — Quill ships every system glyph three times — light, regular and solid — as separate components chosen at the import site, and Icon has no weight prop, so nothing here can observe the choice.
|
|
85
|
+
|
|
86
|
+
Within a set of sibling icons — a row of tabs, a segmented control — the weight is what says which one is current: regular at rest, solid once selected, the same glyph at the same size so the shape stays recognisable and simply fills in. That is the one cue for selection that does not depend on colour, and it survives only while nothing else in the set is solid. Reaching for solid inside a set because it looks better spends it.
|
|
87
|
+
|
|
88
|
+
Outside a set there is nothing to distinguish, and solid claims nothing about selection. The arrow after a standalone link, a mark beside a heading, an icon in a button — none of these sit among siblings competing to be current, and a filled shape is recognised faster than an outlined one, which is the reason to show a glyph rather than words.
|
|
89
|
+
|
|
90
|
+
This replaces a rule that said solid means selected everywhere. Marketing has more lone glyphs than Product and fewer sets, so the broad version cost it most: Link's solid arrow had to be recorded as an exception to it, when the arrow was never the case the rule protects.
|
|
81
91
|
Guidance only — cannot be checked automatically.
|
|
82
|
-
- **Never nest one interactive element inside another** — Nested interactive elements produce ambiguous hit targets and an unreachable inner control for keyboard and screen-reader users. This is why the rule cannot live on any single component — it constrains Button, Link,
|
|
92
|
+
- **Never nest one interactive element inside another** — Nested interactive elements produce ambiguous hit targets and an unreachable inner control for keyboard and screen-reader users. This is why the rule cannot live on any single component — it constrains Button, Link, CardButton and TextInput simultaneously.
|
|
83
93
|
Guidance only — cannot be checked automatically.
|
|
84
94
|
- **A section that paints a ground sets the ink to go with it** — A page sits on color.bg.page, and a section that separates itself from it takes one of three grounds. color.bg.subtle is the light one and needs nothing further — the page's own ink still reads on it. The other two are dark and do not: color.bg.brand-strong takes color.fg.on-brand-strong, and color.bg.brand takes color.fg.on-solid. Both are white, and both are written as the role rather than the white they resolve to. Set one of those backgrounds without its ink and the text inherits whatever the page was already using, which is near-black on a dark band — legible to nobody, and invisible to every check here, because each pair passes contrast on its own and nothing can tell whether a section used both.
|
|
85
95
|
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
<!-- GENERATED from illustration-card.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# IllustrationCard
|
|
4
|
+
|
|
5
|
+
A pane of glass holding a piece of product information — a market's price, a balance, a status — in one of three shapes, used as a picture: laid over a photograph or a piece of art, or standing on its own as the image a section shows beside its words. It is never the section's content. What a section says is set in the section's own blocks and type; this is an illustration of the product, the way a screenshot would be one, only drawn from the system's own parts.
|
|
6
|
+
|
|
7
|
+
It owns the two things every such picture has to get right and nobody gets right twice: its shape and its surface. The shape is one of three — four by three, square, three by four — so pictures on one page and across a site agree, and none is a one-off. The surface is always glass over a blur of whatever is behind it — light glass in light mode, a faint frosted white in dark — so the pane reads as part of the image it sits on rather than a box pasted onto it.
|
|
8
|
+
|
|
9
|
+
Everything inside is illustrative: built from the system's real components so it looks exactly like the product, and made inert, so nothing in it can be focused, pressed or typed into, and a screen reader hears one image described by `label`. The product information inside is the page's. A photograph or a person it sits on, or beside, is the page's or a block's to place; this is the pane alone.
|
|
10
|
+
|
|
11
|
+
## Use when
|
|
12
|
+
|
|
13
|
+
- Product information laid over a photograph or a piece of art — a market's price and status over a picture of a trader, a balance over a device
|
|
14
|
+
- A standalone image of the product beside a section's words, where a screenshot would be too literal: the pane is the picture the section shows
|
|
15
|
+
- Several such pictures across a site that have to agree in shape and surface without each page deciding
|
|
16
|
+
|
|
17
|
+
## Do not use
|
|
18
|
+
|
|
19
|
+
- A section has content to present — features, benefits, steps, a list → `FeatureCards`
|
|
20
|
+
- The content is something a reader acts on — a link, a form, a set of options → `Card`
|
|
21
|
+
- There is only a photograph → `AspectRatio`
|
|
22
|
+
- A section's content. Headings, descriptions, features and lists belong in the section's own blocks and type; a pane of them reads as a picture, and a reader skims past what the page meant them to read
|
|
23
|
+
- A container for anything other than product information — a quote, a call to action, a form, navigation. It is an illustration of the product and nothing else
|
|
24
|
+
- Live readings presented as a picture. What the pane shows is illustrative — a price, a status drawn to explain — and a reader takes a number in it at face value; anything relied on belongs in the page's text
|
|
25
|
+
- Any other shape. The three ratios are the whole of the choice, so every picture on a site agrees; one that needed a fourth is a different component
|
|
26
|
+
- A real interface a reader is meant to operate. The pane makes everything in it inert — a button in it is a picture of a button — so anything a reader must press belongs outside it, in the section's own actions
|
|
27
|
+
|
|
28
|
+
## Anatomy
|
|
29
|
+
|
|
30
|
+
IllustrationCard renders 2 elements. A token binding names the part it applies to.
|
|
31
|
+
|
|
32
|
+
- `root` — `<div>`, class `dds-illustrationcard`. The pane: one of three proportions whatever is put in it — the aspect tokens — and the glass. Its fill is color.bg.surface-glass — white at most of its strength in light mode, a faint frosted white in dark — over a blur of size.backdrop-blur in illustration-card-impl.css, because a blur is a function no binding can name. It holds radius.surface and space.inset.card like a Card, a hairline edge so its outline survives on a light page, and the default ink, color.fg.default, which follows the glass from dark on light to light on frosted. It is one image to assistive technology — `role="img"`, named by `label` — so a screen reader hears what the picture shows in a sentence rather than a list of controls that are not there.
|
|
33
|
+
- `content` — `<div>`, class `dds-illustrationcard__content`. What the pane holds, made a picture. It is `inert`: whatever components draw it — a Button, a SegmentedControl, a TextInput — look exactly as they do anywhere, and none of them can be focused, tabbed to, pressed or typed into, so a reader never meets a control that does nothing. Laid out down the pane from the start edge at its own size, and scaled down as a whole where the pane is too small to hold it — the way a picture shrinks — so a pane on a phone shows the same UI smaller rather than overlapped or cut off. The shape is fixed: the UI never stretches the pane.
|
|
34
|
+
|
|
35
|
+
Apply these classes from the generated `illustrationCardParts` constant rather than writing the strings by hand.
|
|
36
|
+
|
|
37
|
+
## Composition
|
|
38
|
+
|
|
39
|
+
- Can contain: any content
|
|
40
|
+
- Never contains: `IllustrationCard`, `Background` — in children or in any prop that takes a node
|
|
41
|
+
|
|
42
|
+
## Props
|
|
43
|
+
|
|
44
|
+
### ratio — `landscape` | `square` | `upright` (default `landscape`)
|
|
45
|
+
|
|
46
|
+
- `landscape` — Four by three, and the default. For a panel beside words in a wide section
|
|
47
|
+
- `square` — One by one. For a grid of panels, or a column no wider than it is tall
|
|
48
|
+
- `upright` — Three by four. For a phone, or a narrow column beside a tall run of words
|
|
49
|
+
|
|
50
|
+
Use when: The panel's shape. One of three, so panels across a site agree
|
|
51
|
+
Never for: Fitting a particular piece of UI. The shape is a decision about the layout; the UI is laid out for it
|
|
52
|
+
|
|
53
|
+
### label — `string` **Required.**
|
|
54
|
+
|
|
55
|
+
Use when: Always. What the picture shows, in a sentence — "Trade ticket: buy Gold to rise over 5 minutes, staking 10 USD". The pane is one image to assistive technology and this is its whole description; nothing inside it is read out on its own
|
|
56
|
+
Never for: A title or a caption the page shows. It is never drawn; a heading the reader sees belongs to the section beside the picture
|
|
57
|
+
|
|
58
|
+
Also accepts everything from `HTMLAttributes<HTMLDivElement>`.
|
|
59
|
+
|
|
60
|
+
## Accessibility
|
|
61
|
+
|
|
62
|
+
Guaranteed by the component. Write none of it by hand: the ids these attributes point at are generated per instance, so an attribute set from outside either says the same thing twice or points at nothing.
|
|
63
|
+
|
|
64
|
+
- Announced as: `img`
|
|
65
|
+
- the pane is one image, named by `label`, and nothing inside it reaches the accessibility tree on its own. A picture of a trade ticket read out as a segmented control, two fields and a button tells a screen-reader user there is a form here that does not exist
|
|
66
|
+
- nothing inside the pane can be focused or operated. It is inert, so a keyboard skips straight past it and a pointer cannot press what only looks like a control
|
|
67
|
+
- the pane's ink meets contrast against the glass and the darkest ground it stands on. What is behind the glass varies; in light mode the near-white fill carries the dark ink, and in dark mode the frosted white is faint enough that the band beneath decides the contrast for the light ink
|
|
68
|
+
|
|
69
|
+
## Rules
|
|
70
|
+
|
|
71
|
+
- **On a phone a section's actions stack and each fills the width, including when there is only one** — On a phone a page's actions stack, and each one fills the width. Not most of it, and not the width its label happens to need — the whole column.
|
|
72
|
+
|
|
73
|
+
Two side by side is what this replaces. On the narrowest screen each gets half a column minus the gap, which is rarely enough for a real label: the words wrap inside the pills, the two buttons come out different heights, and the pair reads as a broken row rather than as a choice. Stacked, each has the whole width and neither has to shorten its words to fit.
|
|
74
|
+
|
|
75
|
+
A single action fills too, and that is the part worth saying, because it is the one that looks unnecessary. A lone button has the room to sit at its natural width and still should not: a full-width control is the phone's convention for the thing the screen is asking you to do, and a pill hugging its label reads as one option among others that are not there. It also makes the target predictable — the whole width, wherever the thumb lands — which a centred pill does not.
|
|
76
|
+
|
|
77
|
+
Filling is the row's job rather than the button's. A button has no width of its own and is not given one; the row it sits in becomes a column and stretches its children, so nothing about the control changes and the same button is full width here and its own size on a desktop.
|
|
78
|
+
|
|
79
|
+
This is the phone's breakpoint, size.breakpoint.md, and not the wider one that decides whether a heading is centred. Those are different questions and they break at different widths: a heading stops being centred when the measure is the screen, while a button stops being full width much sooner than that — stretched across a tablet it is a long way from its own label, and a label centred in a metre of pill is harder to hit than one in a pill the size of the words.
|
|
80
|
+
|
|
81
|
+
What this is not about is every row of controls. A set of filter chips, a pagination strip, a toolbar, a link sitting after a sentence — none of these is the page asking for something, and stacking them to full width would turn a strip the eye skims into a list it has to read. The test is whether the row is the call to action the section was written for.
|
|
82
|
+
Guidance only — cannot be checked automatically.
|
|
83
|
+
- **Never nest one interactive element inside another** — Nested interactive elements produce ambiguous hit targets and an unreachable inner control for keyboard and screen-reader users. This is why the rule cannot live on any single component — it constrains Button, Link, CardButton and TextInput simultaneously.
|
|
84
|
+
Guidance only — cannot be checked automatically.
|
|
85
|
+
- **A section that paints a ground sets the ink to go with it** — A page sits on color.bg.page, and a section that separates itself from it takes one of three grounds. color.bg.subtle is the light one and needs nothing further — the page's own ink still reads on it. The other two are dark and do not: color.bg.brand-strong takes color.fg.on-brand-strong, and color.bg.brand takes color.fg.on-solid. Both are white, and both are written as the role rather than the white they resolve to. Set one of those backgrounds without its ink and the text inherits whatever the page was already using, which is near-black on a dark band — legible to nobody, and invisible to every check here, because each pair passes contrast on its own and nothing can tell whether a section used both.
|
|
86
|
+
|
|
87
|
+
color.bg.brand carries a second limit that is not about forgetting. Its ink measures 3.39:1, which clears the 3:1 a heading needs and misses the 4.5:1 running copy needs. A coral band may carry a headline and a call to action; a paragraph on one is text the reader has to work through at a ratio the waiver on that role does not cover — the waiver says so itself. A section with copy in it takes color.bg.brand-strong, which is near-black and carries white at full contrast.
|
|
88
|
+
|
|
89
|
+
color.bg.strong is not a section ground. It is the inverted fill for an action that has to outrank what surrounds it, and the components that paint it — Button and ButtonIcon in their inverse form — already set both halves in one rule, which is the pattern a hand-painted section has to copy.
|
|
90
|
+
Guidance only — cannot be checked automatically.
|
|
91
|
+
- **Every gap inside a section names the relationship it expresses, and the same relationship keeps its measure when it turns on its side** — A section's spacing is named by the relationship it expresses, not chosen by size. Every gap in a section has a role token, and reaching for a step off the generic scale because it happens to be the right number is how two sections written by two people stop lining up: the numbers agree today and drift the first time one of them is tuned.
|
|
92
|
+
|
|
93
|
+
The heading group is three steps, not one gap. An eyebrow sits nearer its title than the title sits to its description, and the actions sit further from the description than either — space.heading.eyebrow-title, space.heading.title-description, space.heading.description-actions, in that order. A single `gap` on the group cannot say this; it sets all three the same and the block reads as evenly spaced lines rather than as a mark, a name and a paragraph. The eyebrow has to identify itself for this to work, because a group that opens with a title must not give its description the eyebrow's tighter step.
|
|
94
|
+
|
|
95
|
+
The step between a title and its description follows the size of the title, which is why there are two of it. What a reader sees is not the gap but the gap plus the leading above it, and leading scales with the type: under a display title the leading is most of the space, under a card's title it is half as deep. One value for both makes a card look loose at the size that made a section look right. So space.heading.title-description is the display step and space.heading.title-description-compact is the step at a card's size, and the choice is made by how big the title is rather than by what kind of block it sits in.
|
|
96
|
+
|
|
97
|
+
Every one of those steps is smaller than the gap below the group, and that ordering is what holds the group together as one thing. space.heading.content is the step between a heading group and the content it introduces, and it is the widest measure inside a section: the one gap the eye reads as a change of subject rather than as a continuation.
|
|
98
|
+
|
|
99
|
+
That step is the same whether the content is under the heading or beside it. A split is the same relationship turned on its side — a heading group and the content it introduces — so the space between the two halves is space.heading.content, not a gutter. When the split collapses to one column on a phone the gap becomes vertical again, which is where it started, and nothing has to change for that to be right.
|
|
100
|
+
|
|
101
|
+
space.grid.gutter is between two things of the same kind. Two cards in a row are the same kind; the two halves of a split are not, which is why the gutter is the wrong measure there even when the number would have looked acceptable. The gutter runs on both axes, so a grid reads as an even field rather than as rows with a seam down them.
|
|
102
|
+
|
|
103
|
+
space.inset.card is the card's, not the page's. A row of cards padded differently is a row of different cards, and the fill is the only edge they have. A page composing a row does not get to choose it.
|
|
104
|
+
|
|
105
|
+
Column count is not a breakpoint decision. A row holds as many columns as fit before a column would be narrower than size.grid.column-min, and drops one when they would not. Written as a fixed count that collapses at a breakpoint, a four-up row keeps four columns at every width above the phone and sets its copy two or three words to a line through the whole of the tablet range — and on a narrow desktop, which no breakpoint sits on at all. The threshold is a property of the row rather than of a card: a card fills whatever cell it is given.
|
|
106
|
+
|
|
107
|
+
What this does not cover is the space above and below a section, which is space.section.default and space.section.compact, and the page's own side margin, which is space.inset.page. Those are the section's outside; everything here is its inside.
|
|
108
|
+
Guidance only — cannot be checked automatically.
|
|
109
|
+
- **A section's title is centred over stacked content, starts beside content in columns, and starts on a phone** — Two arrangements, and the title's alignment is decided by which one it is introducing rather than chosen per section.
|
|
110
|
+
|
|
111
|
+
Content stacked under the title — a row of cards, an accordion, a set of steps — takes a centred title. The heading group and the block below it share one axis, so a centred title is symmetric with the thing it names, and the eye drops from the middle of the words to the middle of the set. A title starting at the left over a centred or full-width block reads as belonging to the first column rather than to all of them.
|
|
112
|
+
|
|
113
|
+
Content beside the title — a split, a picture in the other half, anything laid out in columns — takes a title that starts where its content starts. The two share a left edge, and that edge is what says they are one thing read across rather than two stacked. Centring the title there breaks the only alignment the reader has to hold the halves together, and it drifts further from its content the wider the page gets.
|
|
114
|
+
|
|
115
|
+
The heading group is what carries this, not the heading alone. An eyebrow, a title and a description are read as one block and align together; aligning the title without them leaves a centred heading over start-aligned copy, which reads as a mistake rather than as a choice.
|
|
116
|
+
|
|
117
|
+
Centred means all of it, not just the words. A badge, a row of actions, a picture — these are flex children, and a flex child is placed by align-items rather than by text-align, so a block that only sets the text leaves everything that is not text at the start. A hero is the case that shows it: its title and copy centred while its badge and its buttons did not.
|
|
118
|
+
|
|
119
|
+
A capped block centres itself as well as its words. A heading group takes size.heading-group.max, and a cap that is not centred leaves the measure at the start of the column with the words centred inside it — composed, and a long way left of the middle it appears to be in.
|
|
120
|
+
|
|
121
|
+
Both arrangements go to the start on a phone. A centred block reverts below the breakpoint, and the reason is the measure: on a phone the measure is the screen, so a centred title wraps to three or four ragged lines and the eye loses the left edge it was tracking — the same symmetry that reads as composure on a desktop is what makes it hard to scan on a phone. Centring there has to be asked for twice, and a section title is not one of the things that asks: it is centred because there is room for it, and on a phone there is not. Going back to the start means all of it too, and a capped block is the one that hides a leftover: its words go to the start while its measure stays in the middle of the column, which reads as a title still centred over a badge and buttons that are not — the box in the middle and the line inside it at the edge.
|
|
122
|
+
|
|
123
|
+
A hero is a section like any other: its badge, title, copy and actions are one stacked block, so it is centred on a desktop and starts on a phone with everything else.
|
|
124
|
+
|
|
125
|
+
What this is not about is a page whose body is a form or a document. A title over a sign-up form or a guide is not introducing a set of content — it is the first line of the thing itself, and it keeps the alignment the body has, which for running text is the start. The distinction is whether the block below is content the title names or content the title is part of.
|
|
126
|
+
Guidance only — cannot be checked automatically.
|
|
127
|
+
- **Anything a pointer has to hit is at least 24px in both directions** — A control sized by its contents is as big as its contents, and a glyph is chosen for how it reads rather than for how easily it is hit. An icon-only button with no padding is a 16px target — smaller than the pad of a finger, and smaller than the tremor of a hand using a mouse.
|
|
128
|
+
|
|
129
|
+
WCAG 2.2 asks for 24 by 24 CSS pixels at AA. The exceptions are narrower than they look: inline targets inside a sentence are exempt, and so is a small target with 24px of clear space around it — but a clear button sits against the field it empties, and a field is itself a target, so the spacing exemption does not apply to the case that keeps arising.
|
|
130
|
+
|
|
131
|
+
The target and the mark are separate decisions, and conflating them is what produces both faults. Growing the glyph to 24px makes it shout; leaving the button at 16px makes it hard to hit. So the glyph keeps the size that reads correctly beside its text, and the box around it declares a minimum of its own — which is what size.target.min is for.
|
|
132
|
+
|
|
133
|
+
Declared rather than emergent. Padding plus contents does clear 24px in several components today, and it is the weaker statement: it is a size nobody wrote down, so it moves when the type scale or the glyph does, and nothing says it was meant to be a target at all.
|
|
134
|
+
Guidance only — cannot be checked automatically.
|
|
135
|
+
- **A component is written along the reading axis, not along the page's left and right** — Every measure, inset and placement in this package names an axis rather than a side: inline-size and block-size, padding-inline and padding-block, inset-inline-start and inset-block-end, margin-inline: auto, text-align: start. Written that way a component follows whichever direction the page is read in, and a band whose claim ranges to the leading edge with its subject on the trailing one is the same composition in Arabic as in English, mirrored, with nothing restated. Written as left and right it is the same pixels in both, which is a layout nobody designed for the second language.
|
|
136
|
+
|
|
137
|
+
The enum values follow the same rule and for the same reason. A prop that names where a picture sits takes start and end, never left and right — FeatureSplit, FeatureBullets and FeatureScroll all declare mediaPosition that way, and the flex directions they generate flip on their own because row already means the reading order. A value called left would have to be re-read as right by every author working in a mirrored page, which is a translation this system should be doing rather than asking for.
|
|
138
|
+
|
|
139
|
+
The guidance a contract carries is part of the component, so it follows too. Describing a claim as ranging left is describing one of the two languages, and it was written that way here for a while: three of the opening bands said so in their own intent. A reader in a mirrored page meets that sentence and has to decide whether the component is wrong or the sentence is, and neither answer is one documentation should force.
|
|
140
|
+
|
|
141
|
+
Two things genuinely have no logical form and are not covered by this. A CSS gradient takes a physical direction — there is no to inline-end — so a pattern that must mirror has to be stated twice under a direction query, and one that is periodic and centred, like PageHeader's rule grid, does not need to. A glyph that points the way onward is the other: an arrow is a picture of a direction, and mirroring it belongs to the icon set rather than to the component holding it.
|
|
142
|
+
Guidance only — cannot be checked automatically.
|
|
143
|
+
|
|
144
|
+
## Anti-examples
|
|
145
|
+
|
|
146
|
+
❌ IllustrationCard for: A section has content to present — features, benefits, steps, a list
|
|
147
|
+
A section's content is read, compared and acted on, and belongs in the blocks built for it. This pane is a picture of the product; content set in it reads as an illustration nobody is meant to read closely
|
|
148
|
+
→ use `FeatureCards` instead.
|
|
149
|
+
|
|
150
|
+
❌ IllustrationCard for: The content is something a reader acts on — a link, a form, a set of options
|
|
151
|
+
This is a picture: it explains and does not invite a press. A card that leads somewhere is a Card or a CardButton, whose surface reads as a control
|
|
152
|
+
→ use `Card` instead.
|
|
153
|
+
|
|
154
|
+
❌ IllustrationCard for: There is only a photograph
|
|
155
|
+
The glass pane is the point of this component; a picture on its own is an AspectRatio
|
|
156
|
+
→ use `AspectRatio` instead.
|
|
157
|
+
|
|
158
|
+
## Example
|
|
159
|
+
|
|
160
|
+
```tsx
|
|
161
|
+
import { IllustrationCard, Badge, Typography, Row, StatusDot } from '@deriv-com/dds-marketing'
|
|
162
|
+
|
|
163
|
+
<IllustrationCard ratio="landscape" label="Synthetic indices: Volatility 75 Index at 1,204.55, open now and all weekend">
|
|
164
|
+
<Badge label="Synthetic indices" variant="neutral" />
|
|
165
|
+
<Typography variant="h5">Volatility 75 Index</Typography>
|
|
166
|
+
<Typography variant="figure">1,204.55</Typography>
|
|
167
|
+
<Row gap="xs" align="center">
|
|
168
|
+
<StatusDot variant="success" label="Open" />
|
|
169
|
+
<Typography variant="body-sm">Open now — and all weekend</Typography>
|
|
170
|
+
</Row>
|
|
171
|
+
</IllustrationCard>
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
## In use
|
|
175
|
+
|
|
176
|
+
### Its three shapes
|
|
177
|
+
|
|
178
|
+
Four by three, square and three by four, and nothing else, so every panel on a site agrees. The UI inside is laid out for the shape.
|
|
179
|
+
|
|
180
|
+
```tsx
|
|
181
|
+
import { Badge, IllustrationCard, Row, StatusDot, Typography } from '@deriv-com/dds-marketing'
|
|
182
|
+
|
|
183
|
+
// landscape — 4:3, the default
|
|
184
|
+
<IllustrationCard ratio="landscape" label="Synthetic indices: Volatility 75 Index at 1,204.55, open now and all weekend">
|
|
185
|
+
<Badge label="Synthetic indices" variant="neutral" />
|
|
186
|
+
<Typography variant="h5">Volatility 75 Index</Typography>
|
|
187
|
+
<Typography variant="figure">1,204.55</Typography>
|
|
188
|
+
<Row gap="xs" align="center">
|
|
189
|
+
<StatusDot variant="success" label="Open" />
|
|
190
|
+
<Typography variant="body-sm">Open now — and all weekend</Typography>
|
|
191
|
+
</Row>
|
|
192
|
+
</IllustrationCard>
|
|
193
|
+
|
|
194
|
+
// square — 1:1
|
|
195
|
+
<IllustrationCard ratio="square" label="Synthetic indices: Volatility 75 Index at 1,204.55, open now and all weekend">
|
|
196
|
+
<Badge label="Synthetic indices" variant="neutral" />
|
|
197
|
+
<Typography variant="h5">Volatility 75 Index</Typography>
|
|
198
|
+
<Typography variant="figure">1,204.55</Typography>
|
|
199
|
+
<Row gap="xs" align="center">
|
|
200
|
+
<StatusDot variant="success" label="Open" />
|
|
201
|
+
<Typography variant="body-sm">Open now — and all weekend</Typography>
|
|
202
|
+
</Row>
|
|
203
|
+
</IllustrationCard>
|
|
204
|
+
|
|
205
|
+
// upright — 3:4
|
|
206
|
+
<IllustrationCard ratio="upright" label="Synthetic indices: Volatility 75 Index at 1,204.55, open now and all weekend">
|
|
207
|
+
<Badge label="Synthetic indices" variant="neutral" />
|
|
208
|
+
<Typography variant="h5">Volatility 75 Index</Typography>
|
|
209
|
+
<Typography variant="figure">1,204.55</Typography>
|
|
210
|
+
<Row gap="xs" align="center">
|
|
211
|
+
<StatusDot variant="success" label="Open" />
|
|
212
|
+
<Typography variant="body-sm">Open now — and all weekend</Typography>
|
|
213
|
+
</Row>
|
|
214
|
+
</IllustrationCard>
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
### As a picture on a dark band
|
|
218
|
+
|
|
219
|
+
Standing on its own as the image a band shows — the glass blurs what is behind it, so it reads as part of the scene rather than as the band's content.
|
|
220
|
+
|
|
221
|
+
```tsx
|
|
222
|
+
import { Background, Badge, IllustrationCard, Row, StatusDot, Typography } from '@deriv-com/dds-marketing'
|
|
223
|
+
|
|
224
|
+
// the pane as the picture
|
|
225
|
+
<Background tone="dark">
|
|
226
|
+
<IllustrationCard ratio="landscape" label="Synthetic indices: Volatility 75 Index at 1,204.55, open now and all weekend">
|
|
227
|
+
<Badge label="Synthetic indices" variant="neutral" />
|
|
228
|
+
<Typography variant="h5">Volatility 75 Index</Typography>
|
|
229
|
+
<Typography variant="figure">1,204.55</Typography>
|
|
230
|
+
<Row gap="xs" align="center">
|
|
231
|
+
<StatusDot variant="success" label="Open" />
|
|
232
|
+
<Typography variant="body-sm">Open now — and all weekend</Typography>
|
|
233
|
+
</Row>
|
|
234
|
+
</IllustrationCard>
|
|
235
|
+
</Background>
|
|
236
|
+
```
|