@deriv-com/dds-marketing 0.2.0 → 1.0.1

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 (281) hide show
  1. package/.llm/components/accordion.md +9 -1
  2. package/.llm/components/accordionitem.md +9 -1
  3. package/.llm/components/aspectratio.md +9 -1
  4. package/.llm/components/badge.md +9 -1
  5. package/.llm/components/bottomsheet.md +9 -1
  6. package/.llm/components/breadcrumb.md +9 -1
  7. package/.llm/components/breadcrumbitem.md +9 -1
  8. package/.llm/components/button.md +55 -27
  9. package/.llm/components/buttonicon.md +16 -8
  10. package/.llm/components/card.md +16 -2
  11. package/.llm/components/cardbody.md +29 -3
  12. package/.llm/components/cardbutton.md +16 -2
  13. package/.llm/components/checkbox.md +9 -1
  14. package/.llm/components/ctabanner.md +186 -0
  15. package/.llm/components/ctabannerslider.md +204 -0
  16. package/.llm/components/divider.md +9 -1
  17. package/.llm/components/dropdownmenu.md +15 -7
  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 +9 -1
  24. package/.llm/components/footer.md +9 -1
  25. package/.llm/components/footergroup.md +9 -1
  26. package/.llm/components/grid.md +9 -1
  27. package/.llm/components/icon.md +21 -3
  28. package/.llm/components/landinghero.md +254 -0
  29. package/.llm/components/link.md +13 -5
  30. package/.llm/components/logocolumns.md +235 -0
  31. package/.llm/components/logorows.md +212 -0
  32. package/.llm/components/menuitem.md +9 -1
  33. package/.llm/components/navbar.md +80 -16
  34. package/.llm/components/navbaritem.md +10 -2
  35. package/.llm/components/navbarmenu.md +9 -1
  36. package/.llm/components/navbarmenugroup.md +9 -1
  37. package/.llm/components/navbarpanel.md +10 -2
  38. package/.llm/components/navbarswitcher.md +10 -2
  39. package/.llm/components/navbarswitcheroption.md +9 -1
  40. package/.llm/components/option.md +9 -1
  41. package/.llm/components/pageheader.md +231 -0
  42. package/.llm/components/pagination.md +27 -90
  43. package/.llm/components/paginationdots.md +215 -0
  44. package/.llm/components/producthero.md +248 -0
  45. package/.llm/components/removablechip.md +9 -1
  46. package/.llm/components/row.md +9 -1
  47. package/.llm/components/scroller.md +9 -1
  48. package/.llm/components/searchinput.md +9 -1
  49. package/.llm/components/segmentedcontrol.md +9 -1
  50. package/.llm/components/segmentedcontrolitem.md +9 -1
  51. package/.llm/components/select.md +9 -1
  52. package/.llm/components/selectchip.md +57 -16
  53. package/.llm/components/spinner.md +9 -1
  54. package/.llm/components/stack.md +9 -1
  55. package/.llm/components/statusdot.md +9 -1
  56. package/.llm/components/subdomainnavbar.md +9 -1
  57. package/.llm/components/tab.md +11 -3
  58. package/.llm/components/table.md +9 -1
  59. package/.llm/components/tablebody.md +9 -1
  60. package/.llm/components/tablecell.md +9 -1
  61. package/.llm/components/tablehead.md +9 -1
  62. package/.llm/components/tableheadercell.md +9 -1
  63. package/.llm/components/tablerow.md +9 -1
  64. package/.llm/components/tablist.md +9 -1
  65. package/.llm/components/testimonialrow.md +235 -0
  66. package/.llm/components/testimonialslider.md +254 -0
  67. package/.llm/components/textarea.md +9 -1
  68. package/.llm/components/textinput.md +9 -1
  69. package/.llm/components/tooltip.md +9 -1
  70. package/.llm/components/typography.md +9 -1
  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 +43 -9
  97. package/.llm/tokens.md +56 -12
  98. package/AGENTS.md +32 -8
  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/link/Link.js +5 -5
  221. package/dist/components/core/menu-item/MenuItem.css +1 -1
  222. package/dist/components/core/navbar/Navbar.css +7 -8
  223. package/dist/components/core/navbar/Navbar.d.ts +17 -1
  224. package/dist/components/core/navbar/Navbar.js +139 -12
  225. package/dist/components/core/navbar/Navbar.types.d.ts +23 -4
  226. package/dist/components/core/navbar/Navbar.types.js +1 -1
  227. package/dist/components/core/navbar/navbar-impl.css +10 -3
  228. package/dist/components/core/navbar/navbar-material.css +96 -0
  229. package/dist/components/core/navbar-item/NavbarItem.css +4 -4
  230. package/dist/components/core/navbar-menu/NavbarMenu.css +7 -5
  231. package/dist/components/core/navbar-menu/NavbarMenu.d.ts +1 -0
  232. package/dist/components/core/navbar-menu/NavbarMenu.js +1 -0
  233. package/dist/components/core/navbar-menu/navbar-menu-impl.css +7 -7
  234. package/dist/components/core/navbar-switcher/NavbarSwitcher.css +6 -5
  235. package/dist/components/core/navbar-switcher/NavbarSwitcher.d.ts +1 -0
  236. package/dist/components/core/navbar-switcher/NavbarSwitcher.js +2 -1
  237. package/dist/components/core/option/Option.css +1 -1
  238. package/dist/components/core/pagination/Pagination.css +1 -75
  239. package/dist/components/core/pagination/Pagination.d.ts +4 -4
  240. package/dist/components/core/pagination/Pagination.js +11 -51
  241. package/dist/components/core/pagination/Pagination.types.d.ts +5 -17
  242. package/dist/components/core/pagination/Pagination.types.js +1 -3
  243. package/dist/components/core/pagination-dots/PaginationDots.css +60 -0
  244. package/dist/components/core/pagination-dots/PaginationDots.d.ts +25 -0
  245. package/dist/components/core/pagination-dots/PaginationDots.js +104 -0
  246. package/dist/components/core/pagination-dots/PaginationDots.types.d.ts +38 -0
  247. package/dist/components/core/pagination-dots/PaginationDots.types.js +9 -0
  248. package/dist/components/core/removable-chip/RemovableChip.css +3 -3
  249. package/dist/components/core/search-input/SearchInput.css +1 -1
  250. package/dist/components/core/segmented-control/SegmentedControl.css +1 -1
  251. package/dist/components/core/segmented-control-item/SegmentedControlItem.css +1 -1
  252. package/dist/components/core/select/Select.css +2 -1
  253. package/dist/components/core/select-chip/SelectChip.css +14 -7
  254. package/dist/components/core/select-chip/SelectChip.d.ts +1 -1
  255. package/dist/components/core/select-chip/SelectChip.js +7 -4
  256. package/dist/components/core/select-chip/SelectChip.types.d.ts +7 -1
  257. package/dist/components/core/select-chip/SelectChip.types.js +1 -1
  258. package/dist/components/core/select-chip/select-chip-impl.css +14 -3
  259. package/dist/components/core/status-dot/StatusDot.css +1 -1
  260. package/dist/components/core/subdomain-navbar/SubdomainNavbar.css +3 -3
  261. package/dist/components/core/tab/Tab.css +1 -1
  262. package/dist/components/core/tab/Tab.types.d.ts +1 -1
  263. package/dist/components/core/tab-list/TabList.css +1 -1
  264. package/dist/components/core/table/table-impl.css +36 -14
  265. package/dist/components/core/table-header-cell/TableHeaderCell.css +5 -5
  266. package/dist/components/core/text-area/TextArea.css +1 -1
  267. package/dist/components/core/text-input/TextInput.css +1 -1
  268. package/dist/components/core/tooltip/Tooltip.css +1 -1
  269. package/dist/components/core/typography/Typography.css +5 -5
  270. package/dist/components/index.d.ts +35 -0
  271. package/dist/components/index.js +30 -0
  272. package/dist/components/logo-data.d.ts +24 -0
  273. package/dist/components/logo-data.js +11 -0
  274. package/dist/components/scroll-data.d.ts +64 -0
  275. package/dist/components/scroll-data.js +17 -0
  276. package/dist/components/testimonial-row-data.d.ts +51 -0
  277. package/dist/components/testimonial-row-data.js +11 -0
  278. package/dist/components/testimonial-slider-data.d.ts +26 -0
  279. package/dist/components/testimonial-slider-data.js +10 -0
  280. package/dist/marketing.css +385 -14
  281. package/package.json +1 -6
@@ -96,7 +96,7 @@ This is the phone's breakpoint, size.breakpoint.md, and not the wider one that d
96
96
 
97
97
  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.
98
98
  Guidance only — cannot be checked automatically.
99
- - **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.
99
+ - **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.
100
100
  Guidance only — cannot be checked automatically.
101
101
  - **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.
102
102
 
@@ -148,6 +148,14 @@ The target and the mark are separate decisions, and conflating them is what prod
148
148
 
149
149
  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.
150
150
  Guidance only — cannot be checked automatically.
151
+ - **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.
152
+
153
+ 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.
154
+
155
+ 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.
156
+
157
+ 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.
158
+ Guidance only — cannot be checked automatically.
151
159
 
152
160
  ## Anti-examples
153
161
 
@@ -0,0 +1,235 @@
1
+ <!-- GENERATED from testimonial-row.contract.json. Do not edit. -->
2
+
3
+ # TestimonialRow
4
+
5
+ A section that lets a review service's numbers back the page: a heading with the overall rating under it — and a way to where the reviews were collected — over a row of rated reviews the reader moves along, each a short review under its star rating with the reviewer's name, and two arrows under the row that step it a card at a time. Several are in view at once and nothing moves on its own.
6
+
7
+ The reference design's Testimonial in its review-row form. It names no review platform: the score, its wording and where it links are the page's, so the same section serves whichever service the reviews came from.
8
+
9
+ ## Use when
10
+
11
+ - Five to ten short, rated reviews collected by a review service, where seeing several at once is the point and the overall score is worth stating
12
+ - A page that has made its claims and wants customers' own ratings to back them — a homepage's "What our customers say"
13
+
14
+ ## Do not use
15
+
16
+ - Two to five quotes the page chose, from partners or customers, each a few sentences and read one at a time → `TestimonialSlider`
17
+ - A single review → `FeatureSplit`
18
+ - Reviews nobody wrote, or a rating nobody gave. The stars and the summary are a score in a review service's name — keep each rating and the overall score in step with the source, and link to it, or leave them out
19
+ - A review service's own marks. Its logo, wordmark and brand colour belong to its own widget, under its own rules; this draws each card's stars in the page's accent and names the service in words
20
+ - Long reviews. A card is read on the way along the row; one that needs more than a sentence or two is a review the reader skips
21
+
22
+ ## Anatomy
23
+
24
+ TestimonialRow renders 20 elements. A token binding names the part it applies to.
25
+
26
+ - `root` — `<section>`, class `dds-testimonialrow`. The section. It paints the ground and the ink to go with it — see `ground` — and asks its own width, which is what the row's breakout and the cards' share of it are measured against. A region named by its heading.
27
+ - `inner` — `<div>`, class `dds-testimonialrow__inner`. The measure and the gutter, the same column every band holds its content in.
28
+ - `header` — `<div>`, class `dds-testimonialrow__header`. The heading and the overall rating under it, FeatureCards' header and its arrangement: ranged to the start on a phone and centred from the fold. It sets no gap: each part's own margin is the step.
29
+ - `title` — `<h2>`, class `dds-testimonialrow__title`. Whose reviews these are. `h2`, ranged to the start on a phone and centred from the fold with the rating under it, as every other block's heading is.
30
+ - `summary` — `<p>`, class `dds-testimonialrow__summary`. The overall rating, in the page's words, under the heading as the section's description: a standalone Link to where the reviews were collected when the summary gives an `href` — brand ink and a mark, taking the band's ink on the dark band — or plain words without one. Held to the description measure. Drawn only for a section given a `summary`. Rendered only when `summary` is set.
31
+ - `carousel` — `<div>`, class `dds-testimonialrow__carousel`. The row and the footer under it, held together at space.gap.xl — closer than the section's own step from the heading, so the arrows read as belonging to the row.
32
+ - `track` — `<div>`, class `dds-testimonialrow__track`. The row: the cards side by side at space.grid.gutter, the space between cards wherever they sit, scrolling across with a stop at each card. It runs out to the band's edges while its first card lines up with the heading — a gutter on the row itself that scrolls away with it, so a card is cut off by the band rather than by the column. A named group with a tab stop of its own, Scroller's rule, so a keyboard can reach the cards a pointer scrolls to. No scrollbar: the arrows under it are the standing sign that it moves.
33
+ - `review-link` — `<a>`, class `dds-testimonialrow__review-link`. For a review that gives an `href`: the whole card is a link to it, wrapping the card's figure, opening in a new tab. It is what takes the row's measure. Its name is the card's words — stars, review and reviewer — which is what a reader is choosing between. Lifts on hover the way CardButton does.
34
+ - `item` — `<figure>`, class `dds-testimonialrow__item`. One review, in a card: a `figure`, so the words and the person they are attributed to are one thing to assistive technology. The card's fill follows the ground — see `ground`. Most of the column on a phone, two and a half across from the fold and three and a half from 64rem, so one is always cut off; every card as tall as the row and never shorter than size.review-card.min, its stars above the words and the reviewer's name at its foot.
35
+ - `rating` — `<span>`, class `dds-testimonialrow__rating`. A card's five stars, filled to its rating — whole and half stars — in the brand's accent. One image to assistive technology, named by `ratingLabel`, so it is heard as a score rather than as five pictures. Drawn only for a review that gives a rating.
36
+ - `star` — `<span>`, class `dds-testimonialrow__star`. One star: an empty star with a filled one laid over it in the same cell. A half star clips the fill to its first half — the right half in a right-to-left page.
37
+ - `star-track` — `<svg>`, class `dds-testimonialrow__star-track`. The empty star, in the accent at opacity.track — the track the fill travels over, drawn in one colour with it so it reads on every ground and in both themes without a colour of its own.
38
+ - `star-fill` — `<svg>`, class `dds-testimonialrow__star-fill`. The filled star, in the accent at full strength. Drawn only for a star the rating reaches.
39
+ - `quote` — `<blockquote>`, class `dds-testimonialrow__quote`. What was said, at the body step. It fills the card, so the reviewer's name sits at the foot of every card in the row.
40
+ - `author` — `<figcaption>`, class `dds-testimonialrow__author`. Who wrote it: their name, and where they are if the review gives it.
41
+ - `name` — `<span>`, class `dds-testimonialrow__name`. Who wrote it — the name the review service shows.
42
+ - `detail` — `<span>`, class `dds-testimonialrow__detail`. Where they are, quieter than the name. Drawn only for a review that gives one. Muted on the page and the grey band; on the dark band it takes color.fg.muted-inverse, the band's own quieter ink.
43
+ - `footer` — `<div>`, class `dds-testimonialrow__footer`. The arrows, back in the column under the row. Ranged to the start on a phone, with the heading and the cards; centred from the fold, so the way through the row sits under the middle of it. Drawn only for two reviews or more: one review has no arrows, and an empty footer would still open the gap under the row.
44
+ - `nav` — `<div>`, class `dds-testimonialrow__nav`. Two ButtonIcons in their secondary variant — Button's secondary drawn as a circle, and a carousel's two directions, the case that variant names — stepping the row back and on by one card and the gap after it. Drawn for two reviews or more, and hidden while the row has nowhere to go in either direction. On the dark band they take the inverse tone, which keeps the tint and turns it white.
45
+ - `nav-slot` — `<span>`, class `dds-testimonialrow__nav-slot`. Where one arrow stands. At either end of the row the arrow that has nowhere to go stays in its slot, receded to opacity.disabled and inert — so both directions show from the first render, the pair keeps its width and does not shift as the reader scrolls, and a keyboard never lands on a control that does nothing. ButtonIcon has no disabled state, by its own ruling, which is why this is its slot's job.
46
+
47
+ Apply these classes from the generated `testimonialRowParts` constant rather than writing the strings by hand.
48
+
49
+ ## Composition
50
+
51
+ - Takes no children. Everything it renders comes from props
52
+ - Never contains: `TestimonialRow`, `TestimonialSlider`, `LandingHero`, `ProductHero`, `PageHeader`, `Footer`, `Navbar` — in children or in any prop that takes a node
53
+
54
+ ## Props
55
+
56
+ ### ground — `page` | `subtle` | `strong` (default `page`)
57
+
58
+ - `page` — The default, and the page's own white. The cards are the recessed gray that sets them off
59
+ - `subtle` — The grey band, the reference design's ground for this section. The cards turn white on it. Painted as the band's tint laid over the page's own ground, so it is the same grey whatever is behind the section
60
+ - `strong` — `color.bg.brand-strong`, the dark band, for a section a reader should arrive at. The heading, the summary and the cards' words turn white, and the cards take color.bg.surface-card-strong — gray.900 in both themes, the colour a page card takes in dark mode — so the band reads as a dark-mode section in either theme. The arrows take ButtonIcon's inverse tone
61
+
62
+ Use when: Which of the page's grounds the section paints, and with it the cards' fill: the recessed surface on the page, the raised white on the grey band — the reference design's slate band — and the strong card on the dark band, gray.900 in both themes.
63
+ Never for: Marking importance. Every section on a page painted a ground is a page with no emphasis left. And never a dark card on the dark band: a few sentences of white on dark gray is a paragraph a reader works through rather than a quote they take in.
64
+
65
+ ### title — `string` **Required.**
66
+
67
+ Use when: Always. Whose reviews these are, in a few words — "What our customers say".
68
+ Never for: A review, or the score. The reviews are the content and the summary states the score; the heading says whose they are.
69
+
70
+ ### reviews — `data` `TestimonialRowReview[]` **Required.**
71
+
72
+ Use when: Always. The reviews, in the order they run along the row — five to ten of a sentence or two, each with the reviewer's name, its `rating` and, where there is one, the `href` of the review itself. An empty list draws nothing.
73
+ Never for: A review that was not written by the person named, or a rating changed from the one they gave.
74
+
75
+ ### summary — `data` `TestimonialRowSummary`
76
+
77
+ Use when: The overall rating, in the page's own words under the heading — "Rated 4.5 out of 5 on our review site" — as a standalone Link to where the reviews were collected when it has an `href`. Words rather than stars: they name the service, they are translated with the page, and the score is stated once rather than drawn beside a sentence that already says it.
78
+ Never for: A number the source does not show today.
79
+
80
+ ### ratingLabel — `callback`
81
+
82
+ Use when: The accessible name of a card's stars, given its rating as drawn — rounded to the nearest half, so what is heard is what is seen. The stars are drawn rather than written, so this is what a screen reader hears for them. Without it they are named "Rated 5 out of 5"; pass it to translate that with the page.
83
+ Never for: Visible text. It names the stars to assistive technology and is never drawn.
84
+
85
+ ### label — `string` (default `Reviews`)
86
+
87
+ Use when: The name the row is announced by. The row is a scrolling region a keyboard has to be able to reach, so it carries a tab stop and a name of its own — Scroller's rule. Its own name rather than the section's, so a screen reader moving into it hears what it is. Translate it with the page.
88
+
89
+ ### previousLabel — `string` (default `Previous reviews`)
90
+
91
+ Use when: The accessible name of the arrow stepping the row back. A glyph announces nothing, so this is the whole of the control's name. Translate it with the page, and keep it parallel to nextLabel.
92
+
93
+ ### nextLabel — `string` (default `Next reviews`)
94
+
95
+ Use when: The accessible name of the arrow stepping the row on, for the reason previousLabel exists.
96
+
97
+ ## Accessibility
98
+
99
+ 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.
100
+
101
+ - Announced as: `region`
102
+ - `Tab` — Moves to the row, then through any review that links, then to the arrows that have somewhere to go.
103
+ - `Enter` — On a review that links, opens it. On an arrow, steps the row by one card.
104
+ - `ArrowLeft` — On the focused row: scrolls it the way the key points — the browser's own scrolling, made reachable by the row's tab stop. Towards the start in a left-to-right page, towards the end in a right-to-left one.
105
+ - `ArrowRight` — On the focused row: scrolls it the way the key points, the mirror of ArrowLeft.
106
+ - accessible name from title, so the section is a named region a reader can jump to and skip
107
+ - Each review is a figure holding a blockquote and its figcaption, so the words and the person they are attributed to are announced together.
108
+ - The row is a named group with a tab stop of its own, so a keyboard can reach and scroll it whether or not any review links.
109
+ - Each card's stars are one image named by its rating, and an arrow with nowhere to go is drawn receded and inert rather than left a control that does nothing.
110
+
111
+ ## Rules
112
+
113
+ - **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.
114
+
115
+ 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.
116
+
117
+ 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.
118
+
119
+ 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.
120
+
121
+ 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.
122
+
123
+ 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.
124
+ Guidance only — cannot be checked automatically.
125
+ - **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.
126
+ Guidance only — cannot be checked automatically.
127
+ - **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.
128
+
129
+ 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.
130
+
131
+ 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.
132
+ Guidance only — cannot be checked automatically.
133
+ - **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.
134
+
135
+ 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.
136
+
137
+ 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.
138
+
139
+ 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.
140
+
141
+ 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.
142
+
143
+ 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.
144
+
145
+ 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.
146
+
147
+ 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.
148
+
149
+ 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.
150
+ Guidance only — cannot be checked automatically.
151
+ - **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.
152
+
153
+ 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.
154
+
155
+ 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.
156
+
157
+ 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.
158
+
159
+ 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.
160
+
161
+ 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.
162
+
163
+ 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.
164
+
165
+ 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.
166
+
167
+ 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.
168
+ Guidance only — cannot be checked automatically.
169
+ - **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.
170
+
171
+ 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.
172
+
173
+ 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.
174
+
175
+ 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.
176
+ Guidance only — cannot be checked automatically.
177
+ - **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.
178
+
179
+ 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.
180
+
181
+ 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.
182
+
183
+ 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.
184
+ Guidance only — cannot be checked automatically.
185
+
186
+ ## Anti-examples
187
+
188
+ ❌ TestimonialRow for: Two to five quotes the page chose, from partners or customers, each a few sentences and read one at a time
189
+ A chosen quote has no score and deserves the reader's full attention; TestimonialSlider shows one at a time, with the name of who said it
190
+ → use `TestimonialSlider` instead.
191
+
192
+ ❌ TestimonialRow for: A single review
193
+ One review is not a row; set it beside a picture as a split, or leave the score to the page's own copy
194
+ → use `FeatureSplit` instead.
195
+
196
+ ## Example
197
+
198
+ ```tsx
199
+ import { TestimonialRow } from '@deriv-com/dds-marketing'
200
+
201
+ <TestimonialRow title="What our customers say" reviews={[{"quote":"Trading with Deriv has been great. Low spreads, and withdrawals reach me quickly.","name":"A Deriv customer","rating":5,"href":"https://example.com/reviews/1","detail":"United Kingdom"},{"quote":"An easy, smooth trading experience — the platform does what I need without getting in the way.","name":"A Deriv customer","rating":5,"href":"https://example.com/reviews/2","detail":"Malaysia"},{"quote":"Support answered my question about deposits within minutes, in my own language.","name":"A Deriv customer","rating":4.5,"href":"https://example.com/reviews/3","detail":"South Africa"},{"quote":"I have used a few brokers. This is the one I stayed with, mostly for the range of markets.","name":"A Deriv customer","rating":5,"href":"https://example.com/reviews/4","detail":"Brazil"},{"quote":"Clear charts, fast execution and no surprises in the fees.","name":"A Deriv customer","rating":4,"href":"https://example.com/reviews/5","detail":"Nigeria"},{"quote":"Opening an account took a few minutes, and verifying it took less than a day.","name":"A Deriv customer","rating":5,"href":"https://example.com/reviews/6","detail":"Indonesia"}]} summary={{"label":"Rated 4.5 out of 5 by our customers","href":"https://example.com/reviews"}} />
202
+ ```
203
+
204
+ ## In use
205
+
206
+ ### A row of rated reviews
207
+
208
+ Several short reviews in view at once, each under its stars, in a row that runs to the band's edge — the overall rating under the heading, two arrows under the row. It never moves on its own.
209
+
210
+ ```tsx
211
+ import { TestimonialRow } from '@deriv-com/dds-marketing'
212
+
213
+ // Reviews with a summary
214
+ <TestimonialRow title="What our customers say" reviews={[{"quote":"Trading with Deriv has been great. Low spreads, and withdrawals reach me quickly.","name":"A Deriv customer","rating":5,"href":"https://example.com/reviews/1","detail":"United Kingdom"},{"quote":"An easy, smooth trading experience — the platform does what I need without getting in the way.","name":"A Deriv customer","rating":5,"href":"https://example.com/reviews/2","detail":"Malaysia"},{"quote":"Support answered my question about deposits within minutes, in my own language.","name":"A Deriv customer","rating":4.5,"href":"https://example.com/reviews/3","detail":"South Africa"},{"quote":"I have used a few brokers. This is the one I stayed with, mostly for the range of markets.","name":"A Deriv customer","rating":5,"href":"https://example.com/reviews/4","detail":"Brazil"},{"quote":"Clear charts, fast execution and no surprises in the fees.","name":"A Deriv customer","rating":4,"href":"https://example.com/reviews/5","detail":"Nigeria"},{"quote":"Opening an account took a few minutes, and verifying it took less than a day.","name":"A Deriv customer","rating":5,"href":"https://example.com/reviews/6","detail":"Indonesia"}]} summary={{"label":"Rated 4.5 out of 5 by our customers","href":"https://example.com/reviews"}} />
215
+
216
+ // Without a summary — the heading alone
217
+ <TestimonialRow title="What our customers say" reviews={[{"quote":"Trading with Deriv has been great. Low spreads, and withdrawals reach me quickly.","name":"A Deriv customer","rating":5,"href":"https://example.com/reviews/1","detail":"United Kingdom"},{"quote":"An easy, smooth trading experience — the platform does what I need without getting in the way.","name":"A Deriv customer","rating":5,"href":"https://example.com/reviews/2","detail":"Malaysia"},{"quote":"Support answered my question about deposits within minutes, in my own language.","name":"A Deriv customer","rating":4.5,"href":"https://example.com/reviews/3","detail":"South Africa"},{"quote":"I have used a few brokers. This is the one I stayed with, mostly for the range of markets.","name":"A Deriv customer","rating":5,"href":"https://example.com/reviews/4","detail":"Brazil"},{"quote":"Clear charts, fast execution and no surprises in the fees.","name":"A Deriv customer","rating":4,"href":"https://example.com/reviews/5","detail":"Nigeria"},{"quote":"Opening an account took a few minutes, and verifying it took less than a day.","name":"A Deriv customer","rating":5,"href":"https://example.com/reviews/6","detail":"Indonesia"}]} />
218
+ ```
219
+
220
+ ### The three grounds
221
+
222
+ The cards are the recessed gray on the page, white on the grey band, and the strong gray.900 card on the dark band — the colour a page card takes in dark mode.
223
+
224
+ ```tsx
225
+ import { TestimonialRow } from '@deriv-com/dds-marketing'
226
+
227
+ // ground="page"
228
+ <TestimonialRow title="What our customers say" reviews={[{"quote":"Trading with Deriv has been great. Low spreads, and withdrawals reach me quickly.","name":"A Deriv customer","rating":5,"href":"https://example.com/reviews/1","detail":"United Kingdom"},{"quote":"An easy, smooth trading experience — the platform does what I need without getting in the way.","name":"A Deriv customer","rating":5,"href":"https://example.com/reviews/2","detail":"Malaysia"},{"quote":"Support answered my question about deposits within minutes, in my own language.","name":"A Deriv customer","rating":4.5,"href":"https://example.com/reviews/3","detail":"South Africa"},{"quote":"I have used a few brokers. This is the one I stayed with, mostly for the range of markets.","name":"A Deriv customer","rating":5,"href":"https://example.com/reviews/4","detail":"Brazil"},{"quote":"Clear charts, fast execution and no surprises in the fees.","name":"A Deriv customer","rating":4,"href":"https://example.com/reviews/5","detail":"Nigeria"},{"quote":"Opening an account took a few minutes, and verifying it took less than a day.","name":"A Deriv customer","rating":5,"href":"https://example.com/reviews/6","detail":"Indonesia"}]} summary={{"label":"Rated 4.5 out of 5 by our customers","href":"https://example.com/reviews"}} />
229
+
230
+ // ground="subtle"
231
+ <TestimonialRow title="What our customers say" reviews={[{"quote":"Trading with Deriv has been great. Low spreads, and withdrawals reach me quickly.","name":"A Deriv customer","rating":5,"href":"https://example.com/reviews/1","detail":"United Kingdom"},{"quote":"An easy, smooth trading experience — the platform does what I need without getting in the way.","name":"A Deriv customer","rating":5,"href":"https://example.com/reviews/2","detail":"Malaysia"},{"quote":"Support answered my question about deposits within minutes, in my own language.","name":"A Deriv customer","rating":4.5,"href":"https://example.com/reviews/3","detail":"South Africa"},{"quote":"I have used a few brokers. This is the one I stayed with, mostly for the range of markets.","name":"A Deriv customer","rating":5,"href":"https://example.com/reviews/4","detail":"Brazil"},{"quote":"Clear charts, fast execution and no surprises in the fees.","name":"A Deriv customer","rating":4,"href":"https://example.com/reviews/5","detail":"Nigeria"},{"quote":"Opening an account took a few minutes, and verifying it took less than a day.","name":"A Deriv customer","rating":5,"href":"https://example.com/reviews/6","detail":"Indonesia"}]} summary={{"label":"Rated 4.5 out of 5 by our customers","href":"https://example.com/reviews"}} ground="subtle" />
232
+
233
+ // ground="strong"
234
+ <TestimonialRow title="What our customers say" reviews={[{"quote":"Trading with Deriv has been great. Low spreads, and withdrawals reach me quickly.","name":"A Deriv customer","rating":5,"href":"https://example.com/reviews/1","detail":"United Kingdom"},{"quote":"An easy, smooth trading experience — the platform does what I need without getting in the way.","name":"A Deriv customer","rating":5,"href":"https://example.com/reviews/2","detail":"Malaysia"},{"quote":"Support answered my question about deposits within minutes, in my own language.","name":"A Deriv customer","rating":4.5,"href":"https://example.com/reviews/3","detail":"South Africa"},{"quote":"I have used a few brokers. This is the one I stayed with, mostly for the range of markets.","name":"A Deriv customer","rating":5,"href":"https://example.com/reviews/4","detail":"Brazil"},{"quote":"Clear charts, fast execution and no surprises in the fees.","name":"A Deriv customer","rating":4,"href":"https://example.com/reviews/5","detail":"Nigeria"},{"quote":"Opening an account took a few minutes, and verifying it took less than a day.","name":"A Deriv customer","rating":5,"href":"https://example.com/reviews/6","detail":"Indonesia"}]} summary={{"label":"Rated 4.5 out of 5 by our customers","href":"https://example.com/reviews"}} ground="strong" />
235
+ ```
@@ -0,0 +1,254 @@
1
+ <!-- GENERATED from testimonial-slider.contract.json. Do not edit. -->
2
+
3
+ # TestimonialSlider
4
+
5
+ A section that lets the people who use the product say what it did for them: a heading over one quote at a time, in a card, with the name of who said it. Two or more quotes rotate in place — one in view, the next fading in where it stood — and dots show where the reader is and move to any quote pressed.
6
+
7
+ The reference design's Testimonial in its quote form. Its review-row form — rated reviews collected by a review service — is TestimonialRow.
8
+
9
+ ## Use when
10
+
11
+ - Two to five real quotes from partners or customers, each a few sentences, read one at a time
12
+ - A page that has made its claims and wants someone other than the brand to back them
13
+
14
+ ## Do not use
15
+
16
+ - A single quote → `FeatureSplit`
17
+ - Ratings and review counts from a review site → `TestimonialRow`
18
+ - Quotes nobody said. A testimonial is a claim made in someone else's name, and an invented one is a false claim — use real, attributable words or none
19
+ - More than a few sentences per quote. A quote is read while it is in view; one that needs scrolling inside the card is never finished
20
+
21
+ ## Anatomy
22
+
23
+ TestimonialSlider renders 15 elements. A token binding names the part it applies to.
24
+
25
+ - `root` — `<section>`, class `dds-testimonialslider`. The section. It paints the ground and the ink to go with it — see `ground` — and asks its own width. A region named by its heading, announced as a carousel when it rotates, so a reader can jump to it and past it and knows it moves.
26
+ - `inner` — `<div>`, class `dds-testimonialslider__inner`. The measure and the gutter, the same column every band holds its content in.
27
+ - `title` — `<h2>`, class `dds-testimonialslider__title`. Whose words these are. `h2`, ranged to the start on a phone and centred from the fold with the card under it, as every other block's heading is.
28
+ - `carousel` — `<div>`, class `dds-testimonialslider__carousel`. The card and the dots under it, held together at space.gap.xl — the reference design's step from the card to its dots, and closer than the section's own step from the heading, so the dots read as belonging to the card rather than as a part of the section.
29
+ - `track` — `<div>`, class `dds-testimonialslider__track`. The quotes, stacked in one place. Every card sits in the same grid cell, so the section is as tall as its longest quote and nothing below it moves when one changes for another. Only the quote in view is drawn; the rest are at opacity.hidden, inert and hidden from assistive technology. A change is a fade in place on motion.duration.slow and motion.easing.shift — the dots' own timing — and the words then arrive the way every block's do. It is also what the two corner pictures are placed against, so they sit over the card whichever quote is in view and do not fade with it, and what keeps them inside the card's rounded corner as they drift.
30
+ - `item` — `<figure>`, class `dds-testimonialslider__item`. One quote, in a card: a `figure`, so the quote and the person it is attributed to are one thing to assistive technology. The card's fill follows the ground — see `ground`. Ranged to the start on a phone and centred from the fold, the reference design's arrangement.
31
+ - `image-start` — `<span>`, class `dds-testimonialslider__image-start`. A picture laid over the card's top start corner, a square at size.testimonial-art, running up behind the card's top edge — by its own corner radius and the whole of its drift, so its top corners never show — and set in from its start side — space.inset.xl from the fold, and space.inset.lg from the end side on a phone, where it moves to the top end corner. No frame of its own — the picture is the art, a PNG with or without a transparent ground — so it sets only its place. Drifts down by motion.distance.drift while the section passes through the view — scroll-driven, so it moves with the reader's scroll and back again — and holds still for a reader who asked for less motion or a browser with no scroll timeline. Decorative: hidden from assistive technology, and nothing a pointer can land on. The one shown on a phone, moved to the top end corner above the quote — the side a start-aligned quote leaves empty — and drifting half as far, so less of it has to stay tucked away. Rendered only when `imageStart` is set.
32
+ - `image-end` — `<span>`, class `dds-testimonialslider__image-end`. imageStart's pair at the card's bottom end corner, running down behind the card's bottom edge the same way and set in from its end side by space.inset.xl, drifting up as the other drifts down. Not drawn on a phone, where there is room for one picture and it is the opening one. Rendered only when `imageEnd` is set.
33
+ - `image` — `<img>`, class `dds-testimonialslider__image`. The picture in each corner — inside image-start and inside image-end alike — square — cropped to fill it, so any picture is 1:1 whatever shape it arrives in — with its corners rounded at radius.container-item. No border and no ground behind it, so a PNG with a transparent ground shows the card through it. An empty alt: the box around it is hidden from assistive technology, and it is decoration.
34
+ - `quote` — `<blockquote>`, class `dds-testimonialslider__quote`. What was said, at the large body step and held to the description measure.
35
+ - `author` — `<figcaption>`, class `dds-testimonialslider__author`. Who said it: their picture, if there is one, beside their name and what they do.
36
+ - `avatar` — `<img>`, class `dds-testimonialslider__avatar`. The person's picture, round at size.avatar. Decorative — the name beside it says who it is — so it takes an empty alt. Drawn only for a quote that gives one.
37
+ - `name` — `<span>`, class `dds-testimonialslider__name`. Who said it.
38
+ - `detail` — `<span>`, class `dds-testimonialslider__detail`. Where they are or what they do, quieter than the name. Drawn only for a quote that gives one. Muted on the page and the grey band; on the dark band it takes color.fg.muted-inverse, the band's own quieter ink.
39
+ - `controls` — `<div>`, class `dds-testimonialslider__controls`. PaginationDots, in its accent variant — coral marks in the brand's accent — under the card: where the reader is, and a way to any quote. Ranged to the start on a phone with the quote above it, centred from the fold with the card. With the swipe, the whole of how a reader moves it.
40
+
41
+ Apply these classes from the generated `testimonialSliderParts` constant rather than writing the strings by hand.
42
+
43
+ ## Composition
44
+
45
+ - Takes no children. Everything it renders comes from props
46
+ - Never contains: `TestimonialSlider`, `LandingHero`, `ProductHero`, `PageHeader`, `Footer`, `Navbar` — in children or in any prop that takes a node
47
+
48
+ ## Props
49
+
50
+ ### ground — `page` | `subtle` | `strong` (default `page`)
51
+
52
+ - `page` — The default, and the page's own white. The card is the recessed gray that sets it off
53
+ - `subtle` — The grey band, the reference design's ground for this section. The card turns white on it. 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, for a section a reader should arrive at. The heading and the quote turn white and the card takes color.bg.surface-card-strong — gray.900 in both themes, the colour a page card takes in dark mode, and TestimonialRow's card on the same band — so the band reads as a dark-mode section in either theme. The coral dots sit on it
55
+
56
+ Use when: Which of the page's grounds the section paints, and with it the card's fill: the recessed surface on the page, the raised white on the grey band — the reference design's slate testimonial — and the strong card on the dark band, gray.900 in both themes, so the card has an edge on each.
57
+ Never for: Marking importance. Every section on a page painted a ground is a page with no emphasis left.
58
+
59
+ ### title — `string` **Required.**
60
+
61
+ Use when: Always. Whose words these are, in a few — "What our partners say", "What our customers say".
62
+ Never for: A quote. The quotes are the content; the heading says whose they are.
63
+
64
+ ### quotes — `data` `TestimonialSliderQuote[]` **Required.**
65
+
66
+ Use when: Always. The quotes, in the order they rotate — two to five, each a few sentences, each with the name of who said it. An empty list draws nothing; one quote is drawn still, with no dots.
67
+ Never for: A quote that was not said. Every one is attributed to a person or a role, and the page is answerable for each.
68
+
69
+ ### imageStart — `string`
70
+
71
+ Use when: A decorative picture, laid over the card's top start corner — a photograph, a product screen, any small piece of art, usually a PNG — as a path or a URL. It is drawn as it is, with rounded corners and no frame, so a transparent ground shows the card through it. Drawn square and cropped to fill its square, so a picture whose subject sits in its middle crops best. It runs up behind the card's top edge, so the edge cuts straight across it, set in from the side, stays put while the quotes rotate, and drifts down by motion.distance.drift as the section passes through the view. The one shown on a phone, where it moves to the top end corner above the quote and drifts half as far, so more of it shows. Decorative: it takes an empty alt and is hidden from assistive technology.
72
+ Never for: Anything a reader needs: a logo that says who the quotes are from, words, the face of the person quoted. It is hidden from assistive technology so it is art or it is missing.
73
+
74
+ ### imageEnd — `string`
75
+
76
+ Use when: A decorative picture at the card's bottom end corner, the pair to imageStart: drawn the same way behind the card's bottom edge, and drifting up as the other drifts down, so the two read as depth. Drawn from the fold only: a phone has room for one, and it is the opening one. Decorative, as imageStart is.
77
+ Never for: The same as imageStart's: art only.
78
+
79
+ ### autoplay — `boolean` (default `false`)
80
+
81
+ 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.
82
+ 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.
83
+
84
+ ### controlsLabel — `string` (default `Testimonials`)
85
+
86
+ Use when: The name the dots are announced by. Its own name rather than the section's, so a screen reader moving into the dots hears what they are. Translate it with the page.
87
+
88
+ ### slideLabel — `string` (default `Slide`)
89
+
90
+ 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.
91
+
92
+ ## Accessibility
93
+
94
+ 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.
95
+
96
+ - Announced as: `region`
97
+ - `Tab` — Moves to the dots, past the quotes: a quote holds nothing to press. Quotes out of view are inert.
98
+ - `Enter` — On a dot, moves to that quote
99
+ - accessible name from title, so the section is a named region a reader can jump to and skip
100
+ - Each quote is a figure holding a blockquote and its figcaption, so the words and the person they are attributed to are announced together.
101
+ - Every quote out of view is inert and hidden from assistive technology, and the one in view is named by its position — '2 / 3'.
102
+ - Under autoplay, a hold while the pointer is over the section 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 — CtaBannerSlider's rules, shared through use-rotation.
103
+ - The corner pictures are decorative: an empty alt and hidden from assistive technology, so the quotes are announced without them.
104
+
105
+ ## Rules
106
+
107
+ - **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.
108
+
109
+ 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.
110
+
111
+ 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.
112
+
113
+ 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.
114
+
115
+ 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.
116
+
117
+ 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.
118
+ Guidance only — cannot be checked automatically.
119
+ - **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.
120
+ Guidance only — cannot be checked automatically.
121
+ - **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.
122
+
123
+ 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.
124
+
125
+ 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.
126
+ Guidance only — cannot be checked automatically.
127
+ - **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.
128
+
129
+ 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.
130
+
131
+ 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.
132
+
133
+ 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.
134
+
135
+ 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.
136
+
137
+ 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.
138
+
139
+ 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.
140
+
141
+ 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.
142
+
143
+ 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.
144
+ Guidance only — cannot be checked automatically.
145
+ - **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.
146
+
147
+ 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.
148
+
149
+ 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.
150
+
151
+ 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.
152
+
153
+ 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.
154
+
155
+ 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.
156
+
157
+ 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.
158
+
159
+ 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.
160
+
161
+ 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.
162
+ Guidance only — cannot be checked automatically.
163
+ - **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.
164
+
165
+ 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.
166
+
167
+ 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.
168
+
169
+ 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.
170
+ Guidance only — cannot be checked automatically.
171
+ - **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.
172
+
173
+ 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.
174
+
175
+ 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.
176
+
177
+ 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.
178
+ Guidance only — cannot be checked automatically.
179
+
180
+ ## Anti-examples
181
+
182
+ ❌ TestimonialSlider for: A single quote
183
+ One quote does not rotate; set it beside a picture of the person as a split, or let it close a section on its own
184
+ → use `FeatureSplit` instead.
185
+
186
+ ❌ TestimonialSlider for: Ratings and review counts from a review site
187
+ Reviews a service collected carry a rating each and an overall score, and are read as a set rather than one at a time; this block draws quotes the page chose, with no score
188
+ → use `TestimonialRow` instead.
189
+
190
+ ## Example
191
+
192
+ ```tsx
193
+ import { TestimonialSlider } from '@deriv-com/dds-marketing'
194
+
195
+ <TestimonialSlider title="What our partners say" quotes={[{"quote":"I was searching for a trading platform when I found Deriv. The more I read, the more I learned — not only about trading forex here, but about the partner programme too.","name":"Deriv partner","detail":"Sri Lanka"},{"quote":"It was only once my account managers reached out and showed me how to make the most of the programme that I really began to grow.","name":"Deriv partner","detail":"Nigeria"},{"quote":"Payouts arrive when they should, every time. That reliability is why I recommend Deriv to the traders I work with.","name":"Deriv partner","detail":"Malaysia"}]} imageStart="/sample-card-image.svg" imageEnd="/sample-card-image.svg" />
196
+ ```
197
+
198
+ ## In use
199
+
200
+ ### Rotating between quotes
201
+
202
+ One quote 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.
203
+
204
+ ```tsx
205
+ import { TestimonialSlider } from '@deriv-com/dds-marketing'
206
+
207
+ // Three quotes, rotating
208
+ <TestimonialSlider title="What our partners say" quotes={[{"quote":"I was searching for a trading platform when I found Deriv. The more I read, the more I learned — not only about trading forex here, but about the partner programme too.","name":"Deriv partner","detail":"Sri Lanka"},{"quote":"It was only once my account managers reached out and showed me how to make the most of the programme that I really began to grow.","name":"Deriv partner","detail":"Nigeria"},{"quote":"Payouts arrive when they should, every time. That reliability is why I recommend Deriv to the traders I work with.","name":"Deriv partner","detail":"Malaysia"}]} autoplay />
209
+
210
+ // Moved by hand only
211
+ <TestimonialSlider title="What our partners say" quotes={[{"quote":"I was searching for a trading platform when I found Deriv. The more I read, the more I learned — not only about trading forex here, but about the partner programme too.","name":"Deriv partner","detail":"Sri Lanka"},{"quote":"It was only once my account managers reached out and showed me how to make the most of the programme that I really began to grow.","name":"Deriv partner","detail":"Nigeria"},{"quote":"Payouts arrive when they should, every time. That reliability is why I recommend Deriv to the traders I work with.","name":"Deriv partner","detail":"Malaysia"}]} />
212
+
213
+ // One quote, drawn still
214
+ <TestimonialSlider title="What our partners say" quotes={[{"quote":"I was searching for a trading platform when I found Deriv. The more I read, the more I learned — not only about trading forex here, but about the partner programme too.","name":"Deriv partner","detail":"Sri Lanka"}]} />
215
+ ```
216
+
217
+ ### The three grounds
218
+
219
+ The card is the recessed gray on the page, white on the grey band, and the strong gray.900 card on the dark band — the colour a page card takes in dark mode.
220
+
221
+ ```tsx
222
+ import { TestimonialSlider } from '@deriv-com/dds-marketing'
223
+
224
+ // ground="page"
225
+ <TestimonialSlider title="What our partners say" quotes={[{"quote":"I was searching for a trading platform when I found Deriv. The more I read, the more I learned — not only about trading forex here, but about the partner programme too.","name":"Deriv partner","detail":"Sri Lanka"},{"quote":"It was only once my account managers reached out and showed me how to make the most of the programme that I really began to grow.","name":"Deriv partner","detail":"Nigeria"},{"quote":"Payouts arrive when they should, every time. That reliability is why I recommend Deriv to the traders I work with.","name":"Deriv partner","detail":"Malaysia"}]} />
226
+
227
+ // ground="subtle"
228
+ <TestimonialSlider ground="subtle" title="What our partners say" quotes={[{"quote":"I was searching for a trading platform when I found Deriv. The more I read, the more I learned — not only about trading forex here, but about the partner programme too.","name":"Deriv partner","detail":"Sri Lanka"},{"quote":"It was only once my account managers reached out and showed me how to make the most of the programme that I really began to grow.","name":"Deriv partner","detail":"Nigeria"},{"quote":"Payouts arrive when they should, every time. That reliability is why I recommend Deriv to the traders I work with.","name":"Deriv partner","detail":"Malaysia"}]} />
229
+
230
+ // ground="strong"
231
+ <TestimonialSlider ground="strong" title="What our partners say" quotes={[{"quote":"I was searching for a trading platform when I found Deriv. The more I read, the more I learned — not only about trading forex here, but about the partner programme too.","name":"Deriv partner","detail":"Sri Lanka"},{"quote":"It was only once my account managers reached out and showed me how to make the most of the programme that I really began to grow.","name":"Deriv partner","detail":"Nigeria"},{"quote":"Payouts arrive when they should, every time. That reliability is why I recommend Deriv to the traders I work with.","name":"Deriv partner","detail":"Malaysia"}]} />
232
+ ```
233
+
234
+ ### With a picture of who said it
235
+
236
+ An avatar beside the name, round at size.avatar. Decorative: the name says who it is.
237
+
238
+ ```tsx
239
+ import { TestimonialSlider } from '@deriv-com/dds-marketing'
240
+
241
+ // With an avatar
242
+ <TestimonialSlider title="What our customers say" quotes={[{"quote":"I was searching for a trading platform when I found Deriv. The more I read, the more I learned — not only about trading forex here, but about the partner programme too.","name":"Deriv partner","detail":"Sri Lanka","avatar":"/sample-card-image.svg"},{"quote":"It was only once my account managers reached out and showed me how to make the most of the programme that I really began to grow.","name":"Deriv partner","detail":"Nigeria","avatar":"/sample-card-image.svg"},{"quote":"Payouts arrive when they should, every time. That reliability is why I recommend Deriv to the traders I work with.","name":"Deriv partner","detail":"Malaysia","avatar":"/sample-card-image.svg"}]} />
243
+ ```
244
+
245
+ ### With pictures in the corners
246
+
247
+ Two decorative pictures in opposite corners that drift against the scroll — the top one down, the bottom one up. A phone shows only the top one.
248
+
249
+ ```tsx
250
+ import { TestimonialSlider } from '@deriv-com/dds-marketing'
251
+
252
+ // With corner pictures
253
+ <TestimonialSlider title="What our partners say" quotes={[{"quote":"I was searching for a trading platform when I found Deriv. The more I read, the more I learned — not only about trading forex here, but about the partner programme too.","name":"Deriv partner","detail":"Sri Lanka"},{"quote":"It was only once my account managers reached out and showed me how to make the most of the programme that I really began to grow.","name":"Deriv partner","detail":"Nigeria"},{"quote":"Payouts arrive when they should, every time. That reliability is why I recommend Deriv to the traders I work with.","name":"Deriv partner","detail":"Malaysia"}]} imageStart="/sample-card-image.svg" imageEnd="/sample-card-image.svg" />
254
+ ```