@deriv-com/dds-marketing 0.2.0 → 1.0.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.
Files changed (279) hide show
  1. package/.llm/components/accordion.md +8 -0
  2. package/.llm/components/accordionitem.md +8 -0
  3. package/.llm/components/aspectratio.md +8 -0
  4. package/.llm/components/badge.md +8 -0
  5. package/.llm/components/bottomsheet.md +8 -0
  6. package/.llm/components/breadcrumb.md +8 -0
  7. package/.llm/components/breadcrumbitem.md +8 -0
  8. package/.llm/components/button.md +46 -22
  9. package/.llm/components/buttonicon.md +14 -6
  10. package/.llm/components/card.md +15 -1
  11. package/.llm/components/cardbody.md +28 -2
  12. package/.llm/components/cardbutton.md +15 -1
  13. package/.llm/components/checkbox.md +8 -0
  14. package/.llm/components/ctabanner.md +186 -0
  15. package/.llm/components/ctabannerslider.md +204 -0
  16. package/.llm/components/divider.md +8 -0
  17. package/.llm/components/dropdownmenu.md +13 -5
  18. package/.llm/components/faqaccordion.md +217 -0
  19. package/.llm/components/featurebullets.md +254 -0
  20. package/.llm/components/featurecards.md +313 -0
  21. package/.llm/components/featurescroll.md +284 -0
  22. package/.llm/components/featuresplit.md +249 -0
  23. package/.llm/components/filterchip.md +8 -0
  24. package/.llm/components/footer.md +8 -0
  25. package/.llm/components/footergroup.md +8 -0
  26. package/.llm/components/grid.md +8 -0
  27. package/.llm/components/icon.md +8 -0
  28. package/.llm/components/landinghero.md +254 -0
  29. package/.llm/components/link.md +9 -1
  30. package/.llm/components/logocolumns.md +235 -0
  31. package/.llm/components/logorows.md +212 -0
  32. package/.llm/components/menuitem.md +8 -0
  33. package/.llm/components/navbar.md +79 -15
  34. package/.llm/components/navbaritem.md +9 -1
  35. package/.llm/components/navbarmenu.md +8 -0
  36. package/.llm/components/navbarmenugroup.md +8 -0
  37. package/.llm/components/navbarpanel.md +9 -1
  38. package/.llm/components/navbarswitcher.md +9 -1
  39. package/.llm/components/navbarswitcheroption.md +8 -0
  40. package/.llm/components/option.md +8 -0
  41. package/.llm/components/pageheader.md +231 -0
  42. package/.llm/components/pagination.md +26 -89
  43. package/.llm/components/paginationdots.md +215 -0
  44. package/.llm/components/producthero.md +248 -0
  45. package/.llm/components/removablechip.md +8 -0
  46. package/.llm/components/row.md +8 -0
  47. package/.llm/components/scroller.md +8 -0
  48. package/.llm/components/searchinput.md +8 -0
  49. package/.llm/components/segmentedcontrol.md +8 -0
  50. package/.llm/components/segmentedcontrolitem.md +8 -0
  51. package/.llm/components/select.md +8 -0
  52. package/.llm/components/selectchip.md +56 -15
  53. package/.llm/components/spinner.md +8 -0
  54. package/.llm/components/stack.md +8 -0
  55. package/.llm/components/statusdot.md +8 -0
  56. package/.llm/components/subdomainnavbar.md +8 -0
  57. package/.llm/components/tab.md +8 -0
  58. package/.llm/components/table.md +8 -0
  59. package/.llm/components/tablebody.md +8 -0
  60. package/.llm/components/tablecell.md +8 -0
  61. package/.llm/components/tablehead.md +8 -0
  62. package/.llm/components/tableheadercell.md +8 -0
  63. package/.llm/components/tablerow.md +8 -0
  64. package/.llm/components/tablist.md +8 -0
  65. package/.llm/components/testimonialrow.md +235 -0
  66. package/.llm/components/testimonialslider.md +254 -0
  67. package/.llm/components/textarea.md +8 -0
  68. package/.llm/components/textinput.md +8 -0
  69. package/.llm/components/tooltip.md +8 -0
  70. package/.llm/components/typography.md +8 -0
  71. package/.llm/digest/button.md +11 -6
  72. package/.llm/digest/buttonicon.md +2 -2
  73. package/.llm/digest/card.md +1 -0
  74. package/.llm/digest/cardbody.md +3 -1
  75. package/.llm/digest/cardbutton.md +1 -0
  76. package/.llm/digest/ctabanner.md +44 -0
  77. package/.llm/digest/ctabannerslider.md +45 -0
  78. package/.llm/digest/dropdownmenu.md +1 -1
  79. package/.llm/digest/faqaccordion.md +43 -0
  80. package/.llm/digest/featurebullets.md +52 -0
  81. package/.llm/digest/featurecards.md +49 -0
  82. package/.llm/digest/featurescroll.md +52 -0
  83. package/.llm/digest/featuresplit.md +54 -0
  84. package/.llm/digest/landinghero.md +53 -0
  85. package/.llm/digest/logocolumns.md +55 -0
  86. package/.llm/digest/logorows.md +48 -0
  87. package/.llm/digest/navbar.md +18 -3
  88. package/.llm/digest/pageheader.md +49 -0
  89. package/.llm/digest/pagination.md +6 -17
  90. package/.llm/digest/paginationdots.md +43 -0
  91. package/.llm/digest/producthero.md +53 -0
  92. package/.llm/digest/selectchip.md +6 -1
  93. package/.llm/digest/testimonialrow.md +51 -0
  94. package/.llm/digest/testimonialslider.md +51 -0
  95. package/.llm/index.md +24 -3
  96. package/.llm/rules.md +24 -0
  97. package/.llm/tokens.md +56 -12
  98. package/AGENTS.md +28 -3
  99. package/README.md +41 -21
  100. package/dist/components/banner-data.d.ts +38 -0
  101. package/dist/components/banner-data.js +15 -0
  102. package/dist/components/blocks/block-reveal.css +90 -0
  103. package/dist/components/blocks/cta-banner/CtaBanner.css +66 -0
  104. package/dist/components/blocks/cta-banner/CtaBanner.d.ts +22 -0
  105. package/dist/components/blocks/cta-banner/CtaBanner.js +31 -0
  106. package/dist/components/blocks/cta-banner/CtaBanner.types.d.ts +29 -0
  107. package/dist/components/blocks/cta-banner/CtaBanner.types.js +13 -0
  108. package/dist/components/blocks/cta-banner/cta-banner-impl.css +29 -0
  109. package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.css +90 -0
  110. package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.d.ts +39 -0
  111. package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.js +60 -0
  112. package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.types.d.ts +41 -0
  113. package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.types.js +15 -0
  114. package/dist/components/blocks/cta-banner-slider/cta-banner-slider-impl.css +73 -0
  115. package/dist/components/blocks/faq-accordion/FaqAccordion.css +54 -0
  116. package/dist/components/blocks/faq-accordion/FaqAccordion.d.ts +20 -0
  117. package/dist/components/blocks/faq-accordion/FaqAccordion.js +28 -0
  118. package/dist/components/blocks/faq-accordion/FaqAccordion.types.d.ts +25 -0
  119. package/dist/components/blocks/faq-accordion/FaqAccordion.types.js +10 -0
  120. package/dist/components/blocks/faq-accordion/faq-accordion-impl.css +54 -0
  121. package/dist/components/blocks/feature-bullets/FeatureBullets.css +139 -0
  122. package/dist/components/blocks/feature-bullets/FeatureBullets.d.ts +31 -0
  123. package/dist/components/blocks/feature-bullets/FeatureBullets.js +55 -0
  124. package/dist/components/blocks/feature-bullets/FeatureBullets.types.d.ts +39 -0
  125. package/dist/components/blocks/feature-bullets/FeatureBullets.types.js +16 -0
  126. package/dist/components/blocks/feature-bullets/feature-bullets-impl.css +104 -0
  127. package/dist/components/blocks/feature-cards/FeatureCards.css +84 -0
  128. package/dist/components/blocks/feature-cards/FeatureCards.d.ts +24 -0
  129. package/dist/components/blocks/feature-cards/FeatureCards.js +66 -0
  130. package/dist/components/blocks/feature-cards/FeatureCards.types.d.ts +33 -0
  131. package/dist/components/blocks/feature-cards/FeatureCards.types.js +14 -0
  132. package/dist/components/blocks/feature-cards/feature-cards-impl.css +245 -0
  133. package/dist/components/blocks/feature-scroll/FeatureScroll.css +137 -0
  134. package/dist/components/blocks/feature-scroll/FeatureScroll.d.ts +39 -0
  135. package/dist/components/blocks/feature-scroll/FeatureScroll.js +167 -0
  136. package/dist/components/blocks/feature-scroll/FeatureScroll.types.d.ts +40 -0
  137. package/dist/components/blocks/feature-scroll/FeatureScroll.types.js +17 -0
  138. package/dist/components/blocks/feature-scroll/feature-scroll-impl.css +292 -0
  139. package/dist/components/blocks/feature-split/FeatureSplit.css +95 -0
  140. package/dist/components/blocks/feature-split/FeatureSplit.d.ts +30 -0
  141. package/dist/components/blocks/feature-split/FeatureSplit.js +38 -0
  142. package/dist/components/blocks/feature-split/FeatureSplit.types.d.ts +39 -0
  143. package/dist/components/blocks/feature-split/FeatureSplit.types.js +14 -0
  144. package/dist/components/blocks/feature-split/feature-split-impl.css +83 -0
  145. package/dist/components/blocks/landing-hero/LandingHero.css +85 -0
  146. package/dist/components/blocks/landing-hero/LandingHero.d.ts +41 -0
  147. package/dist/components/blocks/landing-hero/LandingHero.js +54 -0
  148. package/dist/components/blocks/landing-hero/LandingHero.types.d.ts +37 -0
  149. package/dist/components/blocks/landing-hero/LandingHero.types.js +15 -0
  150. package/dist/components/blocks/landing-hero/landing-hero-impl.css +355 -0
  151. package/dist/components/blocks/logo-columns/LogoColumns.css +161 -0
  152. package/dist/components/blocks/logo-columns/LogoColumns.d.ts +23 -0
  153. package/dist/components/blocks/logo-columns/LogoColumns.js +46 -0
  154. package/dist/components/blocks/logo-columns/LogoColumns.types.d.ts +46 -0
  155. package/dist/components/blocks/logo-columns/LogoColumns.types.js +18 -0
  156. package/dist/components/blocks/logo-columns/logo-columns-impl.css +188 -0
  157. package/dist/components/blocks/logo-rows/LogoRows.css +122 -0
  158. package/dist/components/blocks/logo-rows/LogoRows.d.ts +20 -0
  159. package/dist/components/blocks/logo-rows/LogoRows.js +43 -0
  160. package/dist/components/blocks/logo-rows/LogoRows.types.d.ts +36 -0
  161. package/dist/components/blocks/logo-rows/LogoRows.types.js +16 -0
  162. package/dist/components/blocks/logo-rows/logo-rows-impl.css +179 -0
  163. package/dist/components/blocks/page-header/PageHeader.css +79 -0
  164. package/dist/components/blocks/page-header/PageHeader.d.ts +34 -0
  165. package/dist/components/blocks/page-header/PageHeader.js +43 -0
  166. package/dist/components/blocks/page-header/PageHeader.types.d.ts +32 -0
  167. package/dist/components/blocks/page-header/PageHeader.types.js +14 -0
  168. package/dist/components/blocks/page-header/page-header-impl.css +176 -0
  169. package/dist/components/blocks/product-hero/ProductHero.css +86 -0
  170. package/dist/components/blocks/product-hero/ProductHero.d.ts +35 -0
  171. package/dist/components/blocks/product-hero/ProductHero.js +48 -0
  172. package/dist/components/blocks/product-hero/ProductHero.types.d.ts +37 -0
  173. package/dist/components/blocks/product-hero/ProductHero.types.js +15 -0
  174. package/dist/components/blocks/product-hero/product-hero-impl.css +354 -0
  175. package/dist/components/blocks/testimonial-row/TestimonialRow.css +245 -0
  176. package/dist/components/blocks/testimonial-row/TestimonialRow.d.ts +20 -0
  177. package/dist/components/blocks/testimonial-row/TestimonialRow.js +128 -0
  178. package/dist/components/blocks/testimonial-row/TestimonialRow.types.d.ts +54 -0
  179. package/dist/components/blocks/testimonial-row/TestimonialRow.types.js +26 -0
  180. package/dist/components/blocks/testimonial-row/testimonial-row-impl.css +195 -0
  181. package/dist/components/blocks/testimonial-slider/TestimonialSlider.css +181 -0
  182. package/dist/components/blocks/testimonial-slider/TestimonialSlider.d.ts +22 -0
  183. package/dist/components/blocks/testimonial-slider/TestimonialSlider.js +36 -0
  184. package/dist/components/blocks/testimonial-slider/TestimonialSlider.types.d.ts +49 -0
  185. package/dist/components/blocks/testimonial-slider/TestimonialSlider.types.js +21 -0
  186. package/dist/components/blocks/testimonial-slider/testimonial-slider-impl.css +202 -0
  187. package/dist/components/blocks/use-reveal.d.ts +46 -0
  188. package/dist/components/blocks/use-reveal.js +120 -0
  189. package/dist/components/blocks/use-rotation.d.ts +62 -0
  190. package/dist/components/blocks/use-rotation.js +176 -0
  191. package/dist/components/core/accordion-item/AccordionItem.css +6 -5
  192. package/dist/components/core/bottom-sheet/BottomSheet.css +1 -1
  193. package/dist/components/core/button/Button.css +63 -16
  194. package/dist/components/core/button/Button.d.ts +14 -12
  195. package/dist/components/core/button/Button.js +43 -14
  196. package/dist/components/core/button/Button.types.d.ts +9 -14
  197. package/dist/components/core/button/button-impl.css +25 -0
  198. package/dist/components/core/button-icon/ButtonIcon.css +31 -15
  199. package/dist/components/core/button-icon/ButtonIcon.d.ts +2 -2
  200. package/dist/components/core/button-icon/ButtonIcon.js +2 -2
  201. package/dist/components/core/button-icon/ButtonIcon.types.d.ts +4 -4
  202. package/dist/components/core/card/Card.css +13 -4
  203. package/dist/components/core/card/Card.types.d.ts +2 -1
  204. package/dist/components/core/card-body/CardBody.css +11 -6
  205. package/dist/components/core/card-body/CardBody.d.ts +1 -1
  206. package/dist/components/core/card-body/CardBody.js +2 -2
  207. package/dist/components/core/card-body/CardBody.types.d.ts +4 -1
  208. package/dist/components/core/card-body/CardBody.types.js +1 -0
  209. package/dist/components/core/card-button/CardButton.css +13 -4
  210. package/dist/components/core/card-button/CardButton.types.d.ts +2 -1
  211. package/dist/components/core/checkbox/Checkbox.css +8 -1
  212. package/dist/components/core/dropdown-menu/DropdownMenu.css +13 -12
  213. package/dist/components/core/dropdown-menu/DropdownMenu.d.ts +5 -3
  214. package/dist/components/core/dropdown-menu/DropdownMenu.js +5 -3
  215. package/dist/components/core/filter-chip/FilterChip.css +2 -1
  216. package/dist/components/core/footer/footer-impl.css +1 -1
  217. package/dist/components/core/footer-group/FooterGroup.css +8 -7
  218. package/dist/components/core/icon/Icon.css +1 -1
  219. package/dist/components/core/link/Link.css +1 -1
  220. package/dist/components/core/menu-item/MenuItem.css +1 -1
  221. package/dist/components/core/navbar/Navbar.css +7 -8
  222. package/dist/components/core/navbar/Navbar.d.ts +17 -1
  223. package/dist/components/core/navbar/Navbar.js +139 -12
  224. package/dist/components/core/navbar/Navbar.types.d.ts +23 -4
  225. package/dist/components/core/navbar/Navbar.types.js +1 -1
  226. package/dist/components/core/navbar/navbar-impl.css +10 -3
  227. package/dist/components/core/navbar/navbar-material.css +96 -0
  228. package/dist/components/core/navbar-item/NavbarItem.css +4 -4
  229. package/dist/components/core/navbar-menu/NavbarMenu.css +7 -5
  230. package/dist/components/core/navbar-menu/NavbarMenu.d.ts +1 -0
  231. package/dist/components/core/navbar-menu/NavbarMenu.js +1 -0
  232. package/dist/components/core/navbar-menu/navbar-menu-impl.css +7 -7
  233. package/dist/components/core/navbar-switcher/NavbarSwitcher.css +6 -5
  234. package/dist/components/core/navbar-switcher/NavbarSwitcher.d.ts +1 -0
  235. package/dist/components/core/navbar-switcher/NavbarSwitcher.js +2 -1
  236. package/dist/components/core/option/Option.css +1 -1
  237. package/dist/components/core/pagination/Pagination.css +1 -75
  238. package/dist/components/core/pagination/Pagination.d.ts +4 -4
  239. package/dist/components/core/pagination/Pagination.js +11 -51
  240. package/dist/components/core/pagination/Pagination.types.d.ts +5 -17
  241. package/dist/components/core/pagination/Pagination.types.js +1 -3
  242. package/dist/components/core/pagination-dots/PaginationDots.css +60 -0
  243. package/dist/components/core/pagination-dots/PaginationDots.d.ts +25 -0
  244. package/dist/components/core/pagination-dots/PaginationDots.js +104 -0
  245. package/dist/components/core/pagination-dots/PaginationDots.types.d.ts +38 -0
  246. package/dist/components/core/pagination-dots/PaginationDots.types.js +9 -0
  247. package/dist/components/core/removable-chip/RemovableChip.css +3 -3
  248. package/dist/components/core/search-input/SearchInput.css +1 -1
  249. package/dist/components/core/segmented-control/SegmentedControl.css +1 -1
  250. package/dist/components/core/segmented-control-item/SegmentedControlItem.css +1 -1
  251. package/dist/components/core/select/Select.css +2 -1
  252. package/dist/components/core/select-chip/SelectChip.css +14 -7
  253. package/dist/components/core/select-chip/SelectChip.d.ts +1 -1
  254. package/dist/components/core/select-chip/SelectChip.js +7 -4
  255. package/dist/components/core/select-chip/SelectChip.types.d.ts +7 -1
  256. package/dist/components/core/select-chip/SelectChip.types.js +1 -1
  257. package/dist/components/core/select-chip/select-chip-impl.css +14 -3
  258. package/dist/components/core/status-dot/StatusDot.css +1 -1
  259. package/dist/components/core/subdomain-navbar/SubdomainNavbar.css +3 -3
  260. package/dist/components/core/tab/Tab.css +1 -1
  261. package/dist/components/core/tab-list/TabList.css +1 -1
  262. package/dist/components/core/table/table-impl.css +36 -14
  263. package/dist/components/core/table-header-cell/TableHeaderCell.css +5 -5
  264. package/dist/components/core/text-area/TextArea.css +1 -1
  265. package/dist/components/core/text-input/TextInput.css +1 -1
  266. package/dist/components/core/tooltip/Tooltip.css +1 -1
  267. package/dist/components/core/typography/Typography.css +5 -5
  268. package/dist/components/index.d.ts +35 -0
  269. package/dist/components/index.js +30 -0
  270. package/dist/components/logo-data.d.ts +24 -0
  271. package/dist/components/logo-data.js +11 -0
  272. package/dist/components/scroll-data.d.ts +64 -0
  273. package/dist/components/scroll-data.js +17 -0
  274. package/dist/components/testimonial-row-data.d.ts +51 -0
  275. package/dist/components/testimonial-row-data.js +11 -0
  276. package/dist/components/testimonial-slider-data.d.ts +26 -0
  277. package/dist/components/testimonial-slider-data.js +10 -0
  278. package/dist/marketing.css +385 -14
  279. package/package.json +1 -6
@@ -0,0 +1,186 @@
1
+ <!-- GENERATED from cta-banner.contract.json. Do not edit. -->
2
+
3
+ # CtaBanner
4
+
5
+ A full-bleed coral band carrying one short promotion and the action it asks for — the strip that breaks a long page with the one thing the page wants done, or closes it. Coral in both themes, because the brand is the same colour whatever the reader's theme. A headline, a line under it, and an action or two; nothing moves.
6
+
7
+ ## Use when
8
+
9
+ - A short, high-contrast promotion with one clear action — open an account, start trading, download the app
10
+ - The band that closes a page, or breaks a long one, on the action the page exists to produce
11
+
12
+ ## Do not use
13
+
14
+ - Two or three promotions to rotate between → `CtaBannerSlider`
15
+ - The band that opens the page → `LandingHero`
16
+ - A message that needs a picture beside it → `FeatureSplit`
17
+ - Two banners in one view — two coral strips are two demands, and the second makes the first one ordinary
18
+ - More than a headline, a line and two buttons
19
+
20
+ ## Anatomy
21
+
22
+ CtaBanner renders 7 elements. A token binding names the part it applies to.
23
+
24
+ - `root` — `<section>`, class `dds-ctabanner`. The band. It paints color.bg.brand and sets color.fg.on-brand for everything on it, and both are the same in light and dark. A region named by its headline, so a reader can jump to it and past it.
25
+ - `inner` — `<div>`, class `dds-ctabanner__inner`. The measure and the gutter, the same column every band holds its content in: size.content.max, space.inset.page, space.section.default.
26
+ - `content` — `<div>`, class `dds-ctabanner__content`. The message: the headline and its line, then the action. The same column a CtaBannerSlider's slide is, so a banner and a slider read as one band with and without the movement. Its parts arrive the way every block's do — the headline, the line and the actions rising into place a step apart, from block-reveal.css — when the band first comes into view.
27
+ - `text` — `<div>`, class `dds-ctabanner__text`. The headline and the line under it, held to the heading measure so a headline at font.h1 breaks into a few words a line rather than running the width of the band.
28
+ - `title` — `<h2>`, class `dds-ctabanner__title`. The headline. h2 by default because a banner is a section of a page; `headingLevel` moves the level and never the size. `text-wrap: balance` so a two-line headline breaks evenly.
29
+ - `description` — `<p>`, class `dds-ctabanner__description`. The line under the headline, at the description measure. Rendered only when `description` is set.
30
+ - `actions` — `<div>`, class `dds-ctabanner__actions`. The action, or the pair. A row that wraps rather than shrinks, so two buttons on a phone stack instead of squeezing their labels. Rendered only when `actions` is set.
31
+
32
+ Apply these classes from the generated `ctaBannerParts` constant rather than writing the strings by hand.
33
+
34
+ ## Composition
35
+
36
+ - Takes no children. Everything it renders comes from props
37
+ - Never contains: `CtaBanner`, `CtaBannerSlider`, `PageHeader`, `LandingHero`, `ProductHero`, `Footer`, `Navbar` — in children or in any prop that takes a node
38
+
39
+ ## Props
40
+
41
+ ### title — `string` **Required.**
42
+
43
+ Use when: Always — the message, in a few words. Short enough to take in at a glance; a line break goes where the words pause, not where the box runs out.
44
+ Never for: A sentence. The description is for the sentence; the title is what a reader takes in on the way past.
45
+
46
+ ### headingLevel — `h2` | `h3` (default `h2`)
47
+
48
+ - `h2` — The default: a banner is a section of the page, under the page's own h1
49
+ - `h3` — A banner nested inside a section that already carries the h2 it belongs to
50
+
51
+ Use when: Matching the outline of the page around the banner. Size does not change with it — the headline is drawn at font.h1 at either level, the scale and the level being separate decisions.
52
+
53
+ ### description — `string`
54
+
55
+ Use when: A line saying why the action is worth taking — what the reader gets, or how little it costs them.
56
+ Never for: A paragraph. A banner is read at a glance, on the way down a page; copy a reader has to work through is copy they scroll past.
57
+
58
+ ### actions — `node`
59
+
60
+ Accepts: Button, Link
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
+ Never for: A third action, or a primary Button: coral on the coral ground is a button nobody can see.
63
+
64
+ ## Accessibility
65
+
66
+ 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.
67
+
68
+ - Announced as: `region`
69
+ - `Tab` — Moves through the actions in the order they were handed in. Nothing in the band is a composite widget.
70
+ - accessible name from title, so the band is a named region a screen reader can jump to and skip
71
+
72
+ ## Rules
73
+
74
+ - **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.
75
+
76
+ 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.
77
+
78
+ 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.
79
+
80
+ 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.
81
+
82
+ 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.
83
+
84
+ 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
+ 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, Input and Switch simultaneously.
87
+ Guidance only — cannot be checked automatically.
88
+ - **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
+
90
+ 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.
91
+
92
+ 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.
93
+ Guidance only — cannot be checked automatically.
94
+ - **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.
95
+
96
+ 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.
97
+
98
+ 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.
99
+
100
+ 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.
101
+
102
+ 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.
103
+
104
+ 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.
105
+
106
+ 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.
107
+
108
+ 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.
109
+
110
+ 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.
111
+ Guidance only — cannot be checked automatically.
112
+ - **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.
113
+
114
+ 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.
115
+
116
+ 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.
117
+
118
+ 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.
119
+
120
+ 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.
121
+
122
+ 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.
123
+
124
+ 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.
125
+
126
+ 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.
127
+
128
+ 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.
129
+ Guidance only — cannot be checked automatically.
130
+ - **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.
131
+
132
+ 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.
133
+
134
+ 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.
135
+
136
+ 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.
137
+ Guidance only — cannot be checked automatically.
138
+ - **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.
139
+
140
+ 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.
141
+
142
+ 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.
143
+
144
+ 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.
145
+ Guidance only — cannot be checked automatically.
146
+
147
+ ## Anti-examples
148
+
149
+ ❌ CtaBanner for: Two or three promotions to rotate between
150
+ CtaBannerSlider is this band with a slider in it: the same layout, one message in view at a time, moved by dots and a swipe.
151
+ → use `CtaBannerSlider` instead.
152
+
153
+ ❌ CtaBanner for: The band that opens the page
154
+ An opening band is a hero, sized to be the first thing read. A coral strip at the top of a page competes with the navigation above it and the hero it should be.
155
+ → use `LandingHero` instead.
156
+
157
+ ❌ CtaBanner for: A message that needs a picture beside it
158
+ A banner is headline, line and button. A claim made by an image is a FeatureSplit.
159
+ → use `FeatureSplit` instead.
160
+
161
+ ## Example
162
+
163
+ ```tsx
164
+ import { CtaBanner, Button } from '@deriv-com/dds-marketing'
165
+
166
+ <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>} />
167
+ ```
168
+
169
+ ## In use
170
+
171
+ ### One promotion
172
+
173
+ A headline, a line and the action. The coral is the same in both themes, so the action is Button variant="inverse" — a primary Button is coral on coral.
174
+
175
+ ```tsx
176
+ import { Button, CtaBanner } from '@deriv-com/dds-marketing'
177
+
178
+ // Headline, line and action
179
+ <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>} />
180
+
181
+ // A message with no action
182
+ <CtaBanner title="Trading for anyone, anywhere" description="24/7 support in 14 languages, on every platform." />
183
+
184
+ // Nested under a section's own h2
185
+ <CtaBanner title="Trade on any device" headingLevel="h3" />
186
+ ```
@@ -0,0 +1,204 @@
1
+ <!-- GENERATED from cta-banner-slider.contract.json. Do not edit. -->
2
+
3
+ # CtaBannerSlider
4
+
5
+ CtaBanner's layout with a slider in it: the same full-bleed coral band, rotating between two or three short promotions. One message is in view at a time, fading in where the last one was; dots show where the reader is. Coral in both themes, like the banner.
6
+
7
+ ## Use when
8
+
9
+ - Rotating between two or three genuinely different promotions without a hero's weight — open an account, try a tool, download the app
10
+
11
+ ## Do not use
12
+
13
+ - One promotion → `CtaBanner`
14
+ - The band that opens the page → `LandingHero`
15
+ - A message with more than a headline, a line and a button or two → `FeatureSplit`
16
+ - A single message — that is CtaBanner
17
+ - Messages that say the same thing twice, rotated to look like more
18
+ - A slider beside a CtaBanner in the same view — two coral strips are two demands
19
+
20
+ ## Anatomy
21
+
22
+ CtaBannerSlider renders 9 elements. A token binding names the part it applies to.
23
+
24
+ - `root` — `<section>`, class `dds-ctabannerslider`. The band. It paints color.bg.brand and sets color.fg.on-brand for everything on it, the same in light and dark — CtaBanner's ground. A named region announced as a carousel, so a reader can jump to it and past it and knows it moves.
25
+ - `inner` — `<div>`, class `dds-ctabannerslider__inner`. The measure and the gutter, the same column every band holds its content in: size.content.max, space.inset.page, space.section.default.
26
+ - `track` — `<div>`, class `dds-ctabannerslider__track`. The slides, stacked in one place. Every slide sits in the same grid cell, so the band is as tall as its tallest message and nothing below it moves when one changes for another. Only the slide in view is drawn: the rest are at opacity.hidden, inert and hidden from assistive technology. A change is the new slide fading in where the old one stood — no travel, the old one's words gone at once — on motion.duration.slow and motion.easing.shift, the timing the dots move on, so the mark and the message change in the same beat. The words then arrive the way every block's do — the headline, the line and the actions rising into place a step apart, from block-reveal.css — each time a slide comes into view, and when the band first scrolls in. The slide leaving drops its words at once rather than sending them anywhere.
27
+ - `slide` — `<div>`, class `dds-ctabannerslider__slide`. One message, and one stop in the track: its group role, its "2 / 3" name and its inert state are set here. As wide as the banner's measure, never narrower — every slide sits in the same cell, so the band is as tall as the tallest.
28
+ - `text` — `<div>`, class `dds-ctabannerslider__text`. The headline and the line under it, held to the heading measure so a headline at font.h1 breaks into a few words a line rather than running the width of the band.
29
+ - `title` — `<h2>`, class `dds-ctabannerslider__title`. One slide's headline. h2 by default because a banner is a section of a page; `headingLevel` moves the level and never the size. `text-wrap: balance` so a two-line headline breaks evenly.
30
+ - `description` — `<p>`, class `dds-ctabannerslider__description`. The line under one slide's headline, at the description measure — drawn only for a slide that gives one.
31
+ - `actions` — `<div>`, class `dds-ctabannerslider__actions`. One slide's action, or its pair: the primary as Button variant="inverse" tone="brand", the second as Button variant="secondary" tone="brand" — a white tint with a white label. A row that wraps rather than shrinks, so two buttons on a phone stack instead of squeezing their labels. Drawn only for a slide with a primary action.
32
+ - `controls` — `<div>`, class `dds-ctabannerslider__controls`. The way through the slides, under them at the start of the content column: PaginationDots, saying where the reader is and moving to any slide pressed. With the swipe, the dots are the whole of how a reader moves the slider — there are no previous and next steps, by decision.
33
+
34
+ Apply these classes from the generated `ctaBannerSliderParts` constant rather than writing the strings by hand.
35
+
36
+ ## Composition
37
+
38
+ - Takes no children. Everything it renders comes from props
39
+ - Never contains: `CtaBanner`, `CtaBannerSlider`, `PageHeader`, `LandingHero`, `ProductHero`, `Footer`, `Navbar` — in children or in any prop that takes a node
40
+
41
+ ## Props
42
+
43
+ ### slides — `data` `CtaBannerSlide[]` **Required.**
44
+
45
+ Use when: Always. The messages, in the order they rotate — two or three. Each is a headline, a line under it, and up to two actions as a label and a href: the banner draws the primary as Button variant="inverse" tone="brand", near-black in both themes, and the second as the white-tinted secondary, Button tone="brand", so no slide can put a coral button on the coral ground. A secondary is drawn only beside a primary — one action is the primary.
46
+
47
+ An empty list draws nothing — no region with nothing in it. A list of records rather than a child per slide, by decision: the set can come from a CMS, and there is one component to learn rather than two.
48
+ Never for: One message — that is CtaBanner — or a set padded out to rotate. Every slide is a few seconds of a reader's attention, and one that says what another said is a few seconds taken for nothing.
49
+
50
+ ### headingLevel — `h2` | `h3` (default `h2`)
51
+
52
+ - `h2` — The default: a banner is a section of the page, under the page's own h1
53
+ - `h3` — A banner nested inside a section that already carries the h2 it belongs to
54
+
55
+ Use when: Matching the outline of the page around the banner, for every slide's headline at once. Size does not change with it — every headline is drawn at font.h1, the scale and the level being separate decisions.
56
+
57
+ ### autoplay — `boolean` (default `false`)
58
+
59
+ Use when: Whether it advances on its own, holding each slide for motion.duration.dwell. Off by default, so a slider nobody configured stays still. On, it holds while the pointer is over it or focus is inside it, never moves for a reader who asked for less motion, and stops for good once the reader presses anything in it — a slide, its action, a dot — or swipes it. A press stops it for good — the WAI carousel pattern's rule that a reader who has interacted is reading, not watching. That gives a reader a way to stop the rotation, which WCAG 2.2.2 asks for, but not a visible one: nothing says a press will stop it, so a page that needs 2.2.2 met plainly should still offer its own pause, or leave autoplay off.
60
+ Never for: A banner whose slides carry more than a reader can take in during motion.duration.dwell — turn it off rather than shorten the copy to fit the timer.
61
+
62
+ ### label — `string` (default `Promotions`)
63
+
64
+ Use when: The name the banner is announced by — a region a screen reader can jump to and skip. Name what it holds, not that it is a banner: 'Promotions', 'Offers'. Translate it with the page.
65
+
66
+ ### controlsLabel — `string` (default `Slides`)
67
+
68
+ Use when: The name the dots are announced by, as a group inside the banner. Its own name rather than the banner's, so a screen reader moving into the dots hears what they are rather than 'Promotions' a second time. Translate it with the page, like label.
69
+
70
+ ### slideLabel — `string` (default `Slide`)
71
+
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
+
74
+ ## Accessibility
75
+
76
+ 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.
77
+
78
+ - Announced as: `region`
79
+ - `Tab` — Moves through the actions of the slide in view, then the dots. Slides out of view are inert, so Tab never reaches a button the reader cannot see.
80
+ - `Enter` — On a dot, moves to that slide
81
+ - The headline of the slide in view is a real heading, so a reader moving by heading finds the message as well as the banner around it. Slides out of view are inert, so they are not in the heading list until they are in view.
82
+ - accessible name from label, so the banner is a named region a reader can jump to and skip
83
+ - Every slide out of view is inert and hidden from assistive technology, and the one in view is named by its position — '2 / 3' — so a reader knows where they are without seeing the dots
84
+ - No rotation for a reader who asked for less motion: autoplay is off under prefers-reduced-motion, and a slide changes without travelling
85
+ - Under autoplay, a hold while the pointer is over the banner or focus is inside it, no movement for a reader who asked for less motion, and a stop for good once the reader presses anything in it or swipes it. No pause control is drawn, so the way to stop it is a press, which nothing on screen announces
86
+
87
+ ## Rules
88
+
89
+ - **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.
90
+
91
+ 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.
92
+
93
+ 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.
94
+
95
+ 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.
96
+
97
+ 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.
98
+
99
+ 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
+ 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, Input and Switch simultaneously.
102
+ Guidance only — cannot be checked automatically.
103
+ - **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
+
105
+ 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.
106
+
107
+ 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.
108
+ Guidance only — cannot be checked automatically.
109
+ - **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.
110
+
111
+ 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.
112
+
113
+ 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.
114
+
115
+ 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.
116
+
117
+ 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.
118
+
119
+ 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.
120
+
121
+ 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.
122
+
123
+ 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.
124
+
125
+ 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.
126
+ Guidance only — cannot be checked automatically.
127
+ - **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.
128
+
129
+ 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.
130
+
131
+ 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.
132
+
133
+ 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.
134
+
135
+ 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.
136
+
137
+ 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.
138
+
139
+ 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.
140
+
141
+ 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.
142
+
143
+ 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.
144
+ Guidance only — cannot be checked automatically.
145
+ - **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.
146
+
147
+ 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.
148
+
149
+ 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.
150
+
151
+ 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.
152
+ Guidance only — cannot be checked automatically.
153
+ - **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.
154
+
155
+ 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.
156
+
157
+ 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.
158
+
159
+ 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.
160
+ Guidance only — cannot be checked automatically.
161
+
162
+ ## Anti-examples
163
+
164
+ ❌ CtaBannerSlider for: One promotion
165
+ A slider of one has nothing to move to. CtaBanner is the same band with the message on it and no timer, no controls and nothing to announce as a carousel.
166
+ → use `CtaBanner` instead.
167
+
168
+ ❌ CtaBannerSlider for: The band that opens the page
169
+ An opening band is a hero, sized to be the first thing read. A coral strip at the top of a page competes with the navigation above it and the hero it should be.
170
+ → use `LandingHero` instead.
171
+
172
+ ❌ CtaBannerSlider for: A message with more than a headline, a line and a button or two
173
+ A slide is a short promotion read at a glance, and its actions are a label and a href the banner draws. A message that needs an image or its own controls is a FeatureSplit.
174
+ → use `FeatureSplit` instead.
175
+
176
+ ## Example
177
+
178
+ ```tsx
179
+ import { CtaBannerSlider } from '@deriv-com/dds-marketing'
180
+
181
+ <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"}}]} />
182
+ ```
183
+
184
+ ## In use
185
+
186
+ ### Rotating between promotions
187
+
188
+ One slide in view, dots to move between them. It holds while hovered or focused, stops once pressed, and stays still for a reader who asked for less motion.
189
+
190
+ ```tsx
191
+ import { CtaBannerSlider } from '@deriv-com/dds-marketing'
192
+
193
+ // Two slides, rotating
194
+ <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"}}]} autoplay />
195
+
196
+ // Two slides, moved by hand only
197
+ <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"}}]} />
198
+
199
+ // A slide with a primary and a secondary action
200
+ <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"}}]} />
201
+
202
+ // Headlines at h3, under a section's h2 — they look the same
203
+ <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
+ ```
@@ -147,6 +147,14 @@ The target and the mark are separate decisions, and conflating them is what prod
147
147
 
148
148
  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.
149
149
  Guidance only — cannot be checked automatically.
150
+ - **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.
151
+
152
+ 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.
153
+
154
+ 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.
155
+
156
+ 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.
157
+ Guidance only — cannot be checked automatically.
150
158
 
151
159
  ## Anti-examples
152
160
 
@@ -6,7 +6,7 @@ A button that opens a short set of destinations. Pressing one goes somewhere and
6
6
 
7
7
  It is the host MenuItem was written against. A row whose role is menuitem means nothing to a screen reader outside an element whose role is menu, so until this landed MenuItem was a contract and a stylesheet waiting for one. What this adds is everything a row cannot know about itself: that there is a set, how long it is, which one the reader is on, and that Escape puts them back on the button they pressed.
8
8
 
9
- The trigger is drawn here by default rather than passed in, which is where this parts company with product's menu of the same name. There the trigger is a Button handed over, on the argument that Button is where a button is decided. Marketing's Button cannot take that job: it is an anchor with a required href — a link, always — and a link that opens a menu is a link that does not navigate. ButtonIcon renders a real button but takes no words, and a set of destinations is chosen by reading them. So there is no button-with-words in this package to hand in, and the trigger is this component's to draw. That argument still holds and is the reason the drawn trigger is the default. What it does not cover is a trigger with no words at all: A control with no words is exactly what the paragraph above rules out for a set of destinations, and exactly right for a set of page numbers, which are read by their shape rather than their wording. What gets passed is the caller's business — ButtonIcon, or a button they drew themselves, which is what Pagination's break turned out to need. So `trigger` exists for that case — Pagination's break between two runs of pages — and for no other. Pass nothing and this still draws the whole thing, chevron included.
9
+ The trigger is drawn here by default rather than passed in, which is where this parts company with product's menu of the same name. There the trigger is a Button handed over, on the argument that Button is where a button is decided. Marketing's Button could not take that job when this was built: it was an anchor with a required href — a link, always — and a link that opens a menu is a link that does not navigate. It now renders a button when given no href, so that reason no longer holds on its own. ButtonIcon renders a real button but takes no words, and a set of destinations is chosen by reading them. So there is no button-with-words in this package to hand in, and the trigger is this component's to draw. That argument still holds and is the reason the drawn trigger is the default. What it does not cover is a trigger with no words at all: A control with no words is exactly what the paragraph above rules out for a set of destinations, and exactly right for a set of page numbers, which are read by their shape rather than their wording. What gets passed is the caller's business — ButtonIcon, or a button they drew themselves, which is what Pagination's break turned out to need. So `trigger` exists for that case — Pagination's break between two runs of pages — and for no other. Pass nothing and this still draws the whole thing, chevron included.
10
10
 
11
11
  A marketing page reaches for a menu where a set of destinations is too long to sit in the navigation and too short to deserve a page — the languages a site is published in, the regions it operates in, the pages a long index skipped over. Not for a toolbar of operations: a page has nothing to operate on, which is the whole difference from the menus an application builds.
12
12
 
@@ -34,7 +34,7 @@ DropdownMenu renders 6 elements. A token binding names the part it applies to.
34
34
  Inline rather than a block, because a menu button sits in a row of other things: a navigation bar, a footer column, the end of a band. A block root would take the width of whatever contains it and put the trigger at the start of an empty line.
35
35
  - `trigger` — `<button>`, class `dds-dropdownmenu__trigger`. The button that opens it, drawn here unless one is handed in.
36
36
 
37
- That is the one structural difference from product's menu, and it is forced rather than chosen: this package's Button is an anchor with a required href, so it is a link and cannot 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.
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
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-view` is the rule that says why. One look, because there is one job.
40
40
 
@@ -48,7 +48,7 @@ DropdownMenu renders 6 elements. A token binding names the part it applies to.
48
48
 
49
49
  Plain, it gives up the edge and nothing else. The target is the same size, the ground under a pointer is the same, and the focus ring is untouched — a control that shed its outline and its focus ring together would be one a keyboard reader could no longer find. `border.width.none` against the `border-style: solid` above rather than a second border-style: one property carries the difference, and the style stays where it is so nothing has to be put back.
50
50
 
51
- And plain, it takes the ink around it rather than naming one. The variant's whole premise is that something else has already said what this is — which means something else has also decided what colour reads on it. `color.fg.default` is a near-black chosen for paper, and a switcher carrying it into a bar standing on a dark hero is the one thing in that bar nobody can read. Link and Button both give up their ink the same way and call it `tone="inherit"`; here it is not a second axis, because a plain control has already given up its edge and its ground and there is no version of it that should keep its own colour.
51
+ And plain, it takes the ink around it rather than naming one. The variant's whole premise is that something else has already said what this is — which means something else has also decided what colour reads on it. `color.fg.default` is a near-black chosen for paper, and a switcher carrying it into a bar standing on a dark hero is the one thing in that bar nobody can read. Link gives up its ink the same way and calls it `tone="inherit"`; here it is not a second axis, because a plain control has already given up its edge and its ground and there is no version of it that should keep its own colour.
52
52
 
53
53
  Plain at the small step is the one place the two axes come apart. `size` sets the type and the height together, which is right for a control standing on its own — but a bar wants the smaller type in a finger-sized target, which is exactly what the destinations beside it are: `font.label.sm` in a box of `size.control.md`. Without this the switcher was eight pixels shorter than its neighbours and the difference was invisible until a pointer landed on it and drew a fill that did not match the row.
54
54
 
@@ -150,7 +150,7 @@ Never for: A menu whose rows do something on the spot rather than go somewhere.
150
150
  ### trigger — `node`
151
151
 
152
152
  Use when: A control this component should open rather than draw — one whose mark is the whole of it, with no words to read. A ButtonIcon is the obvious candidate and not the only one: Pagination's break between two runs of page numbers passes a button of its own, because it has to match the numbered targets either side of it and this package's ButtonIcon has no transparent form to do that with. Given one, `icon` and `label`'s words go unused: what is drawn is what was passed. What this component still supplies is the half a page gets wrong — that the control announces a menu and whether it is open, that Escape returns focus to it, and that the arrow keys move through the rows.
153
- Never for: Anything that is not a button. A menu opened by a div is a menu a keyboard cannot reach, and one opened by this package's Button is a link that does not navigate — Button is an anchor here, which is the reason this component drew its own trigger to begin with. Nor for a control with words on it, which is what the drawn trigger is already for and does better, the chevron included.
153
+ Never for: Anything that is not a button. A menu opened by a div is a menu a keyboard cannot reach, and one opened by this package's Button with an href is a link that does not navigate — Button was an anchor always when this component drew its own trigger, which is why it did. Nor for a control with words on it, which is what the drawn trigger is already for and does better, the chevron included.
154
154
 
155
155
  ### open — `boolean`
156
156
 
@@ -188,7 +188,7 @@ Guaranteed by the component. Write none of it by hand: the ids these attributes
188
188
  - shutting returns focus to the trigger. A menu that shuts and leaves focus where the surface was drops a keyboard visitor at the top of the document, several tabs from the button they pressed
189
189
  - a row that cannot be used stays in the menu and is announced as unavailable rather than being removed. A set that changes shape between openings is one a visitor has to learn twice
190
190
  - the menu is absent from the document when shut rather than hidden, so no destination is reachable by a visitor tabbing past a closed button
191
- - the trigger is a real button. A menu opened by a div is a menu a keyboard cannot reach, and one opened by a link is a link that does not navigate — which is why this package's own Button, an anchor with a required href, could not be the trigger
191
+ - the trigger is a real button. A menu opened by a div is a menu a keyboard cannot reach, and one opened by a link is a link that does not navigate — which is why this package's own Button, then an anchor with a required href, could not be the trigger
192
192
 
193
193
  ## Rules
194
194
 
@@ -256,6 +256,14 @@ The target and the mark are separate decisions, and conflating them is what prod
256
256
 
257
257
  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.
258
258
  Guidance only — cannot be checked automatically.
259
+ - **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.
260
+
261
+ 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.
262
+
263
+ 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.
264
+
265
+ 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.
266
+ Guidance only — cannot be checked automatically.
259
267
 
260
268
  ## Anti-examples
261
269