@deriv-com/dds-marketing 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (460) hide show
  1. package/.llm/components/accordion.md +193 -0
  2. package/.llm/components/accordionitem.md +236 -0
  3. package/.llm/components/aspectratio.md +212 -0
  4. package/.llm/components/badge.md +231 -0
  5. package/.llm/components/bottomsheet.md +404 -0
  6. package/.llm/components/breadcrumb.md +197 -0
  7. package/.llm/components/breadcrumbitem.md +178 -0
  8. package/.llm/components/button.md +271 -0
  9. package/.llm/components/buttonicon.md +313 -0
  10. package/.llm/components/card.md +313 -0
  11. package/.llm/components/cardbody.md +409 -0
  12. package/.llm/components/cardbutton.md +259 -0
  13. package/.llm/components/checkbox.md +285 -0
  14. package/.llm/components/divider.md +230 -0
  15. package/.llm/components/dropdownmenu.md +453 -0
  16. package/.llm/components/filterchip.md +314 -0
  17. package/.llm/components/footer.md +408 -0
  18. package/.llm/components/footergroup.md +241 -0
  19. package/.llm/components/grid.md +659 -0
  20. package/.llm/components/icon.md +194 -0
  21. package/.llm/components/link.md +354 -0
  22. package/.llm/components/menuitem.md +218 -0
  23. package/.llm/components/navbar.md +458 -0
  24. package/.llm/components/navbaritem.md +238 -0
  25. package/.llm/components/navbarmenu.md +319 -0
  26. package/.llm/components/navbarmenugroup.md +184 -0
  27. package/.llm/components/navbarpanel.md +255 -0
  28. package/.llm/components/navbarswitcher.md +343 -0
  29. package/.llm/components/navbarswitcheroption.md +156 -0
  30. package/.llm/components/option.md +268 -0
  31. package/.llm/components/pagination.md +361 -0
  32. package/.llm/components/removablechip.md +247 -0
  33. package/.llm/components/row.md +381 -0
  34. package/.llm/components/scroller.md +470 -0
  35. package/.llm/components/searchinput.md +279 -0
  36. package/.llm/components/segmentedcontrol.md +358 -0
  37. package/.llm/components/segmentedcontrolitem.md +272 -0
  38. package/.llm/components/select.md +509 -0
  39. package/.llm/components/selectchip.md +334 -0
  40. package/.llm/components/spinner.md +222 -0
  41. package/.llm/components/stack.md +334 -0
  42. package/.llm/components/statusdot.md +205 -0
  43. package/.llm/components/subdomainnavbar.md +327 -0
  44. package/.llm/components/tab.md +291 -0
  45. package/.llm/components/table.md +660 -0
  46. package/.llm/components/tablebody.md +258 -0
  47. package/.llm/components/tablecell.md +248 -0
  48. package/.llm/components/tablehead.md +248 -0
  49. package/.llm/components/tableheadercell.md +298 -0
  50. package/.llm/components/tablerow.md +285 -0
  51. package/.llm/components/tablist.md +210 -0
  52. package/.llm/components/textarea.md +362 -0
  53. package/.llm/components/textinput.md +467 -0
  54. package/.llm/components/tooltip.md +267 -0
  55. package/.llm/components/typography.md +245 -0
  56. package/.llm/digest/accordion.md +43 -0
  57. package/.llm/digest/accordionitem.md +47 -0
  58. package/.llm/digest/aspectratio.md +47 -0
  59. package/.llm/digest/badge.md +45 -0
  60. package/.llm/digest/bottomsheet.md +69 -0
  61. package/.llm/digest/breadcrumb.md +38 -0
  62. package/.llm/digest/breadcrumbitem.md +43 -0
  63. package/.llm/digest/button.md +48 -0
  64. package/.llm/digest/buttonicon.md +61 -0
  65. package/.llm/digest/card.md +50 -0
  66. package/.llm/digest/cardbody.md +68 -0
  67. package/.llm/digest/cardbutton.md +49 -0
  68. package/.llm/digest/checkbox.md +63 -0
  69. package/.llm/digest/divider.md +52 -0
  70. package/.llm/digest/dropdownmenu.md +67 -0
  71. package/.llm/digest/filterchip.md +68 -0
  72. package/.llm/digest/footer.md +57 -0
  73. package/.llm/digest/footergroup.md +42 -0
  74. package/.llm/digest/grid.md +62 -0
  75. package/.llm/digest/icon.md +45 -0
  76. package/.llm/digest/link.md +59 -0
  77. package/.llm/digest/menuitem.md +46 -0
  78. package/.llm/digest/navbar.md +60 -0
  79. package/.llm/digest/navbaritem.md +54 -0
  80. package/.llm/digest/navbarmenu.md +54 -0
  81. package/.llm/digest/navbarmenugroup.md +40 -0
  82. package/.llm/digest/navbarpanel.md +53 -0
  83. package/.llm/digest/navbarswitcher.md +51 -0
  84. package/.llm/digest/navbarswitcheroption.md +37 -0
  85. package/.llm/digest/option.md +54 -0
  86. package/.llm/digest/pagination.md +71 -0
  87. package/.llm/digest/removablechip.md +51 -0
  88. package/.llm/digest/row.md +60 -0
  89. package/.llm/digest/scroller.md +59 -0
  90. package/.llm/digest/searchinput.md +56 -0
  91. package/.llm/digest/segmentedcontrol.md +59 -0
  92. package/.llm/digest/segmentedcontrolitem.md +59 -0
  93. package/.llm/digest/select.md +92 -0
  94. package/.llm/digest/selectchip.md +68 -0
  95. package/.llm/digest/spinner.md +52 -0
  96. package/.llm/digest/stack.md +56 -0
  97. package/.llm/digest/statusdot.md +46 -0
  98. package/.llm/digest/subdomainnavbar.md +54 -0
  99. package/.llm/digest/tab.md +60 -0
  100. package/.llm/digest/table.md +71 -0
  101. package/.llm/digest/tablebody.md +49 -0
  102. package/.llm/digest/tablecell.md +55 -0
  103. package/.llm/digest/tablehead.md +50 -0
  104. package/.llm/digest/tableheadercell.md +65 -0
  105. package/.llm/digest/tablerow.md +56 -0
  106. package/.llm/digest/tablist.md +46 -0
  107. package/.llm/digest/textarea.md +78 -0
  108. package/.llm/digest/textinput.md +95 -0
  109. package/.llm/digest/tooltip.md +58 -0
  110. package/.llm/digest/typography.md +59 -0
  111. package/.llm/index.md +86 -0
  112. package/.llm/rules.md +122 -0
  113. package/.llm/tokens.md +341 -0
  114. package/AGENTS.md +164 -0
  115. package/LICENSE +21 -0
  116. package/README.md +63 -15
  117. package/dist/components/core/accordion/Accordion.css +10 -0
  118. package/dist/components/core/accordion/Accordion.d.ts +20 -0
  119. package/dist/components/core/accordion/Accordion.js +69 -0
  120. package/dist/components/core/accordion/Accordion.types.d.ts +20 -0
  121. package/dist/components/core/accordion/Accordion.types.js +7 -0
  122. package/dist/components/core/accordion-item/AccordionItem.css +98 -0
  123. package/dist/components/core/accordion-item/AccordionItem.d.ts +44 -0
  124. package/dist/components/core/accordion-item/AccordionItem.js +63 -0
  125. package/dist/components/core/accordion-item/AccordionItem.types.d.ts +32 -0
  126. package/dist/components/core/accordion-item/AccordionItem.types.js +13 -0
  127. package/dist/components/core/accordion-item/accordion-item-impl.css +107 -0
  128. package/dist/components/core/badge/Badge.css +37 -0
  129. package/dist/components/core/badge/Badge.d.ts +37 -0
  130. package/dist/components/core/badge/Badge.js +40 -0
  131. package/dist/components/core/badge/Badge.types.d.ts +24 -0
  132. package/dist/components/core/badge/Badge.types.js +8 -0
  133. package/dist/components/core/badge/badge-impl.css +32 -0
  134. package/dist/components/core/bottom-sheet/BottomSheet.css +178 -0
  135. package/dist/components/core/bottom-sheet/BottomSheet.d.ts +22 -0
  136. package/dist/components/core/bottom-sheet/BottomSheet.js +359 -0
  137. package/dist/components/core/bottom-sheet/BottomSheet.types.d.ts +67 -0
  138. package/dist/components/core/bottom-sheet/BottomSheet.types.js +18 -0
  139. package/dist/components/core/bottom-sheet/bottom-sheet-impl.css +57 -0
  140. package/dist/components/core/breadcrumb/Breadcrumb.css +19 -0
  141. package/dist/components/core/breadcrumb/Breadcrumb.d.ts +16 -0
  142. package/dist/components/core/breadcrumb/Breadcrumb.js +22 -0
  143. package/dist/components/core/breadcrumb/Breadcrumb.types.d.ts +18 -0
  144. package/dist/components/core/breadcrumb/Breadcrumb.types.js +9 -0
  145. package/dist/components/core/breadcrumb-item/BreadcrumbItem.css +34 -0
  146. package/dist/components/core/breadcrumb-item/BreadcrumbItem.d.ts +12 -0
  147. package/dist/components/core/breadcrumb-item/BreadcrumbItem.js +15 -0
  148. package/dist/components/core/breadcrumb-item/BreadcrumbItem.types.d.ts +22 -0
  149. package/dist/components/core/breadcrumb-item/BreadcrumbItem.types.js +9 -0
  150. package/dist/components/core/button/Button.css +141 -0
  151. package/dist/components/core/button/Button.d.ts +25 -0
  152. package/dist/components/core/button/Button.js +28 -0
  153. package/dist/components/core/button/Button.types.d.ts +40 -0
  154. package/dist/components/core/button/Button.types.js +9 -0
  155. package/dist/components/core/button/button-impl.css +46 -0
  156. package/dist/components/core/button-icon/ButtonIcon.css +135 -0
  157. package/dist/components/core/button-icon/ButtonIcon.d.ts +34 -0
  158. package/dist/components/core/button-icon/ButtonIcon.js +117 -0
  159. package/dist/components/core/button-icon/ButtonIcon.types.d.ts +41 -0
  160. package/dist/components/core/button-icon/ButtonIcon.types.js +8 -0
  161. package/dist/components/core/card/Card.css +65 -0
  162. package/dist/components/core/card/Card.d.ts +24 -0
  163. package/dist/components/core/card/Card.js +26 -0
  164. package/dist/components/core/card/Card.types.d.ts +33 -0
  165. package/dist/components/core/card/Card.types.js +7 -0
  166. package/dist/components/core/card-body/CardBody.css +139 -0
  167. package/dist/components/core/card-body/CardBody.d.ts +62 -0
  168. package/dist/components/core/card-body/CardBody.js +97 -0
  169. package/dist/components/core/card-body/CardBody.types.d.ts +61 -0
  170. package/dist/components/core/card-body/CardBody.types.js +15 -0
  171. package/dist/components/core/card-body/card-body-impl.css +87 -0
  172. package/dist/components/core/card-button/CardButton.css +73 -0
  173. package/dist/components/core/card-button/CardButton.d.ts +27 -0
  174. package/dist/components/core/card-button/CardButton.js +37 -0
  175. package/dist/components/core/card-button/CardButton.types.d.ts +24 -0
  176. package/dist/components/core/card-button/CardButton.types.js +7 -0
  177. package/dist/components/core/card-button/card-button-impl.css +39 -0
  178. package/dist/components/core/checkbox/Checkbox.css +149 -0
  179. package/dist/components/core/checkbox/Checkbox.d.ts +21 -0
  180. package/dist/components/core/checkbox/Checkbox.js +97 -0
  181. package/dist/components/core/checkbox/Checkbox.types.d.ts +46 -0
  182. package/dist/components/core/checkbox/Checkbox.types.js +15 -0
  183. package/dist/components/core/checkbox/checkbox-impl.css +90 -0
  184. package/dist/components/core/divider/Divider.css +41 -0
  185. package/dist/components/core/divider/Divider.d.ts +46 -0
  186. package/dist/components/core/divider/Divider.js +51 -0
  187. package/dist/components/core/divider/Divider.types.d.ts +25 -0
  188. package/dist/components/core/divider/Divider.types.js +9 -0
  189. package/dist/components/core/dropdown-menu/DropdownMenu.css +146 -0
  190. package/dist/components/core/dropdown-menu/DropdownMenu.d.ts +22 -0
  191. package/dist/components/core/dropdown-menu/DropdownMenu.js +309 -0
  192. package/dist/components/core/dropdown-menu/DropdownMenu.types.d.ts +62 -0
  193. package/dist/components/core/dropdown-menu/DropdownMenu.types.js +12 -0
  194. package/dist/components/core/dropdown-menu/dropdown-menu-impl.css +70 -0
  195. package/dist/components/core/filter-chip/FilterChip.css +149 -0
  196. package/dist/components/core/filter-chip/FilterChip.d.ts +23 -0
  197. package/dist/components/core/filter-chip/FilterChip.js +37 -0
  198. package/dist/components/core/filter-chip/FilterChip.types.d.ts +53 -0
  199. package/dist/components/core/filter-chip/FilterChip.types.js +12 -0
  200. package/dist/components/core/footer/Footer.css +104 -0
  201. package/dist/components/core/footer/Footer.d.ts +43 -0
  202. package/dist/components/core/footer/Footer.js +53 -0
  203. package/dist/components/core/footer/Footer.types.d.ts +47 -0
  204. package/dist/components/core/footer/Footer.types.js +18 -0
  205. package/dist/components/core/footer/footer-impl.css +218 -0
  206. package/dist/components/core/footer-group/FooterGroup.css +90 -0
  207. package/dist/components/core/footer-group/FooterGroup.d.ts +32 -0
  208. package/dist/components/core/footer-group/FooterGroup.js +64 -0
  209. package/dist/components/core/footer-group/FooterGroup.types.d.ts +25 -0
  210. package/dist/components/core/footer-group/FooterGroup.types.js +12 -0
  211. package/dist/components/core/footer-group/footer-group-impl.css +78 -0
  212. package/dist/components/core/icon/Icon.css +40 -0
  213. package/dist/components/core/icon/Icon.d.ts +23 -0
  214. package/dist/components/core/icon/Icon.js +79 -0
  215. package/dist/components/core/icon/Icon.types.d.ts +24 -0
  216. package/dist/components/core/icon/Icon.types.js +7 -0
  217. package/dist/components/core/link/Link.css +89 -0
  218. package/dist/components/core/link/Link.d.ts +37 -0
  219. package/dist/components/core/link/Link.js +141 -0
  220. package/dist/components/core/link/Link.types.d.ts +41 -0
  221. package/dist/components/core/link/Link.types.js +9 -0
  222. package/dist/components/core/link/link-impl.css +168 -0
  223. package/dist/components/core/menu-item/MenuItem.css +70 -0
  224. package/dist/components/core/menu-item/MenuItem.d.ts +11 -0
  225. package/dist/components/core/menu-item/MenuItem.js +26 -0
  226. package/dist/components/core/menu-item/MenuItem.types.d.ts +28 -0
  227. package/dist/components/core/menu-item/MenuItem.types.js +9 -0
  228. package/dist/components/core/navbar/Navbar.css +135 -0
  229. package/dist/components/core/navbar/Navbar.d.ts +36 -0
  230. package/dist/components/core/navbar/Navbar.js +371 -0
  231. package/dist/components/core/navbar/Navbar.types.d.ts +49 -0
  232. package/dist/components/core/navbar/Navbar.types.js +17 -0
  233. package/dist/components/core/navbar/navbar-impl.css +590 -0
  234. package/dist/components/core/navbar-item/NavbarItem.css +75 -0
  235. package/dist/components/core/navbar-item/NavbarItem.d.ts +22 -0
  236. package/dist/components/core/navbar-item/NavbarItem.js +40 -0
  237. package/dist/components/core/navbar-item/NavbarItem.types.d.ts +34 -0
  238. package/dist/components/core/navbar-item/NavbarItem.types.js +10 -0
  239. package/dist/components/core/navbar-menu/NavbarMenu.css +128 -0
  240. package/dist/components/core/navbar-menu/NavbarMenu.d.ts +5 -0
  241. package/dist/components/core/navbar-menu/NavbarMenu.js +186 -0
  242. package/dist/components/core/navbar-menu/NavbarMenu.types.d.ts +45 -0
  243. package/dist/components/core/navbar-menu/NavbarMenu.types.js +12 -0
  244. package/dist/components/core/navbar-menu/navbar-menu-impl.css +186 -0
  245. package/dist/components/core/navbar-menu-group/NavbarMenuGroup.css +26 -0
  246. package/dist/components/core/navbar-menu-group/NavbarMenuGroup.d.ts +17 -0
  247. package/dist/components/core/navbar-menu-group/NavbarMenuGroup.js +22 -0
  248. package/dist/components/core/navbar-menu-group/NavbarMenuGroup.types.d.ts +14 -0
  249. package/dist/components/core/navbar-menu-group/NavbarMenuGroup.types.js +7 -0
  250. package/dist/components/core/navbar-panel/NavbarPanel.css +87 -0
  251. package/dist/components/core/navbar-panel/NavbarPanel.d.ts +34 -0
  252. package/dist/components/core/navbar-panel/NavbarPanel.js +46 -0
  253. package/dist/components/core/navbar-panel/NavbarPanel.types.d.ts +29 -0
  254. package/dist/components/core/navbar-panel/NavbarPanel.types.js +12 -0
  255. package/dist/components/core/navbar-panel/navbar-panel-impl.css +104 -0
  256. package/dist/components/core/navbar-panel/use-navbar-panel.d.ts +26 -0
  257. package/dist/components/core/navbar-panel/use-navbar-panel.js +135 -0
  258. package/dist/components/core/navbar-switcher/NavbarSwitcher.css +117 -0
  259. package/dist/components/core/navbar-switcher/NavbarSwitcher.d.ts +20 -0
  260. package/dist/components/core/navbar-switcher/NavbarSwitcher.js +90 -0
  261. package/dist/components/core/navbar-switcher/NavbarSwitcher.types.d.ts +46 -0
  262. package/dist/components/core/navbar-switcher/NavbarSwitcher.types.js +13 -0
  263. package/dist/components/core/navbar-switcher/navbar-switcher-impl.css +179 -0
  264. package/dist/components/core/navbar-switcher-option/NavbarSwitcherOption.css +39 -0
  265. package/dist/components/core/navbar-switcher-option/NavbarSwitcherOption.d.ts +16 -0
  266. package/dist/components/core/navbar-switcher-option/NavbarSwitcherOption.js +19 -0
  267. package/dist/components/core/navbar-switcher-option/NavbarSwitcherOption.types.d.ts +18 -0
  268. package/dist/components/core/navbar-switcher-option/NavbarSwitcherOption.types.js +7 -0
  269. package/dist/components/core/option/Option.css +133 -0
  270. package/dist/components/core/option/Option.d.ts +25 -0
  271. package/dist/components/core/option/Option.js +31 -0
  272. package/dist/components/core/option/Option.types.d.ts +44 -0
  273. package/dist/components/core/option/Option.types.js +14 -0
  274. package/dist/components/core/pagination/Pagination.css +237 -0
  275. package/dist/components/core/pagination/Pagination.d.ts +30 -0
  276. package/dist/components/core/pagination/Pagination.js +406 -0
  277. package/dist/components/core/pagination/Pagination.types.d.ts +59 -0
  278. package/dist/components/core/pagination/Pagination.types.js +14 -0
  279. package/dist/components/core/pagination/pagination-impl.css +17 -0
  280. package/dist/components/core/removable-chip/RemovableChip.css +125 -0
  281. package/dist/components/core/removable-chip/RemovableChip.d.ts +25 -0
  282. package/dist/components/core/removable-chip/RemovableChip.js +36 -0
  283. package/dist/components/core/removable-chip/RemovableChip.types.d.ts +38 -0
  284. package/dist/components/core/removable-chip/RemovableChip.types.js +13 -0
  285. package/dist/components/core/search-input/SearchInput.css +205 -0
  286. package/dist/components/core/search-input/SearchInput.d.ts +5 -0
  287. package/dist/components/core/search-input/SearchInput.js +81 -0
  288. package/dist/components/core/search-input/SearchInput.types.d.ts +43 -0
  289. package/dist/components/core/search-input/SearchInput.types.js +13 -0
  290. package/dist/components/core/search-input/search-input-impl.css +20 -0
  291. package/dist/components/core/segmented-control/SegmentedControl.css +57 -0
  292. package/dist/components/core/segmented-control/SegmentedControl.d.ts +37 -0
  293. package/dist/components/core/segmented-control/SegmentedControl.js +269 -0
  294. package/dist/components/core/segmented-control/SegmentedControl.types.d.ts +38 -0
  295. package/dist/components/core/segmented-control/SegmentedControl.types.js +8 -0
  296. package/dist/components/core/segmented-control/segmented-control-impl.css +57 -0
  297. package/dist/components/core/segmented-control-item/SegmentedControlItem.css +151 -0
  298. package/dist/components/core/segmented-control-item/SegmentedControlItem.d.ts +50 -0
  299. package/dist/components/core/segmented-control-item/SegmentedControlItem.js +101 -0
  300. package/dist/components/core/segmented-control-item/SegmentedControlItem.types.d.ts +37 -0
  301. package/dist/components/core/segmented-control-item/SegmentedControlItem.types.js +10 -0
  302. package/dist/components/core/segmented-control-item/segmented-control-item-impl.css +69 -0
  303. package/dist/components/core/select/Select.css +400 -0
  304. package/dist/components/core/select/Select.d.ts +29 -0
  305. package/dist/components/core/select/Select.js +524 -0
  306. package/dist/components/core/select/Select.types.d.ts +96 -0
  307. package/dist/components/core/select/Select.types.js +26 -0
  308. package/dist/components/core/select/select-impl.css +114 -0
  309. package/dist/components/core/select-chip/SelectChip.css +155 -0
  310. package/dist/components/core/select-chip/SelectChip.d.ts +20 -0
  311. package/dist/components/core/select-chip/SelectChip.js +273 -0
  312. package/dist/components/core/select-chip/SelectChip.types.d.ts +56 -0
  313. package/dist/components/core/select-chip/SelectChip.types.js +14 -0
  314. package/dist/components/core/select-chip/select-chip-impl.css +38 -0
  315. package/dist/components/core/spinner/Spinner.css +76 -0
  316. package/dist/components/core/spinner/Spinner.d.ts +5 -0
  317. package/dist/components/core/spinner/Spinner.js +29 -0
  318. package/dist/components/core/spinner/Spinner.types.d.ts +37 -0
  319. package/dist/components/core/spinner/Spinner.types.js +10 -0
  320. package/dist/components/core/spinner/spinner-impl.css +27 -0
  321. package/dist/components/core/status-dot/StatusDot.css +43 -0
  322. package/dist/components/core/status-dot/StatusDot.d.ts +35 -0
  323. package/dist/components/core/status-dot/StatusDot.js +46 -0
  324. package/dist/components/core/status-dot/StatusDot.types.d.ts +29 -0
  325. package/dist/components/core/status-dot/StatusDot.types.js +7 -0
  326. package/dist/components/core/status-dot/status-dot-impl.css +42 -0
  327. package/dist/components/core/subdomain-navbar/SubdomainNavbar.css +89 -0
  328. package/dist/components/core/subdomain-navbar/SubdomainNavbar.d.ts +21 -0
  329. package/dist/components/core/subdomain-navbar/SubdomainNavbar.js +127 -0
  330. package/dist/components/core/subdomain-navbar/SubdomainNavbar.types.d.ts +43 -0
  331. package/dist/components/core/subdomain-navbar/SubdomainNavbar.types.js +13 -0
  332. package/dist/components/core/subdomain-navbar/subdomain-navbar-impl.css +147 -0
  333. package/dist/components/core/tab/Tab.css +113 -0
  334. package/dist/components/core/tab/Tab.d.ts +36 -0
  335. package/dist/components/core/tab/Tab.js +53 -0
  336. package/dist/components/core/tab/Tab.types.d.ts +42 -0
  337. package/dist/components/core/tab/Tab.types.js +13 -0
  338. package/dist/components/core/tab/tab-impl.css +49 -0
  339. package/dist/components/core/tab-list/TabList.css +40 -0
  340. package/dist/components/core/tab-list/TabList.d.ts +26 -0
  341. package/dist/components/core/tab-list/TabList.js +124 -0
  342. package/dist/components/core/tab-list/TabList.types.d.ts +20 -0
  343. package/dist/components/core/tab-list/TabList.types.js +7 -0
  344. package/dist/components/core/tab-list/tab-list-impl.css +56 -0
  345. package/dist/components/core/table/Table.css +40 -0
  346. package/dist/components/core/table/Table.d.ts +19 -0
  347. package/dist/components/core/table/Table.js +55 -0
  348. package/dist/components/core/table/Table.types.d.ts +59 -0
  349. package/dist/components/core/table/Table.types.js +9 -0
  350. package/dist/components/core/table/table-impl.css +75 -0
  351. package/dist/components/core/table/use-table-sort.d.ts +43 -0
  352. package/dist/components/core/table/use-table-sort.js +51 -0
  353. package/dist/components/core/table-body/TableBody.css +6 -0
  354. package/dist/components/core/table-body/TableBody.d.ts +12 -0
  355. package/dist/components/core/table-body/TableBody.js +26 -0
  356. package/dist/components/core/table-body/TableBody.types.d.ts +36 -0
  357. package/dist/components/core/table-body/TableBody.types.js +7 -0
  358. package/dist/components/core/table-cell/TableCell.css +76 -0
  359. package/dist/components/core/table-cell/TableCell.d.ts +21 -0
  360. package/dist/components/core/table-cell/TableCell.js +31 -0
  361. package/dist/components/core/table-cell/TableCell.types.d.ts +43 -0
  362. package/dist/components/core/table-cell/TableCell.types.js +7 -0
  363. package/dist/components/core/table-head/TableHead.css +6 -0
  364. package/dist/components/core/table-head/TableHead.d.ts +22 -0
  365. package/dist/components/core/table-head/TableHead.js +52 -0
  366. package/dist/components/core/table-head/TableHead.types.d.ts +39 -0
  367. package/dist/components/core/table-head/TableHead.types.js +7 -0
  368. package/dist/components/core/table-head/table-head-impl.css +51 -0
  369. package/dist/components/core/table-header-cell/TableHeaderCell.css +126 -0
  370. package/dist/components/core/table-header-cell/TableHeaderCell.d.ts +21 -0
  371. package/dist/components/core/table-header-cell/TableHeaderCell.js +34 -0
  372. package/dist/components/core/table-header-cell/TableHeaderCell.types.d.ts +56 -0
  373. package/dist/components/core/table-header-cell/TableHeaderCell.types.js +9 -0
  374. package/dist/components/core/table-header-cell/table-header-cell-impl.css +74 -0
  375. package/dist/components/core/table-row/TableRow.css +18 -0
  376. package/dist/components/core/table-row/TableRow.d.ts +17 -0
  377. package/dist/components/core/table-row/TableRow.js +32 -0
  378. package/dist/components/core/table-row/TableRow.types.d.ts +45 -0
  379. package/dist/components/core/table-row/TableRow.types.js +7 -0
  380. package/dist/components/core/table-row/table-row-impl.css +31 -0
  381. package/dist/components/core/text-area/TextArea.css +325 -0
  382. package/dist/components/core/text-area/TextArea.d.ts +13 -0
  383. package/dist/components/core/text-area/TextArea.js +133 -0
  384. package/dist/components/core/text-area/TextArea.types.d.ts +67 -0
  385. package/dist/components/core/text-area/TextArea.types.js +19 -0
  386. package/dist/components/core/text-area/text-area-impl.css +36 -0
  387. package/dist/components/core/text-input/TextInput.css +400 -0
  388. package/dist/components/core/text-input/TextInput.d.ts +5 -0
  389. package/dist/components/core/text-input/TextInput.js +130 -0
  390. package/dist/components/core/text-input/TextInput.types.d.ts +96 -0
  391. package/dist/components/core/text-input/TextInput.types.js +24 -0
  392. package/dist/components/core/text-input/text-input-impl.css +36 -0
  393. package/dist/components/core/tooltip/Tooltip.css +101 -0
  394. package/dist/components/core/tooltip/Tooltip.d.ts +51 -0
  395. package/dist/components/core/tooltip/Tooltip.js +87 -0
  396. package/dist/components/core/tooltip/Tooltip.types.d.ts +38 -0
  397. package/dist/components/core/tooltip/Tooltip.types.js +9 -0
  398. package/dist/components/core/tooltip/TooltipAnchor.d.ts +52 -0
  399. package/dist/components/core/tooltip/TooltipAnchor.js +69 -0
  400. package/dist/components/core/tooltip/tooltip-anchor.css +145 -0
  401. package/dist/components/core/tooltip/tooltip-impl.css +54 -0
  402. package/dist/components/core/tooltip/use-tooltip.d.ts +111 -0
  403. package/dist/components/core/tooltip/use-tooltip.js +189 -0
  404. package/dist/components/core/typography/Typography.css +96 -0
  405. package/dist/components/core/typography/Typography.d.ts +297 -0
  406. package/dist/components/core/typography/Typography.js +28 -0
  407. package/dist/components/core/typography/Typography.types.d.ts +40 -0
  408. package/dist/components/core/typography/Typography.types.js +7 -0
  409. package/dist/components/css-time.d.ts +20 -0
  410. package/dist/components/css-time.js +30 -0
  411. package/dist/components/given.d.ts +7 -0
  412. package/dist/components/given.js +9 -0
  413. package/dist/components/hover-open.d.ts +34 -0
  414. package/dist/components/hover-open.js +90 -0
  415. package/dist/components/index.d.ts +114 -1
  416. package/dist/components/index.js +115 -2
  417. package/dist/components/layout/aspect-ratio/AspectRatio.css +29 -0
  418. package/dist/components/layout/aspect-ratio/AspectRatio.d.ts +24 -0
  419. package/dist/components/layout/aspect-ratio/AspectRatio.js +26 -0
  420. package/dist/components/layout/aspect-ratio/AspectRatio.types.d.ts +22 -0
  421. package/dist/components/layout/aspect-ratio/AspectRatio.types.js +7 -0
  422. package/dist/components/layout/aspect-ratio/aspect-ratio-impl.css +44 -0
  423. package/dist/components/layout/grid/Grid.css +76 -0
  424. package/dist/components/layout/grid/Grid.d.ts +31 -0
  425. package/dist/components/layout/grid/Grid.js +33 -0
  426. package/dist/components/layout/grid/Grid.types.d.ts +48 -0
  427. package/dist/components/layout/grid/Grid.types.js +7 -0
  428. package/dist/components/layout/grid/grid-impl.css +62 -0
  429. package/dist/components/layout/row/Row.css +85 -0
  430. package/dist/components/layout/row/Row.d.ts +32 -0
  431. package/dist/components/layout/row/Row.js +34 -0
  432. package/dist/components/layout/row/Row.types.d.ts +45 -0
  433. package/dist/components/layout/row/Row.types.js +7 -0
  434. package/dist/components/layout/scroller/Scroller.css +59 -0
  435. package/dist/components/layout/scroller/Scroller.d.ts +34 -0
  436. package/dist/components/layout/scroller/Scroller.js +36 -0
  437. package/dist/components/layout/scroller/Scroller.types.d.ts +38 -0
  438. package/dist/components/layout/scroller/Scroller.types.js +7 -0
  439. package/dist/components/layout/scroller/scroller-impl.css +45 -0
  440. package/dist/components/layout/stack/Stack.css +73 -0
  441. package/dist/components/layout/stack/Stack.d.ts +28 -0
  442. package/dist/components/layout/stack/Stack.js +30 -0
  443. package/dist/components/layout/stack/Stack.types.d.ts +41 -0
  444. package/dist/components/layout/stack/Stack.types.js +7 -0
  445. package/dist/components/visually-hidden.d.ts +22 -0
  446. package/dist/components/visually-hidden.js +31 -0
  447. package/dist/fonts/LICENSE-inter.txt +93 -0
  448. package/dist/fonts/LICENSE-red-hat-mono.txt +93 -0
  449. package/dist/fonts/fonts.css +111 -0
  450. package/dist/fonts/inter-cyrillic-ext-wght-normal.woff2 +0 -0
  451. package/dist/fonts/inter-cyrillic-wght-normal.woff2 +0 -0
  452. package/dist/fonts/inter-greek-ext-wght-normal.woff2 +0 -0
  453. package/dist/fonts/inter-greek-wght-normal.woff2 +0 -0
  454. package/dist/fonts/inter-latin-ext-wght-normal.woff2 +0 -0
  455. package/dist/fonts/inter-latin-wght-normal.woff2 +0 -0
  456. package/dist/fonts/inter-vietnamese-wght-normal.woff2 +0 -0
  457. package/dist/fonts/red-hat-mono-latin-ext-wght-normal.woff2 +0 -0
  458. package/dist/fonts/red-hat-mono-latin-wght-normal.woff2 +0 -0
  459. package/dist/marketing.css +289 -241
  460. package/package.json +18 -4
@@ -0,0 +1,458 @@
1
+ <!-- GENERATED from navbar.contract.json. Do not edit. -->
2
+
3
+ # Navbar
4
+
5
+ The bar across the top of a marketing page, and three regions: the mark that says whose site this is, the places the site has, and the things a reader reaches for rather than navigates to — the language, the theme, and what the site wants them to do.
6
+
7
+ It holds no destinations of its own. What goes in it is the NavbarItems and NavbarMenus a page composes, because a marketing site's navigation is written by the site rather than enumerated by this system, and a component that took an array of routes would be a second router nobody asked for. What this owns is the bar: where it sits, what it is made of, and what happens when it runs out of room.
8
+
9
+ Running out of room is the whole of its behaviour. Below the width its three regions fit in, the destinations and the utilities stop being drawn and a single control takes their place — and what that control opens is NavbarPanel, which this renders. The threshold is the bar's own width rather than the window's, because what decides whether the destinations fit is the room the bar has, and a bar in a column has less of it than a bar across a page.
10
+
11
+ ## Use when
12
+
13
+ - A marketing page needs its top-level navigation — the mark, the sections of the site, and whatever sits at the far end
14
+ - The same bar has to persist while the page scrolls, so a reader deep in a long page can still leave it
15
+ - The navigation has to work at a phone's width without the page writing a second version of it
16
+
17
+ ## Do not use
18
+
19
+ - The items are versions of one thing rather than places the site has → `TabList`
20
+ - What is wanted is one section's panel rather than the bar it hangs from → `NavbarMenu`
21
+ - The navigation runs down the side of an application rather than across the top of a page → nothing here does this
22
+ - A second bar further down the page. There is one landmark of this kind per page, and a reader who meets two has been told twice where they are and once too often which is authoritative
23
+ - A toolbar. Controls that act on what is below them — a filter row, a sort row, a set of view switches — are not places, and putting them in the site's navigation landmark means a screen reader announces them as somewhere to go
24
+ - A footer. The same links at the bottom of a page are a sitemap a reader reaches at the end, not a frame they navigate from, and they need none of the sticking or collapsing this does
25
+ - An app shell. This sticks to the top of a document that scrolls; an application whose regions scroll independently needs a frame this cannot be, and the product package is where that lives
26
+
27
+ ## Anatomy
28
+
29
+ Navbar renders 11 elements. A token binding names the part it applies to.
30
+
31
+ - `root` — `<header>`, class `dds-navbar`. The rail: what sticks, and nothing else. It paints no ground of its own — what a reader sees as the bar is the row inside it, and a rail that painted its own would be a band behind a surface that already has one.
32
+
33
+ It sticks: `position: sticky` with `inset-block-start: 0`, so it travels with the reader rather than being scrolled off and hunted for. Sticky rather than fixed, which is the whole difference between a bar the page has made room for and a bar that covers the first line of the page — a fixed bar obliges every consumer to pad the top of their own document by a height only this component knows.
34
+
35
+ It carries the ink, and that is what lets the whole bar change together. Every end inherits it: the mark, the destinations, the utilities and the trigger follow one declaration, and none of them can be left behind on a ground the others moved off.
36
+
37
+ It is a `<header>` and takes no role of its own. A `<header>` at the top level of a document is already the `banner` landmark, and writing `role="banner"` says the same thing a second time in a way that goes stale if the element ever moves inside a `<section>`. The accessible name goes on the `nav` inside it, because what a reader needs named is the set of destinations rather than the box around it.
38
+
39
+ Its gutter does not change when the page moves, and that is a correction rather than an omission. It gained one on scroll while the ends were being removed and the pill was the only thing left — but a gutter appearing is the row narrowing, and the ends take a share of whatever width the row has, so both of them lost half of it at the instant they were meant to be rising cleanly away. Nothing about the condensed state touches layout now: what changes is what can be seen, and every box stays exactly where it was.
40
+
41
+ It holds no air of its own. That moved to the row when the collapsed bar gained a ground: paint cannot cover a parent's padding, so a rail that padded itself would have left a transparent strip above and below an otherwise opaque bar. What the reader sees is unchanged — the row's `space.inset.sm` is the rail's eight and the row's four said once — and so is the thing that measure exists to protect: the mark sits the same distance below the top edge here as it does in the panel that opens over this bar, so it does not move at the moment the panel appears.
42
+ - `inner` — `<div>`, class `dds-navbar__inner`. The row: three regions in order — the mark, the destinations, the utilities. It takes the whole width the rail gives it and is not capped at `size.content.max` the way the page's own content is. A bar is the frame around a page rather than a column of it: its mark belongs at the edge of the window and its actions at the other edge, and a bar that stopped where the paragraphs stop would leave both floating in from the sides of a wide screen with nothing under them.
43
+
44
+ Drawn in full it paints nothing. No ground, no corner and no lift: the only shape in the bar is the pill around the destinations, and a container behind it would be a second rounded box holding one rounded box. The bar is an arrangement rather than a surface at that width, and what separates it from the page is the air it holds above and below itself.
45
+
46
+ Collapsed it is a surface, and the ground it takes then is a part of its own rather than a binding here — see `ground`, which explains why the paint cannot sit on the box it belongs to.
47
+
48
+ It carries the bar's air, which the rail used to. A rail that padded itself would hold the row's ground off its own edges by that much, and the collapsed bar would be an opaque band with a transparent strip above and below it. The step is unchanged where it shows: the rail's eight and the row's four were always read together, and `space.inset.sm` is the two of them said once.
49
+
50
+ It reserves `size.control.md` in the block axis — a control's height, because a control is what it holds: the action the bar keeps when it collapses is a button, and a row that reserved only a tap target would be sized by that button instead, growing the bar and dropping the mark eight pixels below where the panel draws it. The panel's own header reserves the same measure for the same reason, which is what keeps the mark still when one opens over the other. With eight either side that is a bar of fifty-six. Forty-eight was right while the collapsed bar held a mark and a glyph, and stopped being right the moment it held a control as well: four pixels above a forty-pixel button is not a margin, it is the button very nearly touching the edge of the bar. The step went up rather than the button coming down, because the button is the page's and a bar that only looked correct at one button size would be a bar with an undeclared requirement in it. The row is otherwise as tall as the tallest thing in it, and what is in it changes with the width — so without a floor the bar would be one height beside a set of destinations and another beside a single control, and the page below would move when it changed.
51
+
52
+ It is the query container, and it is this row rather than the rail for a reason that is easy to get wrong: `container-type: inline-size` brings layout containment with it, and a box with layout containment becomes the containing block for any `position: fixed` inside it. Put on the rail, it would resolve the panel's `inset: 0` against the bar — a full-page surface collapsed to a strip the height of the header. The row holds no fixed descendants, and its width is the bar's own less the gutter, which is the measure the regions actually have to fit in.
53
+
54
+ `min-inline-size: 0` so the row is allowed to shrink at all. Without it a long set of destinations pushes the utilities off the end rather than letting the row reach the width where it gives up.
55
+
56
+ Once the page moves it becomes the pill. The shape does not travel between elements and nothing in the markup is rearranged: the row already holds all three ends, so what changes is which of the two boxes paints. That is the whole of the condensed state — the mark and the actions were always inside this box, and at rest it simply drew nothing around them.
57
+
58
+ The control it reserves is `size.control.lg`, which is what the bar's actions are. Collapsed, the row holds one of them beside the mark and the way in, so reserving anything smaller would let that button set the bar's height and make a page with one taller than a page without.
59
+
60
+ The measure it reserves is `size.bar.height`, not a control's. Reserving a control was the near miss: it is a floor, and the action the bar keeps when it collapses is taller than the floor less this row's own air — so that button set the height, the row's contents came out a step shorter than the panel's header, and the mark moved down four pixels at the moment a surface opened over the bar drawing it. Reserving the bar's height instead puts the contents at one measure whatever is in them, which is the thing the panel can then agree with.
61
+ - `ground` — `<div>`, class `dds-navbar__ground`. The collapsed bar's ground, and an element rather than a binding on the row it paints.
62
+
63
+ The row cannot paint itself, which is the whole reason this exists. Whether the bar is collapsed is a question about the row's width, `@container` is the only thing that can ask it, and a container query styles the descendants of the box that declares it — never that box. The row declares it, so the row is the one element in the bar the query cannot reach. A child of the row can be reached, and `position: absolute` with `inset: 0` makes that child exactly the size of what it stands in for: the containing block is the row's padding box, so the ground covers the row's air as well as its contents and the bar is opaque edge to edge.
64
+
65
+ `color.bg.page` rather than the pill's `surface-raised`, though the two resolve to the same white today. The pill is a surface lifted off the page; this is the page's own chrome, held at the top while the rest of it goes by — and the roles say which is which even where the values agree.
66
+
67
+ `elevation.surface.sticky` for the same reason, and it is the role's own stated job: a surface pinned in place while content scrolls beneath it, stronger than `raised` because it has to stay distinct from whatever passes under it. The pill's `floating` would be the wrong claim — nothing here floats over anything, it is the top of the page.
68
+
69
+ Not drawn where the bar is drawn in full, which is the stylesheet's call and not this contract's. A width is not something `presentWhen` can name.
70
+
71
+ It lifts only once there is something to lift over. A shadow is a claim that what it is on is behind it, and at the top of an unscrolled page nothing is — the bar is level with the first thing the reader meets. Bound in the condensed state alone rather than at rest and overridden, so the resting appearance is the absence of a rule rather than a rule cancelling another.
72
+ - `brand` — `<div>`, class `dds-navbar__brand`. The leading end: whose site this is. A slot rather than a prop with a shape, because a mark is a logo, a wordmark, or both side by side, and each is an element the page already has — an `<a href="/">` around an SVG, in practice.
73
+
74
+ It does not shrink, and it is the one thing that survives every width. A bar too narrow for everything in it gives up the destinations and the utilities; the mark stays, because a bar with no mark is no longer a site's bar.
75
+
76
+ Nothing here makes it a link. A mark that goes home is an `<a>` the page passes in, and a `<header>` that wrapped its contents in a link it was not given would be a nested interactive element the first time anyone passed one.
77
+
78
+ It moves. At rest it stands outside the pill at the leading end of the row; once the bar gathers it is rendered inside the pill instead, which is the whole of what the condensed state does. Rendered in one place at a time rather than drawn twice and hidden — two marks in the markup is two things a screen reader has to be kept from announcing, and a hidden one is only ever one stylesheet away from being read out.
79
+
80
+ It decides how tall the mark is rather than taking whatever it was handed. A slot that let the page set the measure would let the page set the bar's height with it — a logo an inch tall does not overflow, it makes the row an inch tall and every page below it move down. The step is `icon.size.md`, which sits inside the pill with room either side rather than filling it: a mark as tall as the shape around it reads as a label in a box rather than a mark on a bar. Twenty-four in a forty-eight pill leaves twelve either side, and it is the step the subdomain bar was already drawing its mark at — two bars off the same family disagreeing about how tall a logo is was a difference saying nothing.
81
+
82
+ It measures border-box, which matters only because it collapses. Both copies of this part go to nothing wide when they are not the live one — and a width set on a content box leaves the padding standing, so the inset this carries would sit in the bar as a strip of nothing: twelve pixels inside the pill, a gutter's worth at the row's edge. Border-box takes the padding with the width, so nothing is what nothing means.
83
+
84
+ It carries the corner of what it holds, which matters only while it is collapsing. The box clips its contents for the part of that journey where it is narrower than they are — and a rectangle cuts a pill-shaped button off square, so the actions appeared to have corners for four hundred milliseconds and then grow them back. `radius.pill` on the box that does the cutting means the cut has the shape of the thing being cut.
85
+
86
+ At rest it is invisible either way: the box is a share of the row, far wider than what is in it, so its own corners are nowhere near anything. Rendered only when `brand` is set.
87
+ - `nav` — `<nav>`, class `dds-navbar__nav`. The destinations, and the part that carries the accessible name. `<nav>` is the `navigation` landmark, which is the honest role for a set of places — and it goes inside the pill rather than being the pill, so the mark and the actions can join them there without being announced as somewhere to go.
88
+
89
+ What goes in it is the page's: NavbarItems for single destinations, NavbarMenus for the sections that open. This declares the row, the gap and the landmark, and nothing about what the row holds or what it reveals.
90
+
91
+ It does not wrap and it does not scroll sideways. A bar that wrapped to two lines has changed the height of something every page below it has made room for; a bar that scrolled sideways would hide destinations behind a gesture nobody is offered on a marketing page. What happens instead when they stop fitting is that the whole region goes and the trigger takes over, which is a decision a reader can see.
92
+
93
+ It is not rendered at the widths the panel is. The panel carries the landmark there, and two landmarks naming the same destinations would tell a reader the site has two navigations — the one they cannot see being the one they are offered first.
94
+
95
+ It does not shrink below what is in it. `min-inline-size: 0` was on this box and let it, which is a licence a container can only use by breaking: everything inside declares `flex-shrink: 0` and keeps its measure, so the box got narrower and its contents stayed the same size and drew over each other — a destination printed across a switcher, which is what a squeeze looks like when nothing is allowed to give.
96
+
97
+ The default is `auto`, which for a flex item means its own min-content, so running out of room now overflows the row instead. That is not a good outcome either and it is a far better failure: it is visible, it is obviously wrong, and it says the bar has more in it than its width can hold — which is a decision for the page rather than something for this component to hide.
98
+
99
+ The row above still carries the licence, and has to: it is the query container, and a container that cannot shrink never reaches the width where it gives up and collapses.
100
+
101
+ No gap between the destinations, which is about the pointer rather than about the spacing. Each one pads its own words, so there is a clear step between them either way — what a gap adds is a strip of row belonging to neither, and a section that opens under the pointer treats that strip as having left. Moving from one name to the next, a reader crossed it: the first section armed its close, and if the hand paused in the four pixels between them it fired, so the panel shut and the next one opened rather than the two exchanging places.
102
+
103
+ At nothing the targets touch, and the pointer is over a destination at every moment of the journey. The words stay `space.inset.sm` apart because that is what each of them is padded by — the spacing a reader sees was never the gap.
104
+ - `preferences` — `<div>`, class `dds-navbar__preferences`. What a reader sets rather than goes to, kept with the destinations.
105
+
106
+ Inside the pill and outside the landmark, which is the whole reason it is a part of its own. A language picker is not a place the site has, so it cannot go in `nav` — a reader tabbing the navigation would be offered it as somewhere to go. And it is not a conversion either, so the trailing end is the wrong home: the pill is the set of things the bar is about, and the locale a reader is reading in belongs to that set rather than to the pair of buttons asking them to sign up.
107
+
108
+ Drawn at every scroll position, unlike the two ends. The pill is the one region that is always itself: at rest it holds the sections, gathered it holds everything, and this sits beside the sections in both. That is what makes it worth being here rather than in `utilities`, which is drawn in the row at one moment and inside the pill at the next.
109
+
110
+ Gone with the pill when the bar collapses, and handed to the panel's foot with the utilities — so a reader on a phone still finds it, in the one place the bar's trailing end has gone. Rendered only when `preferences` is set.
111
+ - `utilities` — `<div>`, class `dds-navbar__utilities`. The trailing end: what a reader reaches for rather than navigates to. A language switcher, a theme switcher, and what the site wants them to do — a slot, because each of those is a component the page already has and none of them is this one's to invent.
112
+
113
+ Separate from the destinations on purpose, and outside the landmark. A language is not a place the site has and a sign-up is not a section of it; a reader tabbing the navigation landmark should reach the end of the site's sections before meeting either. Putting them inside `nav` would announce a language picker as somewhere to go.
114
+
115
+ It does not shrink, and it is not drawn once the bar collapses. Everything here moves to the foot of the panel, where there is room for each of them at full width — which is the arrangement a narrow screen wants anyway.
116
+
117
+ Like the mark, it moves inside the pill once the bar gathers, and for the same reason: the gathered bar is one object, and an action outside the shape is an action that has been left behind by it.
118
+
119
+ It measures border-box, which matters only because it collapses. Both copies of this part go to nothing wide when they are not the live one — and a width set on a content box leaves the padding standing, so the inset this carries would sit in the bar as a strip of nothing: twelve pixels inside the pill, a gutter's worth at the row's edge. Border-box takes the padding with the width, so nothing is what nothing means.
120
+
121
+ It carries the corner of what it holds, which matters only while it is collapsing. The box clips its contents for the part of that journey where it is narrower than they are — and a rectangle cuts a pill-shaped button off square, so the actions appeared to have corners for four hundred milliseconds and then grow them back. `radius.pill` on the box that does the cutting means the cut has the shape of the thing being cut.
122
+
123
+ At rest it is invisible either way: the box is a share of the row, far wider than what is in it, so its own corners are nowhere near anything. Rendered only when `utilities` is set.
124
+ - `compact-action` — `<div>`, class `dds-navbar__compact-action`. The action the bar keeps when it collapses.
125
+
126
+ Everything else at the trailing end stops being drawn at that width and is laid out down the foot of the panel instead, which is right for a language switcher and wrong for the one thing the page most wants pressed: a reader would have to open a menu to find it. So one action stays out, beside the control that opens the panel.
127
+
128
+ A slot of its own rather than the first of `utilities`, because the bar cannot tell which one matters. A pair reading "Log in" and "Sign up" is the usual case and the first of them is the wrong answer — and a component that picked by position would be making a decision about the site's funnel from the order two elements happened to be written in.
129
+
130
+ It is a duplicate, and deliberately. Whatever goes here almost certainly also goes in `utilities`, so the panel's foot carries it too — a reader who opens the panel looking for it finds it where the rest of the set is rather than having to close the panel again. Only one of the two is ever on screen, because the panel covers the bar.
131
+
132
+ Drawn only where the trigger is. At the widths where the bar draws its trailing end in full, this would be the same action twice in one row. Rendered only when `compactAction` is set.
133
+ - `trigger` — `<button>`, class `dds-navbar__trigger`. The control that opens the panel, drawn only at the widths where the other two regions are not. Always rendered rather than conditional: what decides whether a reader sees it is the bar's width, and a width is not something a contract can gate a part on — so it is always in the markup and the stylesheet decides, which is also what lets its name and its state be checked at all.
134
+
135
+ `size.target.min` in both directions, declared rather than emergent. The glyph is drawn at whatever step reads correctly beside the bar's own text, and a bar that let that step decide the target ships a control smaller than the pad of a finger — the one accessibility failure a navigation bar cannot afford, because at that width it is the only way through the site.
136
+
137
+ It carries `aria-expanded`, which is the only thing telling a reader who cannot see the panel whether it is open. The glyph swaps from a bar stack to a close mark to say the same thing to everyone else.
138
+
139
+ No hover fill. A pointer over it gets the cursor and nothing else, which is the one departure here from how a bare control usually answers: the bar draws a pill behind the destinations, and a second filled shape appearing beside it under the pointer reads as a competing object rather than as feedback. The control is still reachable and still says where focus is — the focus ring is the affordance that had to stay, because it answers to a reader who has no pointer to hover with.
140
+
141
+ It takes the bar's ink rather than the browser's. A `<button>` does not inherit `color` — the UA gives it `buttontext`, which is near-black and indistinguishable from `color.fg.default` on a light bar, so this was invisible until a bar was asked to stand on a dark ground and the one control that opens the panel went on drawing itself in black on black. The destinations beside it say the same thing for the same reason.
142
+
143
+ It resets its padding, which a `<button>` needs and `appearance: none` does not do. The user-agent sheet gives a button an asymmetric pad — six pixels across, one down — so a control declared as a square target drew as a rectangle a third wider than it was tall, and the shape only became visible when something filled it under a pointer. The measure comes from the minimums above; nothing else should be adding to them.
144
+ - `panel-host` — `<div>`, class `dds-navbar__panel-host`. Where the panel is rendered, and nothing else. It holds no ground, no measure and no arrangement — NavbarPanel brings all of those — so what this part is for is being a place in the tree rather than a box on the page. `display: contents` is how it says so.
145
+
146
+ In the bar rather than a portal. The panel is `position: fixed`, so it escapes the flow without having to escape the tree, and staying in the tree keeps it in the DOM order a screen reader walks: immediately after the control that opened it, which is where a reader expects to find what they just opened.
147
+
148
+ It carries no tone. It did while the panel took one, and the binding outlived the axis: the panel paints paper at every tone now and sets its own ink, so an inverse colour here was inherited by nothing and would have been white on white the moment the panel stopped saying otherwise. Rendered only when `menuOpen` is set.
149
+ - `cluster` — `<div>`, class `dds-navbar__cluster`. The pill, and the one shape in the bar. At rest it holds the destinations alone and hugs them; once the page moves, the mark and the actions come inside it and it takes the row. Same element throughout — what changes is what is in it, not which box is painted, so the ground, the corner and the lift are declared once and never handed between parts.
150
+
151
+ It is not the `<nav>`, and that is the whole reason it exists rather than the landmark being the pill. A reader moving between landmarks should be given the sections of the site; a mark that goes home and a pair of conversion actions are neither, and a pill that was also the landmark would announce all three as places. The box a reader sees and the box a screen reader is told about are different boxes here, and this is the first.
152
+
153
+ Nothing about it changes with the state. The ground, the corner and the lift are bound once and hold whether the bar is at rest or gathered — what the condensed state moves is the contents, not the shape around them.
154
+
155
+ It carries a gap of its own, which does nothing while it holds the destinations alone and separates the three ends once they are inside it. Declared rather than conditional: a measure that only applies when there is more than one thing to space is a measure that costs nothing when there is not.
156
+
157
+ Its inset is the same on both axes and it is tight, because everything that meets its ends brings its own. A button is a filled shape with its own padding inside it and a destination pads its words, so the pill only has to clear them rather than space them. The mark is the exception — a picture with nothing of its own — and it carries the difference itself rather than the pill widening for it, which would push the two ends that were already right further in.
158
+
159
+ When it gathers is a declared state again. It was removed when the tone axis arrived, because exhaustiveness asks for a binding in every cell of the grid an axis creates and there was nothing honest to give — the pill looks the same gathered as at rest, which is the point of it. What brought it back is a part that does have something to say: the collapsed bar's ground takes its lift only once the page is moving under it, and a single unconditional binding in that state covers both tones. The state was always real; it simply had nothing to bind until then.
160
+
161
+ It does not shrink below what is in it. `min-inline-size: 0` was on this box and let it, which is a licence a container can only use by breaking: everything inside declares `flex-shrink: 0` and keeps its measure, so the box got narrower and its contents stayed the same size and drew over each other — a destination printed across a switcher, which is what a squeeze looks like when nothing is allowed to give.
162
+
163
+ The default is `auto`, which for a flex item means its own min-content, so running out of room now overflows the row instead. That is not a good outcome either and it is a far better failure: it is visible, it is obviously wrong, and it says the bar has more in it than its width can hold — which is a decision for the page rather than something for this component to hide.
164
+
165
+ The row above still carries the licence, and has to: it is the query container, and a container that cannot shrink never reaches the width where it gives up and collapses.
166
+
167
+ It is a positioning context, which it needs because of what it holds rather than what it is. The copies of the ends inside it are taken out of flow while they are not being shown — a box at zero opacity that still reserved width would keep the pill at its gathered size at every scroll position — and an out-of-flow box resolves against the nearest positioned ancestor. Without this that was the row, so on the way back from a scroll the pill's own mark and actions jumped to the row's leading edge and faded out there, over the mark that was arriving.
168
+
169
+ Apply these classes from the generated `navbarParts` constant rather than writing the strings by hand.
170
+
171
+ ## Composition
172
+
173
+ - Can contain: `NavbarItem`, `NavbarMenu`
174
+ - Never contains: `Navbar`, `NavbarPanel`, `TabList`, `Card`, `CardButton`, `Table`, `BottomSheet`, `Accordion`, `Button`, `Link` — in children or in any prop that takes a node
175
+
176
+ ## Props
177
+
178
+ ### tone — `default` | `inverse` (default `default`)
179
+
180
+ - `default` — The page begins on a light ground, which is most marketing pages. The bar paints in ink and the pill is paper
181
+ - `inverse` — The first section of the page paints its own dark ground and the bar stands on it — a dark hero, a photograph, a brand-coloured takeover. The bar's ink runs light, the pill becomes a veil of white rather than a sheet of it, and the collapsed bar takes a solid dark ground of its own
182
+
183
+ ### label — `string` **Required.**
184
+
185
+ Use when: Always — it names the navigation landmark, and a page with an unnamed one tells a screen-reader user there is navigation here without saying which navigation. Name the set rather than the act: 'Main', not 'Main navigation' — the role already supplies the word, and a name carrying it is announced as 'main navigation navigation'
186
+ Never for: A visible heading. Nothing draws this. A bar needs no title, and a page that wants one has a heading of its own below the bar
187
+
188
+ ### menuLabel — `string` **Required.**
189
+
190
+ Use when: Always — the trigger is an icon-only button and this is the only name it has, at the width where it is the only way through the site. Name what it reveals rather than its state: 'Menu', not 'Open menu', because aria-expanded already says which way it is and a name that also said so would contradict itself every other press
191
+ Never for: A tooltip or visible text. The trigger draws a glyph and nothing else; this is the name a screen reader reads
192
+
193
+ ### closeLabel — `string` **Required.**
194
+
195
+ Use when: Always — it names the panel's close button, which is the only visible way out of a surface covering the whole page. 'Close' is enough; the panel it closes is the only thing open
196
+ Never for: The trigger's name. They are two controls in two places — the trigger is in the bar underneath the panel, and a reader cannot reach it while the panel is open
197
+
198
+ ### brand — `node`
199
+
200
+ Use when: Effectively always on a real site — the mark, and usually an anchor to the home page wrapped around it. It is drawn twice: in the bar, and again in the panel's header, where it is the only thing left saying whose site this is
201
+ Never for: A heading for the page. This is the site's mark, not the page's title, and a reader who meets the page's `<h1>` in the bar has been told the name of somewhere they already are
202
+
203
+ ### utilities — `node`
204
+
205
+ Accepts: Button, ButtonIcon, DropdownMenu
206
+ Use when: The bar's trailing end has something in it — a language switcher, a theme switcher, a conversion action, or some combination. A switcher is a DropdownMenu with the current choice on its trigger, which is what DropdownMenu's own guidance describes and why it is accepted here alongside the two controls. They are drawn in the row at wide widths and across the foot of the panel once it collapses
207
+ Never for: Destinations. Anything that goes to a section of the site belongs in the children, where the navigation landmark announces it as one. The trailing end is for what a reader reaches for, not for the places the bar ran out of room for
208
+
209
+ ### compactAction — `node`
210
+
211
+ Accepts: Button, ButtonIcon
212
+ Use when: The one thing a reader should still be able to do once the bar has collapsed and everything else has gone into the panel — a sign-up, usually. Drawn beside the control that opens the panel, and only at the widths where that control is drawn
213
+ Never for: The whole of utilities. A phone has room for one action beside a mark and a menu button, and a bar handed two of them either wraps or pushes the mark off its own edge — the rest belong in utilities, which the panel lays out down its foot where there is room for all of them
214
+
215
+ ### preferences — `node`
216
+
217
+ Accepts: NavbarSwitcher, DropdownMenu, ButtonIcon
218
+ Use when: A switcher that belongs with the destinations rather than with the conversion — a language picker, a theme toggle. It is drawn inside the pill, beside the sections, at every scroll position. A NavbarSwitcher is the one built for it: in the pill it is a trigger and a menu, and in the collapsed panel the same element becomes a row that opens a page of its own with a way back, because a dropdown inside a surface already covering the screen is a surface inside a surface
219
+ Never for: A conversion action. Those belong in utilities, at the trailing end of the bar where a reader looks for them, and drawing one inside the pill would put the thing the page most wants pressed in among the places it goes
220
+
221
+ ### menuOpen — `boolean`
222
+
223
+ Use when: The page is holding whether the panel is open, because something else depends on it — a route change that should close it, a surface of its own that must not open at the same time. Passing it makes the bar controlled: it shows what it is told and reports presses through onMenuOpenChange.
224
+
225
+ Leave it off and the bar holds its own answer, which is the ordinary case: a narrow-width navigation panel is opened and closed by the reader and by nothing else
226
+ Never for: Half of a controlled bar. A menuOpen passed without an onMenuOpenChange to move it is a panel that cannot be closed from its own close button — a trap around the whole page rather than a bar with a bug
227
+
228
+ ### onMenuOpenChange — `callback`
229
+
230
+ Use when: Whenever menuOpen is — together they are how a page holds the panel. It is called with the state being moved to, by the trigger, by the close button and by Escape, so a page listening to it hears every way the panel can change
231
+ Never for: Navigation. This says whether the panel is showing; a page that also routed on it would close the panel by leaving, and a reader pressing a destination inside it would fire both
232
+
233
+ Also accepts everything from `HTMLAttributes<HTMLElement>`.
234
+
235
+ ## Accessibility
236
+
237
+ 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.
238
+
239
+ - Announced as: `banner`
240
+ - `Tab` — Moves through the bar in reading order — the mark, then each destination, then the utilities. Nothing here is a composite widget, so there is no roving tabindex and no arrow keys: a reader uses the key they already have, and a menu inside the bar answers for its own. While the panel is open, focus is held inside it.
241
+ - `Escape` — Closes the panel and returns focus to the trigger that opened it. The way out that does not have to be seen, which is what makes it the one the close button must not be the only alternative to.
242
+ - accessible name from label, on the navigation landmark rather than on the bar, so a reader moving between landmarks is told which set of destinations this is
243
+ - accessible name from menuLabel on the trigger, which draws a glyph and no text. Nothing else in the bar names it.
244
+ - The trigger reports whether the panel is open with aria-expanded. An icon-only button that opens something and does not say whether it is open leaves a reader pressing it to find out.
245
+ - The header carries no explicit role. A <header> that is not inside a sectioning element is already the banner landmark, and writing the role as well says it twice — and says it wrongly if the element is ever nested, where the implicit landmark correctly disappears and a hand-written role would not.
246
+ - The bar sticks rather than fixes, so it takes its own height out of the page instead of covering the first thing in it. A fixed bar hides content at the top of every document and hides the target of every in-page anchor the site has.
247
+ - At most one NavbarMenu in the bar is open at a time, which is this component's to enforce because no menu can see its neighbours. Two open panels overlap in front of the page.
248
+ - The threshold at which the bar collapses is its own width rather than the window's. A viewport query is right about the page and wrong about the component, and it is wrong silently — the arrangement it draws is a real one, just not the one the width called for.
249
+ - The mark the page passes as brand goes home, and carries its own accessible name. Nothing here can do either: wrapping the slot in an anchor would nest one inside the anchor a real site already passes, and the name has to describe a picture this component never sees — "Deriv home" rather than the word a reader would hear if the mark's own title were left to stand. A mark that is not a link is the one way out of a site's deepest page that every reader expects to be there, missing.
250
+
251
+ ## Rules
252
+
253
+ - **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.
254
+
255
+ 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.
256
+
257
+ 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.
258
+
259
+ 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.
260
+
261
+ 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.
262
+
263
+ 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.
264
+ Guidance only — cannot be checked automatically.
265
+ - **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.
266
+ Guidance only — cannot be checked automatically.
267
+ - **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.
268
+
269
+ 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.
270
+
271
+ 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.
272
+ Guidance only — cannot be checked automatically.
273
+ - **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.
274
+
275
+ 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.
276
+
277
+ 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.
278
+
279
+ 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.
280
+
281
+ 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.
282
+
283
+ 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.
284
+
285
+ 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.
286
+
287
+ 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.
288
+
289
+ 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.
290
+ Guidance only — cannot be checked automatically.
291
+ - **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.
292
+
293
+ 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.
294
+
295
+ 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.
296
+
297
+ 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.
298
+
299
+ 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.
300
+
301
+ 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.
302
+
303
+ 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.
304
+
305
+ 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.
306
+
307
+ 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.
308
+ Guidance only — cannot be checked automatically.
309
+ - **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.
310
+
311
+ 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.
312
+
313
+ 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.
314
+
315
+ 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.
316
+ Guidance only — cannot be checked automatically.
317
+
318
+ ## Anti-examples
319
+
320
+ ❌ Navbar for: The items are versions of one thing rather than places the site has
321
+ A landmark says the items go somewhere. A strip says these are the same offer seen differently, and its items carry no href at all. Drawing a comparison as navigation tells a reader the page is about to change under them, and the back button will disagree
322
+ → use `TabList` instead.
323
+
324
+ ❌ Navbar for: What is wanted is one section's panel rather than the bar it hangs from
325
+ A menu belongs inside this rather than instead of it — a bar with a Trading panel in it is one of these holding one of those
326
+ → use `NavbarMenu` instead.
327
+
328
+ ❌ Navbar for: The navigation runs down the side of an application rather than across the top of a page
329
+ → nothing in this system does this. Not a gap waiting to be filled — the case belongs outside it.
330
+
331
+ ## Example
332
+
333
+ ```tsx
334
+ import { Navbar, NavbarItem, Button } from '@deriv-com/dds-marketing'
335
+ import { DerivCoralWordmark } from '@deriv-com/quill-logos-web'
336
+
337
+ <Navbar label="Main" menuLabel="Menu" closeLabel="Close" brand={<DerivCoralWordmark />} utilities={<Button size="md" href="/signup">Open account</Button>}>
338
+ <NavbarItem href="/trading">Trading</NavbarItem>
339
+ <NavbarItem href="/platforms">Platforms</NavbarItem>
340
+ <NavbarItem href="/about">About</NavbarItem>
341
+ </Navbar>
342
+ ```
343
+
344
+ ```tsx
345
+ import { useState } from 'react'
346
+ import { Navbar, NavbarItem, Button } from '@deriv-com/dds-marketing'
347
+ import { DerivCoralWordmark } from '@deriv-com/quill-logos-web'
348
+
349
+ // Navbar holds nothing: menuOpen is the consumer's, and it does not move until
350
+ // the value handed back by onMenuOpenChange is written to it.
351
+ const [menuOpen, setMenuOpen] = useState(false)
352
+ <Navbar label="Main" menuLabel="Menu" closeLabel="Close" brand={<DerivCoralWordmark />} utilities={<Button size="md" href="/signup">Open account</Button>} menuOpen={menuOpen} onMenuOpenChange={setMenuOpen}>
353
+ <NavbarItem href="/trading">Trading</NavbarItem>
354
+ <NavbarItem href="/platforms">Platforms</NavbarItem>
355
+ <NavbarItem href="/about">About</NavbarItem>
356
+ </Navbar>
357
+ ```
358
+
359
+ ## In use
360
+
361
+ Most rows below hold the same set, written once here:
362
+
363
+ ```tsx
364
+ import { NavbarItem } from '@deriv-com/dds-marketing'
365
+
366
+ const navbaritems = (
367
+ <>
368
+ <NavbarItem href="/trading">Trading</NavbarItem>
369
+ <NavbarItem href="/platforms">Platforms</NavbarItem>
370
+ <NavbarItem href="/about">About</NavbarItem>
371
+ </>
372
+ )
373
+ ```
374
+
375
+ ### Three regions
376
+
377
+ The mark at one end, the destinations in the middle, what a reader reaches for at the other. Each region is a slot, and the bar takes no view on what is in it.
378
+
379
+ ```tsx
380
+ import { Button, Navbar } from '@deriv-com/dds-marketing'
381
+ import { DerivCoralWordmark } from '@deriv-com/quill-logos-web'
382
+
383
+ // Mark, destinations and a conversion
384
+ <Navbar label="Main" menuLabel="Menu" closeLabel="Close" brand={<DerivCoralWordmark />} utilities={<Button size="md" href="/signup">Open account</Button>}>{navbaritems}</Navbar>
385
+
386
+ // No utilities — a bar that only navigates
387
+ <Navbar label="Main" menuLabel="Menu" closeLabel="Close" brand={<DerivCoralWordmark />}>{navbaritems}</Navbar>
388
+
389
+ // No mark — inside a flow the reader is already in
390
+ <Navbar label="Main" menuLabel="Menu" closeLabel="Close">{navbaritems}</Navbar>
391
+ ```
392
+
393
+ ### The two tiers at the trailing end
394
+
395
+ What decides the tier is not how important the destination feels but how many the bar already has. Primary means something only while it is the one.
396
+
397
+ ```tsx
398
+ import { Button, Navbar, NavbarItem } from '@deriv-com/dds-marketing'
399
+ import { DerivCoralWordmark } from '@deriv-com/quill-logos-web'
400
+
401
+ // Primary — the step the site exists to produce
402
+ <Navbar label="Main" menuLabel="Menu" closeLabel="Close" brand={<DerivCoralWordmark />} utilities={<Button size="md" href="/signup">Open account</Button>}>
403
+ <NavbarItem href="/trading">Trading</NavbarItem>
404
+ <NavbarItem href="/platforms">Platforms</NavbarItem>
405
+ </Navbar>
406
+
407
+ // Secondary — the quieter of a pair
408
+ <Navbar label="Main" menuLabel="Menu" closeLabel="Close" brand={<DerivCoralWordmark />} utilities={<Button size="md" href="/login" variant="secondary">Log in</Button>}>
409
+ <NavbarItem href="/trading">Trading</NavbarItem>
410
+ <NavbarItem href="/platforms">Platforms</NavbarItem>
411
+ </Navbar>
412
+ ```
413
+
414
+ ### Where the reader is
415
+
416
+ One destination carries current. The bar takes no view on which — it is the item that says so, and at most one in a row should.
417
+
418
+ ```tsx
419
+ import { Button, Navbar, NavbarItem } from '@deriv-com/dds-marketing'
420
+ import { DerivCoralWordmark } from '@deriv-com/quill-logos-web'
421
+
422
+ // Trading is the current section
423
+ <Navbar label="Main" menuLabel="Menu" closeLabel="Close" brand={<DerivCoralWordmark />} utilities={<Button size="md" href="/signup">Open account</Button>}>
424
+ <NavbarItem href="/trading" current>Trading</NavbarItem>
425
+ <NavbarItem href="/platforms">Platforms</NavbarItem>
426
+ <NavbarItem href="/about">About</NavbarItem>
427
+ </Navbar>
428
+ ```
429
+
430
+ ### The ground the bar stands on
431
+
432
+ A page whose first section paints its own dark ground needs a bar that reads on it. The mark and the actions are the page's to supply in a form that does.
433
+
434
+ ```tsx
435
+ import { Button, Navbar } from '@deriv-com/dds-marketing'
436
+ import { DerivCoralWordmark } from '@deriv-com/quill-logos-web'
437
+
438
+ // default — a page that begins on paper
439
+ <Navbar label="Main" menuLabel="Menu" closeLabel="Close" brand={<DerivCoralWordmark />} utilities={<Button size="md" href="/signup">Open account</Button>}>{navbaritems}</Navbar>
440
+
441
+ // inverse — a dark hero under the bar
442
+ <Navbar label="Main" menuLabel="Menu" closeLabel="Close" brand={<DerivCoralWordmark />} utilities={<Button size="md" href="/signup">Open account</Button>} tone="inverse">{navbaritems}</Navbar>
443
+ ```
444
+
445
+ ### The action it keeps when it collapses
446
+
447
+ Below the width its trailing end is drawn at, everything there goes into the panel. One action can stay out, beside the control that opens it.
448
+
449
+ ```tsx
450
+ import { Button, Navbar } from '@deriv-com/dds-marketing'
451
+ import { DerivCoralWordmark } from '@deriv-com/quill-logos-web'
452
+
453
+ // Without one — the mark and the way in
454
+ <Navbar label="Main" menuLabel="Menu" closeLabel="Close" brand={<DerivCoralWordmark />} utilities={<Button size="md" href="/signup">Open account</Button>}>{navbaritems}</Navbar>
455
+
456
+ // With one — the conversion stays reachable
457
+ <Navbar label="Main" menuLabel="Menu" closeLabel="Close" brand={<DerivCoralWordmark />} utilities={<Button size="md" href="/signup">Open account</Button>} compactAction={<Button size="md" href="/signup">Sign up</Button>}>{navbaritems}</Navbar>
458
+ ```