@deriv-com/dds-marketing 1.1.3 → 1.2.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/.llm/components/accordion.md +6 -0
- package/.llm/components/accordionitem.md +6 -0
- package/.llm/components/aspectratio.md +6 -0
- package/.llm/components/awards.md +6 -0
- package/.llm/components/background.md +49 -10
- package/.llm/components/badge.md +6 -0
- package/.llm/components/bottomsheet.md +6 -0
- package/.llm/components/breadcrumb.md +6 -0
- package/.llm/components/breadcrumbitem.md +6 -0
- package/.llm/components/button.md +9 -3
- package/.llm/components/buttonicon.md +7 -1
- package/.llm/components/card.md +6 -0
- package/.llm/components/cardbody.md +7 -1
- package/.llm/components/cardbutton.md +6 -0
- package/.llm/components/checkbox.md +6 -0
- package/.llm/components/comparisoncards.md +9 -3
- package/.llm/components/comparisontable.md +6 -0
- package/.llm/components/ctabanner.md +6 -0
- package/.llm/components/ctabannerslider.md +6 -0
- package/.llm/components/datatable.md +6 -0
- package/.llm/components/divider.md +6 -0
- package/.llm/components/documentlink.md +237 -0
- package/.llm/components/documents.md +268 -0
- package/.llm/components/downloadbanner.md +7 -1
- package/.llm/components/dropdownmenu.md +6 -0
- package/.llm/components/estimator.md +6 -0
- package/.llm/components/faqaccordion.md +6 -0
- package/.llm/components/featurebullets.md +6 -0
- package/.llm/components/featurecards.md +42 -2
- package/.llm/components/featurecardscarousel.md +7 -1
- package/.llm/components/featurescroll.md +6 -0
- package/.llm/components/featuresplit.md +6 -0
- package/.llm/components/featurestack.md +6 -0
- package/.llm/components/featuretabs.md +369 -0
- package/.llm/components/filterchip.md +6 -0
- package/.llm/components/footer.md +6 -0
- package/.llm/components/footergroup.md +6 -0
- package/.llm/components/grid.md +30 -1
- package/.llm/components/icon.md +6 -0
- package/.llm/components/illustrationcard.md +52 -2
- package/.llm/components/illustrationcheck.md +193 -0
- package/.llm/components/illustrationchoice.md +187 -0
- package/.llm/components/illustrationcode.md +192 -0
- package/.llm/components/illustrationlist.md +175 -0
- package/.llm/components/illustrationscene.md +29 -3
- package/.llm/components/imagebanner.md +30 -5
- package/.llm/components/landinghero.md +6 -0
- package/.llm/components/link.md +7 -1
- package/.llm/components/logocolumns.md +7 -1
- package/.llm/components/logorows.md +42 -2
- package/.llm/components/menuitem.md +6 -0
- package/.llm/components/navbar.md +6 -0
- package/.llm/components/navbaritem.md +6 -0
- package/.llm/components/navbarmenu.md +6 -0
- package/.llm/components/navbarmenugroup.md +6 -0
- package/.llm/components/navbarpanel.md +6 -0
- package/.llm/components/navbarswitcher.md +6 -0
- package/.llm/components/navbarswitcheroption.md +6 -0
- package/.llm/components/option.md +6 -0
- package/.llm/components/pageheader.md +6 -0
- package/.llm/components/pagination.md +6 -0
- package/.llm/components/paginationdots.md +6 -0
- package/.llm/components/producthero.md +29 -4
- package/.llm/components/progressbar.md +305 -0
- package/.llm/components/removablechip.md +6 -0
- package/.llm/components/resourcebanner.md +6 -0
- package/.llm/components/row.md +6 -0
- package/.llm/components/scenescroll.md +38 -24
- package/.llm/components/scenescrollword.md +267 -0
- package/.llm/components/scroller.md +6 -0
- package/.llm/components/searchinput.md +6 -0
- package/.llm/components/segmentedcontrol.md +28 -1
- package/.llm/components/segmentedcontrolitem.md +6 -0
- package/.llm/components/select.md +6 -0
- package/.llm/components/selectchip.md +6 -0
- package/.llm/components/spinner.md +6 -0
- package/.llm/components/stack.md +6 -0
- package/.llm/components/stats.md +46 -1
- package/.llm/components/statscarousel.md +227 -0
- package/.llm/components/statusdot.md +41 -1
- package/.llm/components/steps.md +6 -0
- package/.llm/components/stickycards.md +6 -0
- package/.llm/components/subdomainnavbar.md +6 -0
- package/.llm/components/tab.md +6 -0
- package/.llm/components/table.md +6 -0
- package/.llm/components/tablebody.md +6 -0
- package/.llm/components/tablecell.md +6 -0
- package/.llm/components/tablehead.md +6 -0
- package/.llm/components/tableheadercell.md +6 -0
- package/.llm/components/tablerow.md +6 -0
- package/.llm/components/tablist.md +6 -0
- package/.llm/components/teamgrid.md +6 -0
- package/.llm/components/testimonialrow.md +43 -3
- package/.llm/components/testimonialslider.md +8 -2
- package/.llm/components/textarea.md +6 -0
- package/.llm/components/textinput.md +6 -0
- package/.llm/components/textscroll.md +6 -0
- package/.llm/components/tiers.md +13 -7
- package/.llm/components/tooltip.md +6 -0
- package/.llm/components/typography.md +63 -1
- package/.llm/digest/background.md +14 -6
- package/.llm/digest/button.md +1 -1
- package/.llm/digest/buttonicon.md +1 -1
- package/.llm/digest/documentlink.md +52 -0
- package/.llm/digest/documents.md +51 -0
- package/.llm/digest/downloadbanner.md +1 -1
- package/.llm/digest/featurecards.md +7 -0
- package/.llm/digest/featuretabs.md +50 -0
- package/.llm/digest/grid.md +1 -0
- package/.llm/digest/illustrationcard.md +6 -1
- package/.llm/digest/illustrationcheck.md +42 -0
- package/.llm/digest/illustrationchoice.md +43 -0
- package/.llm/digest/illustrationcode.md +41 -0
- package/.llm/digest/illustrationlist.md +38 -0
- package/.llm/digest/illustrationscene.md +4 -2
- package/.llm/digest/imagebanner.md +9 -3
- package/.llm/digest/logocolumns.md +1 -1
- package/.llm/digest/logorows.md +8 -1
- package/.llm/digest/producthero.md +8 -2
- package/.llm/digest/progressbar.md +56 -0
- package/.llm/digest/scenescroll.md +6 -5
- package/.llm/digest/scenescrollword.md +56 -0
- package/.llm/digest/segmentedcontrol.md +3 -0
- package/.llm/digest/stats.md +8 -0
- package/.llm/digest/statscarousel.md +48 -0
- package/.llm/digest/statusdot.md +7 -0
- package/.llm/digest/testimonialrow.md +8 -1
- package/.llm/digest/testimonialslider.md +1 -1
- package/.llm/digest/typography.md +18 -0
- package/.llm/index.md +14 -4
- package/.llm/rules.md +10 -0
- package/.llm/tokens.md +12 -3
- package/AGENTS.md +13 -2
- package/dist/components/arrival.d.ts +32 -0
- package/dist/components/arrival.js +140 -0
- package/dist/components/arrives.d.ts +17 -0
- package/dist/components/arrives.js +14 -0
- package/dist/components/blocks/awards/Awards.js +2 -27
- package/dist/components/blocks/block-pattern.css +23 -0
- package/dist/components/blocks/comparison-cards/comparison-cards-impl.css +29 -0
- package/dist/components/blocks/documents/Documents.css +90 -0
- package/dist/components/blocks/documents/Documents.d.ts +22 -0
- package/dist/components/blocks/documents/Documents.js +30 -0
- package/dist/components/blocks/documents/Documents.types.d.ts +37 -0
- package/dist/components/blocks/documents/Documents.types.js +14 -0
- package/dist/components/blocks/documents/documents-impl.css +103 -0
- package/dist/components/blocks/download-banner/DownloadBanner.css +1 -1
- package/dist/components/blocks/download-banner/DownloadBanner.types.d.ts +1 -1
- package/dist/components/blocks/feature-cards/FeatureCards.d.ts +2 -1
- package/dist/components/blocks/feature-cards/FeatureCards.js +10 -7
- package/dist/components/blocks/feature-cards/FeatureCards.types.d.ts +9 -1
- package/dist/components/blocks/feature-cards/feature-cards-impl.css +15 -3
- package/dist/components/blocks/feature-cards-carousel/FeatureCardsCarousel.types.d.ts +1 -1
- package/dist/components/blocks/feature-cards-carousel/feature-cards-carousel-impl.css +12 -0
- package/dist/components/blocks/feature-tabs/FeatureTabs.css +100 -0
- package/dist/components/blocks/feature-tabs/FeatureTabs.d.ts +23 -0
- package/dist/components/blocks/feature-tabs/FeatureTabs.js +38 -0
- package/dist/components/blocks/feature-tabs/FeatureTabs.types.d.ts +35 -0
- package/dist/components/blocks/feature-tabs/FeatureTabs.types.js +14 -0
- package/dist/components/blocks/feature-tabs/feature-tabs-impl.css +53 -0
- package/dist/components/blocks/image-banner/ImageBanner.css +1 -1
- package/dist/components/blocks/image-banner/ImageBanner.d.ts +1 -1
- package/dist/components/blocks/image-banner/ImageBanner.js +2 -2
- package/dist/components/blocks/image-banner/ImageBanner.types.d.ts +9 -7
- package/dist/components/blocks/image-banner/ImageBanner.types.js +1 -1
- package/dist/components/blocks/image-banner/image-banner-impl.css +77 -26
- package/dist/components/blocks/laurel.d.ts +16 -0
- package/dist/components/blocks/laurel.js +28 -0
- package/dist/components/blocks/logo-columns/LogoColumns.css +1 -1
- package/dist/components/blocks/logo-columns/LogoColumns.types.d.ts +1 -1
- package/dist/components/blocks/logo-rows/LogoRows.css +1 -1
- package/dist/components/blocks/logo-rows/LogoRows.d.ts +2 -1
- package/dist/components/blocks/logo-rows/LogoRows.js +7 -4
- package/dist/components/blocks/logo-rows/LogoRows.types.d.ts +9 -1
- package/dist/components/blocks/pattern-tone.d.ts +11 -0
- package/dist/components/blocks/pattern-tone.js +7 -0
- package/dist/components/blocks/product-hero/ProductHero.d.ts +1 -1
- package/dist/components/blocks/product-hero/ProductHero.js +2 -2
- package/dist/components/blocks/product-hero/ProductHero.types.d.ts +8 -3
- package/dist/components/blocks/product-hero/ProductHero.types.js +1 -1
- package/dist/components/blocks/product-hero/product-hero-impl.css +54 -0
- package/dist/components/blocks/resource-banner/ResourceBanner.css +1 -1
- package/dist/components/blocks/scene-scroll/SceneScroll.css +1 -1
- package/dist/components/blocks/scene-scroll/SceneScroll.d.ts +6 -5
- package/dist/components/blocks/scene-scroll/SceneScroll.js +8 -7
- package/dist/components/blocks/scene-scroll/SceneScroll.types.d.ts +5 -5
- package/dist/components/blocks/scene-scroll/SceneScroll.types.js +1 -1
- package/dist/components/blocks/scene-scroll/scene-scroll-impl.css +61 -44
- package/dist/components/blocks/scene-scroll-word/SceneScrollWord.css +105 -0
- package/dist/components/blocks/scene-scroll-word/SceneScrollWord.d.ts +31 -0
- package/dist/components/blocks/scene-scroll-word/SceneScrollWord.js +67 -0
- package/dist/components/blocks/scene-scroll-word/SceneScrollWord.types.d.ts +39 -0
- package/dist/components/blocks/scene-scroll-word/SceneScrollWord.types.js +18 -0
- package/dist/components/blocks/scene-scroll-word/scene-scroll-word-impl.css +370 -0
- package/dist/components/blocks/stats/Stats.d.ts +2 -1
- package/dist/components/blocks/stats/Stats.js +17 -14
- package/dist/components/blocks/stats/Stats.types.d.ts +8 -0
- package/dist/components/blocks/stats/stats-impl.css +4 -1
- package/dist/components/blocks/stats/use-wheel.d.ts +1 -1
- package/dist/components/blocks/stats/use-wheel.js +8 -4
- package/dist/components/blocks/stats-carousel/StatsCarousel.css +209 -0
- package/dist/components/blocks/stats-carousel/StatsCarousel.d.ts +20 -0
- package/dist/components/blocks/stats-carousel/StatsCarousel.js +48 -0
- package/dist/components/blocks/stats-carousel/StatsCarousel.types.d.ts +43 -0
- package/dist/components/blocks/stats-carousel/StatsCarousel.types.js +23 -0
- package/dist/components/blocks/stats-carousel/stats-carousel-impl.css +233 -0
- package/dist/components/blocks/sticky-cards/sticky-cards-impl.css +8 -0
- package/dist/components/blocks/testimonial-row/TestimonialRow.css +1 -1
- package/dist/components/blocks/testimonial-row/TestimonialRow.d.ts +2 -1
- package/dist/components/blocks/testimonial-row/TestimonialRow.js +16 -13
- package/dist/components/blocks/testimonial-row/TestimonialRow.types.d.ts +9 -1
- package/dist/components/blocks/testimonial-slider/TestimonialSlider.css +1 -1
- package/dist/components/blocks/testimonial-slider/TestimonialSlider.types.d.ts +1 -1
- package/dist/components/blocks/tiers/Tiers.types.d.ts +1 -1
- package/dist/components/core/background/Background.css +19 -0
- package/dist/components/core/background/Background.types.d.ts +2 -1
- package/dist/components/core/background/background-impl.css +47 -15
- package/dist/components/core/background/halftone.js +1 -1
- package/dist/components/core/button/Button.css +5 -5
- package/dist/components/core/button-icon/ButtonIcon.types.d.ts +1 -1
- package/dist/components/core/card-body/CardBody.css +5 -0
- package/dist/components/core/card-body/CardBody.types.d.ts +1 -1
- package/dist/components/core/document-link/DocumentLink.css +59 -0
- package/dist/components/core/document-link/DocumentLink.d.ts +19 -0
- package/dist/components/core/document-link/DocumentLink.js +21 -0
- package/dist/components/core/document-link/DocumentLink.types.d.ts +41 -0
- package/dist/components/core/document-link/DocumentLink.types.js +11 -0
- package/dist/components/core/document-link/document-link-impl.css +23 -0
- package/dist/components/core/illustration-card/IllustrationCard.css +7 -0
- package/dist/components/core/illustration-card/IllustrationCard.d.ts +5 -1
- package/dist/components/core/illustration-card/IllustrationCard.js +34 -8
- package/dist/components/core/illustration-card/IllustrationCard.types.d.ts +8 -1
- package/dist/components/core/illustration-card/IllustrationCard.types.js +1 -0
- package/dist/components/core/illustration-card/illustration-card-impl.css +113 -0
- package/dist/components/core/illustration-check/IllustrationCheck.css +25 -0
- package/dist/components/core/illustration-check/IllustrationCheck.d.ts +16 -0
- package/dist/components/core/illustration-check/IllustrationCheck.js +22 -0
- package/dist/components/core/illustration-check/IllustrationCheck.types.d.ts +25 -0
- package/dist/components/core/illustration-check/IllustrationCheck.types.js +9 -0
- package/dist/components/core/illustration-check/illustration-check-impl.css +76 -0
- package/dist/components/core/illustration-choice/IllustrationChoice.css +62 -0
- package/dist/components/core/illustration-choice/IllustrationChoice.d.ts +16 -0
- package/dist/components/core/illustration-choice/IllustrationChoice.js +31 -0
- package/dist/components/core/illustration-choice/IllustrationChoice.types.d.ts +25 -0
- package/dist/components/core/illustration-choice/IllustrationChoice.types.js +11 -0
- package/dist/components/core/illustration-choice/illustration-choice-impl.css +103 -0
- package/dist/components/core/illustration-code/IllustrationCode.css +25 -0
- package/dist/components/core/illustration-code/IllustrationCode.d.ts +12 -0
- package/dist/components/core/illustration-code/IllustrationCode.js +20 -0
- package/dist/components/core/illustration-code/IllustrationCode.types.d.ts +23 -0
- package/dist/components/core/illustration-code/IllustrationCode.types.js +8 -0
- package/dist/components/core/illustration-code/illustration-code-impl.css +42 -0
- package/dist/components/core/illustration-list/IllustrationList.css +19 -0
- package/dist/components/core/illustration-list/IllustrationList.d.ts +16 -0
- package/dist/components/core/illustration-list/IllustrationList.js +18 -0
- package/dist/components/core/illustration-list/IllustrationList.types.d.ts +15 -0
- package/dist/components/core/illustration-list/IllustrationList.types.js +6 -0
- package/dist/components/core/illustration-list/illustration-list-impl.css +52 -0
- package/dist/components/core/illustration-scene/IllustrationScene.css +6 -0
- package/dist/components/core/illustration-scene/IllustrationScene.d.ts +3 -2
- package/dist/components/core/illustration-scene/IllustrationScene.js +4 -3
- package/dist/components/core/illustration-scene/IllustrationScene.types.d.ts +5 -1
- package/dist/components/core/illustration-scene/IllustrationScene.types.js +2 -1
- package/dist/components/core/illustration-scene/illustration-scene-impl.css +65 -0
- package/dist/components/core/link/link-impl.css +5 -19
- package/dist/components/core/progress-bar/ProgressBar.css +101 -0
- package/dist/components/core/progress-bar/ProgressBar.d.ts +5 -0
- package/dist/components/core/progress-bar/ProgressBar.js +34 -0
- package/dist/components/core/progress-bar/ProgressBar.types.d.ts +52 -0
- package/dist/components/core/progress-bar/ProgressBar.types.js +12 -0
- package/dist/components/core/progress-bar/progress-bar-impl.css +45 -0
- package/dist/components/core/segmented-control/SegmentedControl.d.ts +1 -1
- package/dist/components/core/segmented-control/SegmentedControl.js +13 -5
- package/dist/components/core/segmented-control/SegmentedControl.types.d.ts +5 -1
- package/dist/components/core/segmented-control/segmented-control-impl.css +35 -0
- package/dist/components/core/status-dot/StatusDot.d.ts +1 -1
- package/dist/components/core/status-dot/StatusDot.js +7 -4
- package/dist/components/core/status-dot/StatusDot.types.d.ts +9 -1
- package/dist/components/core/status-dot/status-dot-impl.css +101 -0
- package/dist/components/core/typography/Typography.d.ts +3 -283
- package/dist/components/core/typography/Typography.js +9 -1
- package/dist/components/core/typography/Typography.types.d.ts +9 -15
- package/dist/components/core/typography/TypographyMotion.d.ts +28 -0
- package/dist/components/core/typography/TypographyMotion.js +43 -0
- package/dist/components/core/typography/typography-impl.css +106 -0
- package/dist/components/illustration-data.d.ts +15 -0
- package/dist/components/illustration-data.js +7 -0
- package/dist/components/index.d.ts +22 -1
- package/dist/components/index.js +20 -0
- package/dist/components/layout/grid/Grid.css +5 -0
- package/dist/components/layout/grid/Grid.types.d.ts +2 -1
- package/dist/components/scene-scroll-data.d.ts +35 -0
- package/dist/components/tiers-data.d.ts +3 -2
- package/dist/marketing.css +24 -6
- package/package.json +1 -1
|
@@ -129,6 +129,12 @@ What this is not about is every row of controls. A set of filter chips, a pagina
|
|
|
129
129
|
Guidance only — cannot be checked automatically.
|
|
130
130
|
- **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.
|
|
131
131
|
Guidance only — cannot be checked automatically.
|
|
132
|
+
- **A page has at most one patterned band, between its hero and its closing call to action** — A patterned ground — the halftone, the aurora, the mesh, the grid or the rings — is what makes a band the one a reader stops at, and it only works by being the exception. So a page has at most one, placed between its hero and its closing call to action; the hero's and the call to action's own patterns are theirs and do not count, and the band never goes on either of them.
|
|
133
|
+
|
|
134
|
+
The pattern is the band's first layer, under its content and over nothing. A block that can carry one says so with its own `background` prop — FeatureCards, Stats, TestimonialRow and LogoRows — and draws it there; a section built by hand places a Background with nothing in it as its first child. Never wrap a block in a Background: the block paints its own ground over the pattern and hides it.
|
|
135
|
+
|
|
136
|
+
Only a band whose content is stacked can carry one. Every pattern rises from the band's foot, so the band needs a heading over what it introduces, centred, with the foot left open. A band whose content runs side by side — words beside a picture, a split, columns reaching the foot — puts the glow behind the picture or under the words; it stays on its flat ground.
|
|
137
|
+
Guidance only — cannot be checked automatically.
|
|
132
138
|
- **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.
|
|
133
139
|
|
|
134
140
|
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.
|
|
@@ -30,7 +30,7 @@ One card is the reference design's single panel: it takes the whole row, and fro
|
|
|
30
30
|
|
|
31
31
|
FeatureCards renders 8 elements. A token binding names the part it applies to.
|
|
32
32
|
|
|
33
|
-
- `root` — `<section>`, class `dds-featurecards`. The section. It paints the ground and the ink to go with it — see `ground` — and asks its own width, so the grid folds on the section's measure rather than the window's.
|
|
33
|
+
- `root` — `<section>`, class `dds-featurecards`. The section. It paints the ground and the ink to go with it — see `ground` — and asks its own width, so the grid folds on the section's measure rather than the window's. Given `background`, it draws the page's one patterned band: a Background as its first layer, under everything it holds, in the tone of its ground.
|
|
34
34
|
- `inner` — `<div>`, class `dds-featurecards__inner`. The measure and the gutter, the same column every band holds its content in, and the step from the heading to the grid: space.heading.content.
|
|
35
35
|
- `header` — `<div>`, class `dds-featurecards__header`. The heading, the line under it and the way on. Ranged to the start on a phone and centred from the fold, PageHeader's rule and its reason. It sets no gap: each part's own margin is the step, so a header without a line closes up rather than leaving its gap behind.
|
|
36
36
|
- `title` — `<h2>`, class `dds-featurecards__title`. What the cards are. `h2` because a section sits under the page's own heading; the cards' titles come below it in the outline.
|
|
@@ -52,7 +52,7 @@ Apply these classes from the generated `featureCardsParts` constant rather than
|
|
|
52
52
|
### ground — `page` | `subtle` | `strong` (default `page`)
|
|
53
53
|
|
|
54
54
|
- `page` — The default, and the page's own white. A section that has nothing to separate itself from what is above it — most of them — and the ground a reader is already on
|
|
55
|
-
- `subtle` — A quiet step off the page, for a band that wants to read as its own section without changing the page's voice. The one to reach for first when two sections need telling apart. A light card — surface-light — turns white on it, color.bg.surface-card-light-raised, because its own gray.50 is the band's and would vanish into it. A dark card — accent-strong — is lifted to color.bg.surface-card-strong-raised, a step lighter in dark mode, where the band is within a shade of its
|
|
55
|
+
- `subtle` — A quiet step off the page, for a band that wants to read as its own section without changing the page's voice. The one to reach for first when two sections need telling apart. A light card — surface-light — turns white on it, color.bg.surface-card-light-raised, because its own gray.50 is the band's and would vanish into it. A dark card — accent-strong — is lifted to color.bg.surface-card-strong-raised, a step lighter in dark mode, where the band is within a shade of its slate.900. A plain surface card is raised off it the same way, to color.bg.surface-card-raised, because the recessed fill is the band's gray too. Painted as the band's tint laid over the page's own ground, so it is the same grey whatever is behind the section — in dark mode the tint alone took on whatever it was set against, and on a light surface it was light ink on white.
|
|
56
56
|
- `strong` — `color.bg.brand-strong`, the dark band. It stops the page rather than dividing it, so it is for a section a reader should arrive at — and one per page is usually one more than enough. The coloured cards keep their own grounds on it; a neutral card — surface or surface-raised — turns to Card's inverse fill and white ink, and a plain card takes the white ink alone, because their own would be dark ink on near-black; an eyebrow inside any of them takes the band's quieter ink
|
|
57
57
|
|
|
58
58
|
Use when: Which of the page's three grounds this section paints. A marketing page is white, and a band that wants to be seen as a band takes one of the other two — so this is how a page builds its rhythm: white, white, grey, white, dark. Two in a row is a deliberate pair rather than an accident, and the section above knows nothing about the one below it, so the page is the only thing that can decide.
|
|
@@ -62,6 +62,17 @@ Never for: Marking importance. Every section on a page painted dark is a page wi
|
|
|
62
62
|
|
|
63
63
|
And never the brand's own coral, `color.bg.brand`, which is not offered here. That ground belongs to the band that asks a reader to do something — the one place on a page where the brand colour is the point rather than decoration — and a feature section wearing it is a page with two calls to action, one of which does nothing. It is `color.bg.brand-strong` that this offers: the dark brand ground, which is a band breaking a page rather than a band asking for something.
|
|
64
64
|
|
|
65
|
+
### background — `halftone` | `aurora` | `mesh` | `grid` | `rings`
|
|
66
|
+
|
|
67
|
+
- `halftone` — A field of coral dots that grow towards a soft glow at the band's foot and settle to a fine screen away from it.
|
|
68
|
+
- `aurora` — Curtains of the brand's light rising from the band's foot and swaying slowly.
|
|
69
|
+
- `mesh` — The band in the brand's reds folded into one another like a liquid — the loudest of the five, for a dark band.
|
|
70
|
+
- `grid` — Hairlines a pitch apart rising from a soft bloom at the band's foot — the quietest, and the one to reach for first.
|
|
71
|
+
- `rings` — Hairline circles spreading out from the middle of the band's foot.
|
|
72
|
+
|
|
73
|
+
Use when: The page's one patterned band, between its hero and its closing call to action — a band a reader should stop at. The pattern is drawn by Background as the section's first layer, under its content and over nothing, in the tone of the ground: the light pattern on `page`, the same on the grey of `subtle`, the dark one on `strong`. Every pattern rises from the band's foot, which this block leaves open under its content. Leave it out and the band is its flat ground, as most bands on a page are.
|
|
74
|
+
Never for: More than one band on a page, or a band that is already the hero or the call to action — those carry their own patterns. One pattern is what makes a band the one a reader remembers; two make neither, and a page of them is noise. Never wrap this block in a Background instead: it paints its own ground over whatever is behind it, so the pattern would be hidden, and the pattern belongs under the content, not around it.
|
|
75
|
+
|
|
65
76
|
### title — `string` **Required.**
|
|
66
77
|
|
|
67
78
|
Use when: Always. What the cards are, in the fewest words that name them — "Why trade with Deriv", "Markets you can trade".
|
|
@@ -103,6 +114,12 @@ What this is not about is every row of controls. A set of filter chips, a pagina
|
|
|
103
114
|
Guidance only — cannot be checked automatically.
|
|
104
115
|
- **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.
|
|
105
116
|
Guidance only — cannot be checked automatically.
|
|
117
|
+
- **A page has at most one patterned band, between its hero and its closing call to action** — A patterned ground — the halftone, the aurora, the mesh, the grid or the rings — is what makes a band the one a reader stops at, and it only works by being the exception. So a page has at most one, placed between its hero and its closing call to action; the hero's and the call to action's own patterns are theirs and do not count, and the band never goes on either of them.
|
|
118
|
+
|
|
119
|
+
The pattern is the band's first layer, under its content and over nothing. A block that can carry one says so with its own `background` prop — FeatureCards, Stats, TestimonialRow and LogoRows — and draws it there; a section built by hand places a Background with nothing in it as its first child. Never wrap a block in a Background: the block paints its own ground over the pattern and hides it.
|
|
120
|
+
|
|
121
|
+
Only a band whose content is stacked can carry one. Every pattern rises from the band's foot, so the band needs a heading over what it introduces, centred, with the foot left open. A band whose content runs side by side — words beside a picture, a split, columns reaching the foot — puts the glow behind the picture or under the words; it stays on its flat ground.
|
|
122
|
+
Guidance only — cannot be checked automatically.
|
|
106
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.
|
|
107
124
|
|
|
108
125
|
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.
|
|
@@ -353,3 +370,26 @@ import { ClockThreeRegularIcon, FileShieldRegularIcon, GlobeRegularIcon, LockReg
|
|
|
353
370
|
</Card>
|
|
354
371
|
</FeatureCards>
|
|
355
372
|
```
|
|
373
|
+
|
|
374
|
+
### The page's one patterned band
|
|
375
|
+
|
|
376
|
+
One band per page, between the hero and the closing call to action, its pattern drawn under the content in the tone of its ground.
|
|
377
|
+
|
|
378
|
+
```tsx
|
|
379
|
+
import { FeatureCards, Link } from '@deriv-com/dds-marketing'
|
|
380
|
+
|
|
381
|
+
// grid on page
|
|
382
|
+
<FeatureCards title="Why trade with Deriv" description="Everything you need to trade the markets, in one account." link={<Link href="/why-deriv">Learn more</Link>} background="grid" ground="page">{cards}</FeatureCards>
|
|
383
|
+
|
|
384
|
+
// rings on subtle
|
|
385
|
+
<FeatureCards title="Why trade with Deriv" description="Everything you need to trade the markets, in one account." link={<Link href="/why-deriv">Learn more</Link>} background="rings" ground="subtle">{cards}</FeatureCards>
|
|
386
|
+
|
|
387
|
+
// halftone on strong
|
|
388
|
+
<FeatureCards title="Why trade with Deriv" description="Everything you need to trade the markets, in one account." link={<Link href="/why-deriv">Learn more</Link>} background="halftone" ground="strong">{cards}</FeatureCards>
|
|
389
|
+
|
|
390
|
+
// aurora on strong
|
|
391
|
+
<FeatureCards title="Why trade with Deriv" description="Everything you need to trade the markets, in one account." link={<Link href="/why-deriv">Learn more</Link>} background="aurora" ground="strong">{cards}</FeatureCards>
|
|
392
|
+
|
|
393
|
+
// mesh on strong
|
|
394
|
+
<FeatureCards title="Why trade with Deriv" description="Everything you need to trade the markets, in one account." link={<Link href="/why-deriv">Learn more</Link>} background="mesh" ground="strong">{cards}</FeatureCards>
|
|
395
|
+
```
|
|
@@ -53,7 +53,7 @@ Apply these classes from the generated `featureCardsCarouselParts` constant rath
|
|
|
53
53
|
### ground — `page` | `subtle` | `strong` (default `page`)
|
|
54
54
|
|
|
55
55
|
- `page` — The default, and the page's own white. A section that has nothing to separate itself from what is above it — most of them — and the ground a reader is already on
|
|
56
|
-
- `subtle` — A quiet step off the page, for a band that wants to read as its own section without changing the page's voice. The one to reach for first when two sections need telling apart. A light card — surface-light — turns white on it, color.bg.surface-card-light-raised, because its own gray.50 is the band's and would vanish into it. A dark card — accent-strong — is lifted to color.bg.surface-card-strong-raised, a step lighter in dark mode, where the band is within a shade of its
|
|
56
|
+
- `subtle` — A quiet step off the page, for a band that wants to read as its own section without changing the page's voice. The one to reach for first when two sections need telling apart. A light card — surface-light — turns white on it, color.bg.surface-card-light-raised, because its own gray.50 is the band's and would vanish into it. A dark card — accent-strong — is lifted to color.bg.surface-card-strong-raised, a step lighter in dark mode, where the band is within a shade of its slate.900. A plain surface card is raised off it the same way, to color.bg.surface-card-raised, because the recessed fill is the band's gray too. Painted as the band's tint laid over the page's own ground, so it is the same grey whatever is behind the section — in dark mode the tint alone took on whatever it was set against, and on a light surface it was light ink on white.
|
|
57
57
|
- `strong` — `color.bg.brand-strong`, the dark band. It stops the page rather than dividing it, so it is for a section a reader should arrive at — and one per page is usually one more than enough. The coloured cards keep their own grounds on it; a neutral card — surface or surface-raised — turns to Card's inverse fill and white ink, and a plain card takes the white ink alone, because their own would be dark ink on near-black; an eyebrow inside any of them takes the band's quieter ink
|
|
58
58
|
|
|
59
59
|
Use when: Which of the page's three grounds this section paints. A marketing page is white, and a band that wants to be seen as a band takes one of the other two — so this is how a page builds its rhythm: white, white, grey, white, dark. Two in a row is a deliberate pair rather than an accident, and the section above knows nothing about the one below it, so the page is the only thing that can decide.
|
|
@@ -129,6 +129,12 @@ What this is not about is every row of controls. A set of filter chips, a pagina
|
|
|
129
129
|
Guidance only — cannot be checked automatically.
|
|
130
130
|
- **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.
|
|
131
131
|
Guidance only — cannot be checked automatically.
|
|
132
|
+
- **A page has at most one patterned band, between its hero and its closing call to action** — A patterned ground — the halftone, the aurora, the mesh, the grid or the rings — is what makes a band the one a reader stops at, and it only works by being the exception. So a page has at most one, placed between its hero and its closing call to action; the hero's and the call to action's own patterns are theirs and do not count, and the band never goes on either of them.
|
|
133
|
+
|
|
134
|
+
The pattern is the band's first layer, under its content and over nothing. A block that can carry one says so with its own `background` prop — FeatureCards, Stats, TestimonialRow and LogoRows — and draws it there; a section built by hand places a Background with nothing in it as its first child. Never wrap a block in a Background: the block paints its own ground over the pattern and hides it.
|
|
135
|
+
|
|
136
|
+
Only a band whose content is stacked can carry one. Every pattern rises from the band's foot, so the band needs a heading over what it introduces, centred, with the foot left open. A band whose content runs side by side — words beside a picture, a split, columns reaching the foot — puts the glow behind the picture or under the words; it stays on its flat ground.
|
|
137
|
+
Guidance only — cannot be checked automatically.
|
|
132
138
|
- **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.
|
|
133
139
|
|
|
134
140
|
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.
|
|
@@ -158,6 +158,12 @@ What this is not about is every row of controls. A set of filter chips, a pagina
|
|
|
158
158
|
Guidance only — cannot be checked automatically.
|
|
159
159
|
- **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.
|
|
160
160
|
Guidance only — cannot be checked automatically.
|
|
161
|
+
- **A page has at most one patterned band, between its hero and its closing call to action** — A patterned ground — the halftone, the aurora, the mesh, the grid or the rings — is what makes a band the one a reader stops at, and it only works by being the exception. So a page has at most one, placed between its hero and its closing call to action; the hero's and the call to action's own patterns are theirs and do not count, and the band never goes on either of them.
|
|
162
|
+
|
|
163
|
+
The pattern is the band's first layer, under its content and over nothing. A block that can carry one says so with its own `background` prop — FeatureCards, Stats, TestimonialRow and LogoRows — and draws it there; a section built by hand places a Background with nothing in it as its first child. Never wrap a block in a Background: the block paints its own ground over the pattern and hides it.
|
|
164
|
+
|
|
165
|
+
Only a band whose content is stacked can carry one. Every pattern rises from the band's foot, so the band needs a heading over what it introduces, centred, with the foot left open. A band whose content runs side by side — words beside a picture, a split, columns reaching the foot — puts the glow behind the picture or under the words; it stays on its flat ground.
|
|
166
|
+
Guidance only — cannot be checked automatically.
|
|
161
167
|
- **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.
|
|
162
168
|
|
|
163
169
|
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.
|
|
@@ -122,6 +122,12 @@ What this is not about is every row of controls. A set of filter chips, a pagina
|
|
|
122
122
|
Guidance only — cannot be checked automatically.
|
|
123
123
|
- **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.
|
|
124
124
|
Guidance only — cannot be checked automatically.
|
|
125
|
+
- **A page has at most one patterned band, between its hero and its closing call to action** — A patterned ground — the halftone, the aurora, the mesh, the grid or the rings — is what makes a band the one a reader stops at, and it only works by being the exception. So a page has at most one, placed between its hero and its closing call to action; the hero's and the call to action's own patterns are theirs and do not count, and the band never goes on either of them.
|
|
126
|
+
|
|
127
|
+
The pattern is the band's first layer, under its content and over nothing. A block that can carry one says so with its own `background` prop — FeatureCards, Stats, TestimonialRow and LogoRows — and draws it there; a section built by hand places a Background with nothing in it as its first child. Never wrap a block in a Background: the block paints its own ground over the pattern and hides it.
|
|
128
|
+
|
|
129
|
+
Only a band whose content is stacked can carry one. Every pattern rises from the band's foot, so the band needs a heading over what it introduces, centred, with the foot left open. A band whose content runs side by side — words beside a picture, a split, columns reaching the foot — puts the glow behind the picture or under the words; it stays on its flat ground.
|
|
130
|
+
Guidance only — cannot be checked automatically.
|
|
125
131
|
- **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.
|
|
126
132
|
|
|
127
133
|
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.
|
|
@@ -102,6 +102,12 @@ What this is not about is every row of controls. A set of filter chips, a pagina
|
|
|
102
102
|
Guidance only — cannot be checked automatically.
|
|
103
103
|
- **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.
|
|
104
104
|
Guidance only — cannot be checked automatically.
|
|
105
|
+
- **A page has at most one patterned band, between its hero and its closing call to action** — A patterned ground — the halftone, the aurora, the mesh, the grid or the rings — is what makes a band the one a reader stops at, and it only works by being the exception. So a page has at most one, placed between its hero and its closing call to action; the hero's and the call to action's own patterns are theirs and do not count, and the band never goes on either of them.
|
|
106
|
+
|
|
107
|
+
The pattern is the band's first layer, under its content and over nothing. A block that can carry one says so with its own `background` prop — FeatureCards, Stats, TestimonialRow and LogoRows — and draws it there; a section built by hand places a Background with nothing in it as its first child. Never wrap a block in a Background: the block paints its own ground over the pattern and hides it.
|
|
108
|
+
|
|
109
|
+
Only a band whose content is stacked can carry one. Every pattern rises from the band's foot, so the band needs a heading over what it introduces, centred, with the foot left open. A band whose content runs side by side — words beside a picture, a split, columns reaching the foot — puts the glow behind the picture or under the words; it stays on its flat ground.
|
|
110
|
+
Guidance only — cannot be checked automatically.
|
|
105
111
|
- **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.
|
|
106
112
|
|
|
107
113
|
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.
|
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
<!-- GENERATED from feature-tabs.contract.json. Do not edit. -->
|
|
2
|
+
|
|
3
|
+
# FeatureTabs
|
|
4
|
+
|
|
5
|
+
A section that shows one version of something at a time behind tabs — a heading, a strip of tabs, and the content of the one selected.
|
|
6
|
+
|
|
7
|
+
## Why it is built this way
|
|
8
|
+
|
|
9
|
+
Some sections show several versions of one thing that a reader takes one at a time: a product's trade types, a platform on each device, the accounts on offer. This is that section — the reference design's OptionsTypes, made general.
|
|
10
|
+
|
|
11
|
+
The section owns what every version shares: the heading, the tab strip and which tab is showing, the footnote and the ground. What each tab shows is composed by the page — usually a Grid of plain Cards, each a flush CardBody with its picture above a title, a line and a Link — one child per name in `labels`, so a tab can hold whatever its version needs without a component for each shape. Only the tab showing is in the page, so a video or an animation in another is not playing behind it.
|
|
12
|
+
|
|
13
|
+
## Use when
|
|
14
|
+
|
|
15
|
+
- Several versions of one thing a reader takes one at a time — a product's trade types, a platform's apps, the account types
|
|
16
|
+
- A section whose versions each need a picture, a line and a way onward, and only one is worth showing at once
|
|
17
|
+
|
|
18
|
+
## Do not use
|
|
19
|
+
|
|
20
|
+
- One claim and one picture, with nothing to list → `FeatureSplit`
|
|
21
|
+
- Two or three plans or account types compared feature by feature → `ComparisonCards`
|
|
22
|
+
- Showing the same section's content for a monthly or a yearly price → `TabList`
|
|
23
|
+
- Content a reader needs all of. Only one tab is on the page at a time, and most readers never open the others
|
|
24
|
+
- Small print the reader must see. The footnote is the last thing read
|
|
25
|
+
- More than six tabs. A strip longer than that scrolls, and a reader stops reading it
|
|
26
|
+
|
|
27
|
+
## Anatomy
|
|
28
|
+
|
|
29
|
+
FeatureTabs renders 8 elements. A token binding names the part it applies to.
|
|
30
|
+
|
|
31
|
+
- `root` — `<section>`, class `dds-featuretabs`. The section, a region named by its heading, on the ground `ground` paints with the ink that goes with it.
|
|
32
|
+
- `inner` — `<div>`, class `dds-featuretabs__inner`. The measure and the gutter, the same column every band holds its content in, and the step from the heading to the tabs' content: space.heading.content.
|
|
33
|
+
- `header` — `<div>`, class `dds-featuretabs__header`. The heading, the line under it and the tabs. At the start on a phone, as every block's heading is there; centred over the content they choose from 48rem.
|
|
34
|
+
- `title` — `<h2>`, class `dds-featuretabs__title`. What the versions are of — "Types of digital options", "Our platforms". `h2` because the section sits under the page's own heading; what each tab shows takes its headings from `h3`.
|
|
35
|
+
- `description` — `<p>`, class `dds-featuretabs__description`. The line under the heading, at font.body.md. Rendered only when `description` is set.
|
|
36
|
+
- `tabs` — `<div>`, class `dds-featuretabs__tabs`. The TabList of `labels`, named after the section's heading. Empty when there is one tab, since a strip of one tab chooses nothing.
|
|
37
|
+
- `panel` — `<div>`, class `dds-featuretabs__panel`. The child for the selected tab, as the page composed it. The others are out of the page rather than hidden in it, so a picture playing in one stops when the reader turns to the next.
|
|
38
|
+
- `footnote` — `<p>`, class `dds-featuretabs__footnote`. Small print every tab shares, in the muted ink — "Trade types may vary by platform and device.". At the start on a phone, centred from 48rem with the heading. Rendered only when `footnote` is set.
|
|
39
|
+
|
|
40
|
+
Apply these classes from the generated `featureTabsParts` constant rather than writing the strings by hand.
|
|
41
|
+
|
|
42
|
+
## Composition
|
|
43
|
+
|
|
44
|
+
- Can contain: any content
|
|
45
|
+
- Never contains: `FeatureTabs`, `TabList`, `LandingHero`, `ProductHero`, `PageHeader`, `Footer`, `Navbar` — in children or in any prop that takes a node
|
|
46
|
+
- Holds at least 1
|
|
47
|
+
|
|
48
|
+
## Props
|
|
49
|
+
|
|
50
|
+
### ground — `page` | `subtle` | `strong` (default `page`)
|
|
51
|
+
|
|
52
|
+
- `page` — The default, and the page's own white. A section that has nothing to separate itself from what is above it — most of them — and the ground a reader is already on
|
|
53
|
+
- `subtle` — A quiet step off the page, for a band that wants to read as its own section without changing the page's voice — the reference design's slate FAQ. Painted as the band's tint laid over the page's own ground, so it is the same grey whatever is behind the section.
|
|
54
|
+
- `strong` — `color.bg.brand-strong`, the dark band. It stops the page rather than dividing it, so it is for a section a reader should arrive at — and one per page is usually one more than enough. The tab strip turns round with it: white names, a rule in the band's own veil and a focus ring drawn for the dark, fixed like the band
|
|
55
|
+
|
|
56
|
+
Use when: Which of the page's three grounds this section paints. A marketing page is white, and a band that wants to be seen as a band takes one of the other two — so this is how a page builds its rhythm: white, white, grey, white, dark. Two in a row is a deliberate pair rather than an accident, and the section above knows nothing about the one below it, so the page is the only thing that can decide.
|
|
57
|
+
|
|
58
|
+
The ink follows the ground and is not a second decision: a dark band carries white type because this sets both halves in one value, which is what the painted-ground-carries-its-ink rule exists to stop a page getting wrong.
|
|
59
|
+
Never for: Marking importance. Every section on a page painted a ground is a page with no emphasis left.
|
|
60
|
+
|
|
61
|
+
### title — `string` **Required.**
|
|
62
|
+
|
|
63
|
+
Use when: Always. What the versions are of, in a few words — "Types of digital options". It names the section and the tabs
|
|
64
|
+
Never for: A sentence. The line under it says more
|
|
65
|
+
|
|
66
|
+
### description — `string`
|
|
67
|
+
|
|
68
|
+
Use when: A line under the heading saying what the tabs have in common
|
|
69
|
+
Never for: Describing one tab. Each says that in its own description
|
|
70
|
+
|
|
71
|
+
### labels — `data` `string[]` **Required.**
|
|
72
|
+
|
|
73
|
+
Use when: Always. The tabs' names, in a word or two each, in the order of the children they choose between — the first names the first child. A name without a child is not drawn
|
|
74
|
+
Never for: Sentences. A tab is read at a glance; what it shows says the rest
|
|
75
|
+
|
|
76
|
+
### footnote — `string`
|
|
77
|
+
|
|
78
|
+
Use when: Small print every tab shares — that what is offered varies by platform or device
|
|
79
|
+
Never for: A risk warning. Small print is the last thing a reader reads, and the one place a warning must never be
|
|
80
|
+
|
|
81
|
+
## Accessibility
|
|
82
|
+
|
|
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.
|
|
84
|
+
|
|
85
|
+
- Announced as: `region`
|
|
86
|
+
- `Tab` — Moves through the tabs, then into the content showing
|
|
87
|
+
- the section is a region named by its heading
|
|
88
|
+
- with two or more tabs, they are a TabList named by the section's heading, and the content showing is the child the selected tab names
|
|
89
|
+
|
|
90
|
+
## Rules
|
|
91
|
+
|
|
92
|
+
- **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.
|
|
93
|
+
|
|
94
|
+
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.
|
|
95
|
+
|
|
96
|
+
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.
|
|
97
|
+
|
|
98
|
+
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.
|
|
99
|
+
|
|
100
|
+
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.
|
|
101
|
+
|
|
102
|
+
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.
|
|
103
|
+
Guidance only — cannot be checked automatically.
|
|
104
|
+
- **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.
|
|
105
|
+
Guidance only — cannot be checked automatically.
|
|
106
|
+
- **A page has at most one patterned band, between its hero and its closing call to action** — A patterned ground — the halftone, the aurora, the mesh, the grid or the rings — is what makes a band the one a reader stops at, and it only works by being the exception. So a page has at most one, placed between its hero and its closing call to action; the hero's and the call to action's own patterns are theirs and do not count, and the band never goes on either of them.
|
|
107
|
+
|
|
108
|
+
The pattern is the band's first layer, under its content and over nothing. A block that can carry one says so with its own `background` prop — FeatureCards, Stats, TestimonialRow and LogoRows — and draws it there; a section built by hand places a Background with nothing in it as its first child. Never wrap a block in a Background: the block paints its own ground over the pattern and hides it.
|
|
109
|
+
|
|
110
|
+
Only a band whose content is stacked can carry one. Every pattern rises from the band's foot, so the band needs a heading over what it introduces, centred, with the foot left open. A band whose content runs side by side — words beside a picture, a split, columns reaching the foot — puts the glow behind the picture or under the words; it stays on its flat ground.
|
|
111
|
+
Guidance only — cannot be checked automatically.
|
|
112
|
+
- **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.
|
|
113
|
+
|
|
114
|
+
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.
|
|
115
|
+
|
|
116
|
+
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.
|
|
117
|
+
Guidance only — cannot be checked automatically.
|
|
118
|
+
- **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.
|
|
119
|
+
|
|
120
|
+
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.
|
|
121
|
+
|
|
122
|
+
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.
|
|
123
|
+
|
|
124
|
+
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.
|
|
125
|
+
|
|
126
|
+
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.
|
|
127
|
+
|
|
128
|
+
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.
|
|
129
|
+
|
|
130
|
+
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.
|
|
131
|
+
|
|
132
|
+
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.
|
|
133
|
+
|
|
134
|
+
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.
|
|
135
|
+
Guidance only — cannot be checked automatically.
|
|
136
|
+
- **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.
|
|
137
|
+
|
|
138
|
+
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.
|
|
139
|
+
|
|
140
|
+
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.
|
|
141
|
+
|
|
142
|
+
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.
|
|
143
|
+
|
|
144
|
+
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.
|
|
145
|
+
|
|
146
|
+
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.
|
|
147
|
+
|
|
148
|
+
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.
|
|
149
|
+
|
|
150
|
+
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.
|
|
151
|
+
|
|
152
|
+
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.
|
|
153
|
+
Guidance only — cannot be checked automatically.
|
|
154
|
+
- **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.
|
|
155
|
+
|
|
156
|
+
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.
|
|
157
|
+
|
|
158
|
+
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.
|
|
159
|
+
|
|
160
|
+
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.
|
|
161
|
+
Guidance only — cannot be checked automatically.
|
|
162
|
+
- **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.
|
|
163
|
+
|
|
164
|
+
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.
|
|
165
|
+
|
|
166
|
+
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.
|
|
167
|
+
|
|
168
|
+
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.
|
|
169
|
+
Guidance only — cannot be checked automatically.
|
|
170
|
+
|
|
171
|
+
## Anti-examples
|
|
172
|
+
|
|
173
|
+
❌ FeatureTabs for: One claim and one picture, with nothing to list
|
|
174
|
+
FeatureSplit is one point beside one picture; this is versions and where each leads
|
|
175
|
+
→ use `FeatureSplit` instead.
|
|
176
|
+
|
|
177
|
+
❌ FeatureTabs for: Two or three plans or account types compared feature by feature
|
|
178
|
+
A comparison sets the versions side by side; this shows them one at a time
|
|
179
|
+
→ use `ComparisonCards` instead.
|
|
180
|
+
|
|
181
|
+
❌ FeatureTabs for: Showing the same section's content for a monthly or a yearly price
|
|
182
|
+
A TabList over the page's own content switches what the page shows; this is a section of its own
|
|
183
|
+
→ use `TabList` instead.
|
|
184
|
+
|
|
185
|
+
## Example
|
|
186
|
+
|
|
187
|
+
```tsx
|
|
188
|
+
import { FeatureTabs, Grid, Card, CardBody, Link } from '@deriv-com/dds-marketing'
|
|
189
|
+
|
|
190
|
+
<FeatureTabs title="Explore what you can do" description="Three ways to get started, each with everything you need." labels={["Plan","Build","Review"]} footnote="Features may vary by region and device.">
|
|
191
|
+
<Grid columns="3" gap="gutter">
|
|
192
|
+
<Card variant="plain">
|
|
193
|
+
<CardBody title="Set your goals" description="Decide what you want to reach and by when." src="/sample-stop-blue.svg" alt="" mediaPosition="above" flush aspect={1.5} link={<Link href="/plan/goals" tone="inherit">Learn more</Link>} />
|
|
194
|
+
</Card>
|
|
195
|
+
<Card variant="plain">
|
|
196
|
+
<CardBody title="Compare your options" description="See what each choice could mean before you commit." src="/sample-stop-teal.svg" alt="" mediaPosition="above" flush aspect={1.5} link={<Link href="/plan/options" tone="inherit">Learn more</Link>} />
|
|
197
|
+
</Card>
|
|
198
|
+
<Card variant="plain">
|
|
199
|
+
<CardBody title="Know your limits" description="Set the amount you are comfortable with from the start." src="/sample-stop-purple.svg" alt="" mediaPosition="above" flush aspect={1.5} link={<Link href="/plan/limits" tone="inherit">Learn more</Link>} />
|
|
200
|
+
</Card>
|
|
201
|
+
</Grid>
|
|
202
|
+
<Grid columns="3" gap="gutter">
|
|
203
|
+
<Card variant="plain">
|
|
204
|
+
<CardBody title="Start small" description="Try your plan with a little before you go further." src="/sample-stop-amber.svg" alt="" mediaPosition="above" flush aspect={1.5} link={<Link href="/build/start" tone="inherit">Learn more</Link>} />
|
|
205
|
+
</Card>
|
|
206
|
+
<Card variant="plain">
|
|
207
|
+
<CardBody title="Watch it work" description="Tools that show you what is happening as you go." src="/sample-stop-blue.svg" alt="" mediaPosition="above" flush aspect={1.5} link={<Link href="/build/watch" tone="inherit">Learn more</Link>} />
|
|
208
|
+
</Card>
|
|
209
|
+
<Card variant="plain">
|
|
210
|
+
<CardBody title="Adjust as you go" description="Change course whenever the picture changes." src="/sample-stop-teal.svg" alt="" mediaPosition="above" flush aspect={1.5} link={<Link href="/build/adjust" tone="inherit">Learn more</Link>} />
|
|
211
|
+
</Card>
|
|
212
|
+
</Grid>
|
|
213
|
+
<Grid columns="3" gap="gutter">
|
|
214
|
+
<Card variant="plain">
|
|
215
|
+
<CardBody title="Look back" description="See what worked and what did not." src="/sample-stop-purple.svg" alt="" mediaPosition="above" flush aspect={1.5} link={<Link href="/review/history" tone="inherit">Learn more</Link>} />
|
|
216
|
+
</Card>
|
|
217
|
+
<Card variant="plain">
|
|
218
|
+
<CardBody title="Spot patterns" description="Find what your best results have in common." src="/sample-stop-amber.svg" alt="" mediaPosition="above" flush aspect={1.5} link={<Link href="/review/patterns" tone="inherit">Learn more</Link>} />
|
|
219
|
+
</Card>
|
|
220
|
+
<Card variant="plain">
|
|
221
|
+
<CardBody title="Plan the next step" description="Take what you learned into your next plan." src="/sample-stop-blue.svg" alt="" mediaPosition="above" flush aspect={1.5} link={<Link href="/review/next" tone="inherit">Learn more</Link>} />
|
|
222
|
+
</Card>
|
|
223
|
+
</Grid>
|
|
224
|
+
</FeatureTabs>
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
## In use
|
|
228
|
+
|
|
229
|
+
### Grounds
|
|
230
|
+
|
|
231
|
+
The section on each of the page's three grounds.
|
|
232
|
+
|
|
233
|
+
```tsx
|
|
234
|
+
import { Card, CardBody, FeatureTabs, Grid, Link } from '@deriv-com/dds-marketing'
|
|
235
|
+
|
|
236
|
+
// Page
|
|
237
|
+
<FeatureTabs title="Explore what you can do" ground="page" labels={["Plan","Build","Review"]}>
|
|
238
|
+
<Grid columns="3" gap="gutter">
|
|
239
|
+
<Card variant="plain">
|
|
240
|
+
<CardBody title="Set your goals" description="Decide what you want to reach and by when." src="/sample-stop-blue.svg" alt="" mediaPosition="above" flush aspect={1.5} link={<Link href="/plan/goals" tone="inherit">Learn more</Link>} />
|
|
241
|
+
</Card>
|
|
242
|
+
<Card variant="plain">
|
|
243
|
+
<CardBody title="Compare your options" description="See what each choice could mean before you commit." src="/sample-stop-teal.svg" alt="" mediaPosition="above" flush aspect={1.5} link={<Link href="/plan/options" tone="inherit">Learn more</Link>} />
|
|
244
|
+
</Card>
|
|
245
|
+
<Card variant="plain">
|
|
246
|
+
<CardBody title="Know your limits" description="Set the amount you are comfortable with from the start." src="/sample-stop-purple.svg" alt="" mediaPosition="above" flush aspect={1.5} link={<Link href="/plan/limits" tone="inherit">Learn more</Link>} />
|
|
247
|
+
</Card>
|
|
248
|
+
</Grid>
|
|
249
|
+
<Grid columns="3" gap="gutter">
|
|
250
|
+
<Card variant="plain">
|
|
251
|
+
<CardBody title="Start small" description="Try your plan with a little before you go further." src="/sample-stop-amber.svg" alt="" mediaPosition="above" flush aspect={1.5} link={<Link href="/build/start" tone="inherit">Learn more</Link>} />
|
|
252
|
+
</Card>
|
|
253
|
+
<Card variant="plain">
|
|
254
|
+
<CardBody title="Watch it work" description="Tools that show you what is happening as you go." src="/sample-stop-blue.svg" alt="" mediaPosition="above" flush aspect={1.5} link={<Link href="/build/watch" tone="inherit">Learn more</Link>} />
|
|
255
|
+
</Card>
|
|
256
|
+
<Card variant="plain">
|
|
257
|
+
<CardBody title="Adjust as you go" description="Change course whenever the picture changes." src="/sample-stop-teal.svg" alt="" mediaPosition="above" flush aspect={1.5} link={<Link href="/build/adjust" tone="inherit">Learn more</Link>} />
|
|
258
|
+
</Card>
|
|
259
|
+
</Grid>
|
|
260
|
+
<Grid columns="3" gap="gutter">
|
|
261
|
+
<Card variant="plain">
|
|
262
|
+
<CardBody title="Look back" description="See what worked and what did not." src="/sample-stop-purple.svg" alt="" mediaPosition="above" flush aspect={1.5} link={<Link href="/review/history" tone="inherit">Learn more</Link>} />
|
|
263
|
+
</Card>
|
|
264
|
+
<Card variant="plain">
|
|
265
|
+
<CardBody title="Spot patterns" description="Find what your best results have in common." src="/sample-stop-amber.svg" alt="" mediaPosition="above" flush aspect={1.5} link={<Link href="/review/patterns" tone="inherit">Learn more</Link>} />
|
|
266
|
+
</Card>
|
|
267
|
+
<Card variant="plain">
|
|
268
|
+
<CardBody title="Plan the next step" description="Take what you learned into your next plan." src="/sample-stop-blue.svg" alt="" mediaPosition="above" flush aspect={1.5} link={<Link href="/review/next" tone="inherit">Learn more</Link>} />
|
|
269
|
+
</Card>
|
|
270
|
+
</Grid>
|
|
271
|
+
</FeatureTabs>
|
|
272
|
+
|
|
273
|
+
// Subtle
|
|
274
|
+
<FeatureTabs title="Explore what you can do" ground="subtle" labels={["Plan","Build","Review"]}>
|
|
275
|
+
<Grid columns="3" gap="gutter">
|
|
276
|
+
<Card variant="plain">
|
|
277
|
+
<CardBody title="Set your goals" description="Decide what you want to reach and by when." src="/sample-stop-blue.svg" alt="" mediaPosition="above" flush aspect={1.5} link={<Link href="/plan/goals" tone="inherit">Learn more</Link>} />
|
|
278
|
+
</Card>
|
|
279
|
+
<Card variant="plain">
|
|
280
|
+
<CardBody title="Compare your options" description="See what each choice could mean before you commit." src="/sample-stop-teal.svg" alt="" mediaPosition="above" flush aspect={1.5} link={<Link href="/plan/options" tone="inherit">Learn more</Link>} />
|
|
281
|
+
</Card>
|
|
282
|
+
<Card variant="plain">
|
|
283
|
+
<CardBody title="Know your limits" description="Set the amount you are comfortable with from the start." src="/sample-stop-purple.svg" alt="" mediaPosition="above" flush aspect={1.5} link={<Link href="/plan/limits" tone="inherit">Learn more</Link>} />
|
|
284
|
+
</Card>
|
|
285
|
+
</Grid>
|
|
286
|
+
<Grid columns="3" gap="gutter">
|
|
287
|
+
<Card variant="plain">
|
|
288
|
+
<CardBody title="Start small" description="Try your plan with a little before you go further." src="/sample-stop-amber.svg" alt="" mediaPosition="above" flush aspect={1.5} link={<Link href="/build/start" tone="inherit">Learn more</Link>} />
|
|
289
|
+
</Card>
|
|
290
|
+
<Card variant="plain">
|
|
291
|
+
<CardBody title="Watch it work" description="Tools that show you what is happening as you go." src="/sample-stop-blue.svg" alt="" mediaPosition="above" flush aspect={1.5} link={<Link href="/build/watch" tone="inherit">Learn more</Link>} />
|
|
292
|
+
</Card>
|
|
293
|
+
<Card variant="plain">
|
|
294
|
+
<CardBody title="Adjust as you go" description="Change course whenever the picture changes." src="/sample-stop-teal.svg" alt="" mediaPosition="above" flush aspect={1.5} link={<Link href="/build/adjust" tone="inherit">Learn more</Link>} />
|
|
295
|
+
</Card>
|
|
296
|
+
</Grid>
|
|
297
|
+
<Grid columns="3" gap="gutter">
|
|
298
|
+
<Card variant="plain">
|
|
299
|
+
<CardBody title="Look back" description="See what worked and what did not." src="/sample-stop-purple.svg" alt="" mediaPosition="above" flush aspect={1.5} link={<Link href="/review/history" tone="inherit">Learn more</Link>} />
|
|
300
|
+
</Card>
|
|
301
|
+
<Card variant="plain">
|
|
302
|
+
<CardBody title="Spot patterns" description="Find what your best results have in common." src="/sample-stop-amber.svg" alt="" mediaPosition="above" flush aspect={1.5} link={<Link href="/review/patterns" tone="inherit">Learn more</Link>} />
|
|
303
|
+
</Card>
|
|
304
|
+
<Card variant="plain">
|
|
305
|
+
<CardBody title="Plan the next step" description="Take what you learned into your next plan." src="/sample-stop-blue.svg" alt="" mediaPosition="above" flush aspect={1.5} link={<Link href="/review/next" tone="inherit">Learn more</Link>} />
|
|
306
|
+
</Card>
|
|
307
|
+
</Grid>
|
|
308
|
+
</FeatureTabs>
|
|
309
|
+
|
|
310
|
+
// Strong
|
|
311
|
+
<FeatureTabs title="Explore what you can do" ground="strong" labels={["Plan","Build","Review"]} footnote="Features may vary by region and device.">
|
|
312
|
+
<Grid columns="3" gap="gutter">
|
|
313
|
+
<Card variant="plain">
|
|
314
|
+
<CardBody title="Set your goals" description="Decide what you want to reach and by when." src="/sample-stop-blue.svg" alt="" mediaPosition="above" flush aspect={1.5} link={<Link href="/plan/goals" tone="inherit">Learn more</Link>} />
|
|
315
|
+
</Card>
|
|
316
|
+
<Card variant="plain">
|
|
317
|
+
<CardBody title="Compare your options" description="See what each choice could mean before you commit." src="/sample-stop-teal.svg" alt="" mediaPosition="above" flush aspect={1.5} link={<Link href="/plan/options" tone="inherit">Learn more</Link>} />
|
|
318
|
+
</Card>
|
|
319
|
+
<Card variant="plain">
|
|
320
|
+
<CardBody title="Know your limits" description="Set the amount you are comfortable with from the start." src="/sample-stop-purple.svg" alt="" mediaPosition="above" flush aspect={1.5} link={<Link href="/plan/limits" tone="inherit">Learn more</Link>} />
|
|
321
|
+
</Card>
|
|
322
|
+
</Grid>
|
|
323
|
+
<Grid columns="3" gap="gutter">
|
|
324
|
+
<Card variant="plain">
|
|
325
|
+
<CardBody title="Start small" description="Try your plan with a little before you go further." src="/sample-stop-amber.svg" alt="" mediaPosition="above" flush aspect={1.5} link={<Link href="/build/start" tone="inherit">Learn more</Link>} />
|
|
326
|
+
</Card>
|
|
327
|
+
<Card variant="plain">
|
|
328
|
+
<CardBody title="Watch it work" description="Tools that show you what is happening as you go." src="/sample-stop-blue.svg" alt="" mediaPosition="above" flush aspect={1.5} link={<Link href="/build/watch" tone="inherit">Learn more</Link>} />
|
|
329
|
+
</Card>
|
|
330
|
+
<Card variant="plain">
|
|
331
|
+
<CardBody title="Adjust as you go" description="Change course whenever the picture changes." src="/sample-stop-teal.svg" alt="" mediaPosition="above" flush aspect={1.5} link={<Link href="/build/adjust" tone="inherit">Learn more</Link>} />
|
|
332
|
+
</Card>
|
|
333
|
+
</Grid>
|
|
334
|
+
<Grid columns="3" gap="gutter">
|
|
335
|
+
<Card variant="plain">
|
|
336
|
+
<CardBody title="Look back" description="See what worked and what did not." src="/sample-stop-purple.svg" alt="" mediaPosition="above" flush aspect={1.5} link={<Link href="/review/history" tone="inherit">Learn more</Link>} />
|
|
337
|
+
</Card>
|
|
338
|
+
<Card variant="plain">
|
|
339
|
+
<CardBody title="Spot patterns" description="Find what your best results have in common." src="/sample-stop-amber.svg" alt="" mediaPosition="above" flush aspect={1.5} link={<Link href="/review/patterns" tone="inherit">Learn more</Link>} />
|
|
340
|
+
</Card>
|
|
341
|
+
<Card variant="plain">
|
|
342
|
+
<CardBody title="Plan the next step" description="Take what you learned into your next plan." src="/sample-stop-blue.svg" alt="" mediaPosition="above" flush aspect={1.5} link={<Link href="/review/next" tone="inherit">Learn more</Link>} />
|
|
343
|
+
</Card>
|
|
344
|
+
</Grid>
|
|
345
|
+
</FeatureTabs>
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
### One tab
|
|
349
|
+
|
|
350
|
+
One version on its own: no strip, just the content.
|
|
351
|
+
|
|
352
|
+
```tsx
|
|
353
|
+
import { Card, CardBody, FeatureTabs, Grid, Link } from '@deriv-com/dds-marketing'
|
|
354
|
+
|
|
355
|
+
// Lone tab
|
|
356
|
+
<FeatureTabs title="All in one place" labels={["Overview"]}>
|
|
357
|
+
<Grid columns="3" gap="gutter">
|
|
358
|
+
<Card variant="plain">
|
|
359
|
+
<CardBody title="Set your goals" description="Decide what you want to reach and by when." src="/sample-stop-blue.svg" alt="" mediaPosition="above" flush aspect={1.5} link={<Link href="/plan/goals" tone="inherit">Learn more</Link>} />
|
|
360
|
+
</Card>
|
|
361
|
+
<Card variant="plain">
|
|
362
|
+
<CardBody title="Compare your options" description="See what each choice could mean before you commit." src="/sample-stop-teal.svg" alt="" mediaPosition="above" flush aspect={1.5} link={<Link href="/plan/options" tone="inherit">Learn more</Link>} />
|
|
363
|
+
</Card>
|
|
364
|
+
<Card variant="plain">
|
|
365
|
+
<CardBody title="Know your limits" description="Set the amount you are comfortable with from the start." src="/sample-stop-purple.svg" alt="" mediaPosition="above" flush aspect={1.5} link={<Link href="/plan/limits" tone="inherit">Learn more</Link>} />
|
|
366
|
+
</Card>
|
|
367
|
+
</Grid>
|
|
368
|
+
</FeatureTabs>
|
|
369
|
+
```
|
|
@@ -146,6 +146,12 @@ What this is not about is every row of controls. A set of filter chips, a pagina
|
|
|
146
146
|
Guidance only — cannot be checked automatically.
|
|
147
147
|
- **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.
|
|
148
148
|
Guidance only — cannot be checked automatically.
|
|
149
|
+
- **A page has at most one patterned band, between its hero and its closing call to action** — A patterned ground — the halftone, the aurora, the mesh, the grid or the rings — is what makes a band the one a reader stops at, and it only works by being the exception. So a page has at most one, placed between its hero and its closing call to action; the hero's and the call to action's own patterns are theirs and do not count, and the band never goes on either of them.
|
|
150
|
+
|
|
151
|
+
The pattern is the band's first layer, under its content and over nothing. A block that can carry one says so with its own `background` prop — FeatureCards, Stats, TestimonialRow and LogoRows — and draws it there; a section built by hand places a Background with nothing in it as its first child. Never wrap a block in a Background: the block paints its own ground over the pattern and hides it.
|
|
152
|
+
|
|
153
|
+
Only a band whose content is stacked can carry one. Every pattern rises from the band's foot, so the band needs a heading over what it introduces, centred, with the foot left open. A band whose content runs side by side — words beside a picture, a split, columns reaching the foot — puts the glow behind the picture or under the words; it stays on its flat ground.
|
|
154
|
+
Guidance only — cannot be checked automatically.
|
|
149
155
|
- **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.
|
|
150
156
|
|
|
151
157
|
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.
|