@felloinnovations/brand-kit 0.4.0 → 0.5.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 (363) hide show
  1. package/AGENTS.md +198 -24
  2. package/CHANGELOG.md +221 -0
  3. package/README.md +38 -9
  4. package/design-system/01-how-claude-decides.md +26 -17
  5. package/design-system/02-principles.md +11 -6
  6. package/design-system/03-colour.md +135 -47
  7. package/design-system/04-type.md +45 -23
  8. package/design-system/05-space-and-layout.md +175 -52
  9. package/design-system/06-sizing-profiles.md +4 -4
  10. package/design-system/07-scrolling.md +66 -20
  11. package/design-system/08-choosing-components.md +50 -22
  12. package/design-system/09-charts.md +71 -28
  13. package/design-system/10-patterns.md +33 -10
  14. package/design-system/11-page-recipes.md +110 -23
  15. package/design-system/12-content.md +2 -1
  16. package/design-system/13-motion.md +330 -47
  17. package/design-system/14-accessibility.md +47 -24
  18. package/design-system/15-ai-experiences.md +11 -6
  19. package/design-system/16-creativity.md +1 -1
  20. package/design-system/17-decisions.md +367 -1
  21. package/design-system/18-checklist.md +79 -16
  22. package/design-system/19-public-pages.md +6 -4
  23. package/design-system/20-palettes.md +275 -0
  24. package/design-system/README.md +30 -17
  25. package/design-system/components/ActionList/README.md +96 -10
  26. package/design-system/components/ActionList/preview.html +52 -7
  27. package/design-system/components/ActionList/style.css +64 -0
  28. package/design-system/components/ActivityGrid/README.md +38 -2
  29. package/design-system/components/ActivityGrid/preview.html +1 -1
  30. package/design-system/components/ActivityGrid/style.css +35 -0
  31. package/design-system/components/AppShell/README.md +205 -75
  32. package/design-system/components/AppShell/preview.html +339 -58
  33. package/design-system/components/AppShell/style.css +154 -0
  34. package/design-system/components/Avatar/README.md +37 -10
  35. package/design-system/components/Avatar/preview.html +13 -4
  36. package/design-system/components/Avatar/style.css +14 -0
  37. package/design-system/components/Badge/README.md +41 -19
  38. package/design-system/components/Badge/preview.html +13 -10
  39. package/design-system/components/Badge/style.css +23 -0
  40. package/design-system/components/Banner/README.md +30 -9
  41. package/design-system/components/Banner/preview.html +1 -1
  42. package/design-system/components/Banner/style.css +19 -0
  43. package/design-system/components/Breadcrumb/README.md +58 -46
  44. package/design-system/components/Breadcrumb/preview.html +16 -16
  45. package/design-system/components/Breadcrumb/style.css +17 -0
  46. package/design-system/components/Button/README.md +113 -55
  47. package/design-system/components/Button/preview.html +98 -25
  48. package/design-system/components/Button/style.css +86 -0
  49. package/design-system/components/Card/README.md +158 -49
  50. package/design-system/components/Card/preview.html +141 -19
  51. package/design-system/components/Card/style.css +115 -0
  52. package/design-system/components/CardBoard/README.md +58 -37
  53. package/design-system/components/CardBoard/preview.html +26 -29
  54. package/design-system/components/ChatCard/README.md +115 -29
  55. package/design-system/components/ChatCard/preview.html +149 -32
  56. package/design-system/components/ChatCard/style.css +49 -0
  57. package/design-system/components/ChatShell/README.md +116 -0
  58. package/design-system/components/ChatShell/preview.html +201 -0
  59. package/design-system/components/ChatShell/style.css +86 -0
  60. package/design-system/components/ChatTurn/README.md +78 -35
  61. package/design-system/components/ChatTurn/preview.html +60 -28
  62. package/design-system/components/ChatTurn/style.css +50 -0
  63. package/design-system/components/CheckRow/README.md +141 -0
  64. package/design-system/components/CheckRow/preview.html +140 -0
  65. package/design-system/components/CheckRow/style.css +88 -0
  66. package/design-system/components/Checkbox/README.md +58 -22
  67. package/design-system/components/Checkbox/preview.html +112 -50
  68. package/design-system/components/Checkbox/style.css +45 -0
  69. package/design-system/components/Chip/README.md +78 -47
  70. package/design-system/components/Chip/preview.html +29 -4
  71. package/design-system/components/Chip/style.css +17 -0
  72. package/design-system/components/Combobox/README.md +44 -11
  73. package/design-system/components/Combobox/preview.html +35 -12
  74. package/design-system/components/Combobox/style.css +54 -0
  75. package/design-system/components/Composer/README.md +137 -35
  76. package/design-system/components/Composer/preview.html +115 -40
  77. package/design-system/components/Composer/style.css +81 -0
  78. package/design-system/components/ConfirmDialog/README.md +73 -52
  79. package/design-system/components/ConfirmDialog/preview.html +70 -26
  80. package/design-system/components/ConfirmDialog/style.css +5 -0
  81. package/design-system/components/Cover/preview.html +3 -3
  82. package/design-system/components/Cover/style.css +19 -0
  83. package/design-system/components/DateInput/README.md +77 -12
  84. package/design-system/components/DateInput/preview.html +27 -12
  85. package/design-system/components/DateInput/style.css +38 -0
  86. package/design-system/components/Dialog/README.md +112 -44
  87. package/design-system/components/Dialog/preview.html +141 -18
  88. package/design-system/components/Dialog/style.css +74 -0
  89. package/design-system/components/EmptyState/README.md +42 -12
  90. package/design-system/components/EmptyState/preview.html +11 -11
  91. package/design-system/components/EmptyState/style.css +9 -0
  92. package/design-system/components/EntryShell/README.md +73 -48
  93. package/design-system/components/EntryShell/preview.html +60 -27
  94. package/design-system/components/EntryShell/style.css +19 -0
  95. package/design-system/components/FeatureGrid/README.md +61 -39
  96. package/design-system/components/FeatureGrid/preview.html +2 -2
  97. package/design-system/components/FeatureGrid/style.css +20 -0
  98. package/design-system/components/FileUpload/README.md +33 -3
  99. package/design-system/components/FileUpload/preview.html +18 -4
  100. package/design-system/components/FileUpload/style.css +23 -0
  101. package/design-system/components/FilterBar/README.md +114 -0
  102. package/design-system/components/FilterBar/preview.html +82 -0
  103. package/design-system/components/FilterBar/style.css +22 -0
  104. package/design-system/components/Fold/README.md +84 -26
  105. package/design-system/components/Fold/preview.html +77 -34
  106. package/design-system/components/Fold/style.css +48 -0
  107. package/design-system/components/Footer/README.md +62 -39
  108. package/design-system/components/Footer/preview.html +5 -5
  109. package/design-system/components/Footer/style.css +30 -0
  110. package/design-system/components/FunnelBars/README.md +24 -3
  111. package/design-system/components/FunnelBars/preview.html +5 -5
  112. package/design-system/components/FunnelBars/style.css +13 -0
  113. package/design-system/components/GoalBars/README.md +54 -10
  114. package/design-system/components/GoalBars/preview.html +69 -28
  115. package/design-system/components/GoalBars/style.css +51 -0
  116. package/design-system/components/GoalTicks/README.md +74 -58
  117. package/design-system/components/GoalTicks/preview.html +41 -118
  118. package/design-system/components/GoalTicks/style.css +37 -0
  119. package/design-system/components/GoalTubes/README.md +29 -3
  120. package/design-system/components/GoalTubes/preview.html +6 -6
  121. package/design-system/components/GoalTubes/style.css +23 -0
  122. package/design-system/components/Heatmap/README.md +133 -0
  123. package/design-system/components/Heatmap/preview.html +168 -0
  124. package/design-system/components/Heatmap/style.css +119 -0
  125. package/design-system/components/Hero/README.md +58 -40
  126. package/design-system/components/Hero/preview.html +1 -1
  127. package/design-system/components/Hero/style.css +19 -0
  128. package/design-system/components/HoverCard/README.md +114 -0
  129. package/design-system/components/HoverCard/preview.html +107 -0
  130. package/design-system/components/HoverCard/style.css +59 -0
  131. package/design-system/components/IconButton/README.md +69 -38
  132. package/design-system/components/IconButton/preview.html +77 -43
  133. package/design-system/components/IconButton/style.css +45 -0
  134. package/design-system/components/Input/README.md +36 -11
  135. package/design-system/components/Input/preview.html +1 -1
  136. package/design-system/components/Input/style.css +23 -0
  137. package/design-system/components/KanbanBoard/README.md +93 -45
  138. package/design-system/components/KanbanBoard/preview.html +159 -43
  139. package/design-system/components/KanbanBoard/style.css +53 -0
  140. package/design-system/components/Kbd/README.md +25 -9
  141. package/design-system/components/Kbd/preview.html +6 -2
  142. package/design-system/components/Kbd/style.css +9 -0
  143. package/design-system/components/KitButton/README.md +81 -47
  144. package/design-system/components/KitButton/preview.html +35 -13
  145. package/design-system/components/KitButton/style.css +46 -0
  146. package/design-system/components/KitCard/README.md +75 -44
  147. package/design-system/components/KitCard/preview.html +18 -10
  148. package/design-system/components/KitCard/style.css +15 -0
  149. package/design-system/components/KitInput/README.md +54 -39
  150. package/design-system/components/KitInput/preview.html +7 -7
  151. package/design-system/components/KitInput/style.css +23 -0
  152. package/design-system/components/Leaderboard/README.md +76 -49
  153. package/design-system/components/Leaderboard/preview.html +61 -26
  154. package/design-system/components/Leaderboard/style.css +44 -0
  155. package/design-system/components/ListDetail/README.md +222 -0
  156. package/design-system/components/ListDetail/preview.html +213 -0
  157. package/design-system/components/ListDetail/style.css +148 -0
  158. package/design-system/components/LoadBar/README.md +79 -0
  159. package/design-system/components/LoadBar/preview.html +40 -0
  160. package/design-system/components/LoadBar/style.css +17 -0
  161. package/design-system/components/MarketingNav/README.md +76 -42
  162. package/design-system/components/MarketingNav/preview.html +37 -8
  163. package/design-system/components/MarketingNav/style.css +45 -0
  164. package/design-system/components/Matrix/README.md +129 -0
  165. package/design-system/components/Matrix/preview.html +99 -0
  166. package/design-system/components/Matrix/style.css +84 -0
  167. package/design-system/components/Menu/README.md +117 -41
  168. package/design-system/components/Menu/preview.html +85 -23
  169. package/design-system/components/Menu/style.css +61 -0
  170. package/design-system/components/Meter/README.md +39 -4
  171. package/design-system/components/Meter/preview.html +18 -1
  172. package/design-system/components/Meter/style.css +23 -0
  173. package/design-system/components/MetricTile/README.md +237 -0
  174. package/design-system/components/MetricTile/preview.html +241 -0
  175. package/design-system/components/MetricTile/style.css +129 -0
  176. package/design-system/components/Morph/README.md +106 -0
  177. package/design-system/components/Morph/preview.html +103 -0
  178. package/design-system/components/Morph/style.css +31 -0
  179. package/design-system/components/Motion/README.md +164 -0
  180. package/design-system/components/Motion/preview.html +2537 -0
  181. package/design-system/components/NumberInput/README.md +27 -8
  182. package/design-system/components/NumberInput/preview.html +21 -5
  183. package/design-system/components/NumberInput/style.css +34 -0
  184. package/design-system/components/PaceBar/README.md +75 -0
  185. package/design-system/components/PaceBar/preview.html +67 -0
  186. package/design-system/components/PaceBar/style.css +25 -0
  187. package/design-system/components/Page/README.md +57 -18
  188. package/design-system/components/Page/preview.html +15 -17
  189. package/design-system/components/Page/style.css +7 -0
  190. package/design-system/components/PageBar/README.md +90 -34
  191. package/design-system/components/PageBar/preview.html +60 -19
  192. package/design-system/components/PageBar/style.css +35 -0
  193. package/design-system/components/PageHero/README.md +87 -51
  194. package/design-system/components/PageHero/preview.html +35 -6
  195. package/design-system/components/PageHero/style.css +31 -0
  196. package/design-system/components/Pagination/README.md +70 -49
  197. package/design-system/components/Pagination/preview.html +24 -15
  198. package/design-system/components/Pagination/style.css +12 -0
  199. package/design-system/components/Panel/README.md +109 -51
  200. package/design-system/components/Panel/preview.html +118 -20
  201. package/design-system/components/Panel/style.css +51 -0
  202. package/design-system/components/PasswordInput/README.md +50 -18
  203. package/design-system/components/PasswordInput/preview.html +71 -21
  204. package/design-system/components/PasswordInput/style.css +31 -0
  205. package/design-system/components/Plate/README.md +75 -17
  206. package/design-system/components/Plate/preview.html +40 -7
  207. package/design-system/components/Plate/style.css +37 -0
  208. package/design-system/components/Popover/README.md +70 -49
  209. package/design-system/components/Popover/preview.html +44 -22
  210. package/design-system/components/Popover/style.css +41 -0
  211. package/design-system/components/PricingTable/README.md +69 -49
  212. package/design-system/components/PricingTable/preview.html +21 -21
  213. package/design-system/components/PricingTable/style.css +21 -0
  214. package/design-system/components/ProgressPetals/README.md +31 -3
  215. package/design-system/components/ProgressPetals/preview.html +14 -15
  216. package/design-system/components/ProgressPetals/style.css +27 -0
  217. package/design-system/components/README.md +151 -0
  218. package/design-system/components/Radio/README.md +40 -17
  219. package/design-system/components/Radio/preview.html +16 -1
  220. package/design-system/components/Radio/style.css +21 -0
  221. package/design-system/components/RankBar/README.md +29 -2
  222. package/design-system/components/RankBar/preview.html +14 -12
  223. package/design-system/components/RankBar/style.css +18 -0
  224. package/design-system/components/Ring/README.md +61 -11
  225. package/design-system/components/Ring/preview.html +55 -10
  226. package/design-system/components/Ring/style.css +49 -0
  227. package/design-system/components/ScoreHero/README.md +91 -0
  228. package/design-system/components/ScoreHero/preview.html +104 -0
  229. package/design-system/components/ScoreHero/style.css +32 -0
  230. package/design-system/components/Section/README.md +72 -33
  231. package/design-system/components/Section/preview.html +46 -16
  232. package/design-system/components/Section/style.css +18 -0
  233. package/design-system/components/Segmented/README.md +100 -55
  234. package/design-system/components/Segmented/preview.html +107 -26
  235. package/design-system/components/Segmented/style.css +94 -0
  236. package/design-system/components/SegmentedProgress/README.md +64 -0
  237. package/design-system/components/SegmentedProgress/preview.html +69 -0
  238. package/design-system/components/SegmentedProgress/style.css +11 -0
  239. package/design-system/components/Select/README.md +47 -12
  240. package/design-system/components/Select/preview.html +28 -2
  241. package/design-system/components/Select/style.css +22 -0
  242. package/design-system/components/ShareBar/README.md +69 -0
  243. package/design-system/components/ShareBar/preview.html +72 -0
  244. package/design-system/components/ShareBar/style.css +25 -0
  245. package/design-system/components/SideList/README.md +147 -0
  246. package/design-system/components/SideList/preview.html +139 -0
  247. package/design-system/components/SideList/style.css +94 -0
  248. package/design-system/components/Skeleton/README.md +53 -16
  249. package/design-system/components/Skeleton/preview.html +35 -23
  250. package/design-system/components/Skeleton/style.css +17 -0
  251. package/design-system/components/Slider/README.md +95 -0
  252. package/design-system/components/Slider/preview.html +49 -0
  253. package/design-system/components/Slider/style.css +13 -0
  254. package/design-system/components/Split/README.md +112 -0
  255. package/design-system/components/Split/preview.html +105 -0
  256. package/design-system/components/Split/style.css +30 -0
  257. package/design-system/components/Starter/README.md +21 -9
  258. package/design-system/components/Starter/preview.html +5 -5
  259. package/design-system/components/Stat/README.md +64 -43
  260. package/design-system/components/Stat/preview.html +3 -3
  261. package/design-system/components/Stat/style.css +15 -0
  262. package/design-system/components/StatTiles/README.md +88 -44
  263. package/design-system/components/StatTiles/preview.html +142 -71
  264. package/design-system/components/StatTiles/style.css +64 -0
  265. package/design-system/components/StatusLine/README.md +85 -0
  266. package/design-system/components/StatusLine/preview.html +49 -0
  267. package/design-system/components/StatusLine/style.css +14 -0
  268. package/design-system/components/StatusScreen/README.md +49 -35
  269. package/design-system/components/StatusScreen/preview.html +20 -5
  270. package/design-system/components/StatusScreen/style.css +9 -0
  271. package/design-system/components/StepLine/README.md +97 -0
  272. package/design-system/components/StepLine/preview.html +108 -0
  273. package/design-system/components/StepLine/style.css +62 -0
  274. package/design-system/components/Stepper/README.md +35 -13
  275. package/design-system/components/Stepper/style.css +13 -0
  276. package/design-system/components/StreakCalendar/README.md +22 -1
  277. package/design-system/components/StreakCalendar/preview.html +10 -10
  278. package/design-system/components/StreakCalendar/style.css +12 -0
  279. package/design-system/components/SuggestionChip/README.md +87 -0
  280. package/design-system/components/SuggestionChip/preview.html +42 -0
  281. package/design-system/components/SuggestionChip/style.css +20 -0
  282. package/design-system/components/Switch/README.md +44 -24
  283. package/design-system/components/Switch/preview.html +23 -8
  284. package/design-system/components/Switch/style.css +31 -0
  285. package/design-system/components/Table/README.md +129 -58
  286. package/design-system/components/Table/preview.html +106 -72
  287. package/design-system/components/Table/style.css +104 -0
  288. package/design-system/components/Tabs/README.md +71 -46
  289. package/design-system/components/Tabs/preview.html +56 -24
  290. package/design-system/components/Tabs/style.css +44 -0
  291. package/design-system/components/Testimonial/README.md +48 -32
  292. package/design-system/components/Testimonial/preview.html +14 -14
  293. package/design-system/components/Testimonial/style.css +12 -0
  294. package/design-system/components/TextArea/README.md +27 -11
  295. package/design-system/components/TextArea/preview.html +8 -2
  296. package/design-system/components/TextArea/style.css +12 -0
  297. package/design-system/components/ThemeSwitch/README.md +116 -0
  298. package/design-system/components/ThemeSwitch/preview.html +57 -0
  299. package/design-system/components/ThemeSwitch/style.css +6 -0
  300. package/design-system/components/TickRow/README.md +52 -36
  301. package/design-system/components/TickRow/preview.html +64 -41
  302. package/design-system/components/TickRow/style.css +23 -0
  303. package/design-system/components/TickStrip/README.md +95 -0
  304. package/design-system/components/TickStrip/preview.html +88 -0
  305. package/design-system/components/TickStrip/style.css +42 -0
  306. package/design-system/components/Tile/README.md +79 -18
  307. package/design-system/components/Tile/preview.html +91 -40
  308. package/design-system/components/Tile/style.css +36 -0
  309. package/design-system/components/Timeline/README.md +68 -48
  310. package/design-system/components/Timeline/preview.html +27 -15
  311. package/design-system/components/Timeline/style.css +25 -0
  312. package/design-system/components/Toast/README.md +70 -38
  313. package/design-system/components/Toast/preview.html +43 -8
  314. package/design-system/components/Toast/style.css +25 -0
  315. package/design-system/components/Tooltip/README.md +93 -35
  316. package/design-system/components/Tooltip/preview.html +69 -15
  317. package/design-system/components/Tooltip/style.css +78 -0
  318. package/design-system/components/TopBar/README.md +67 -53
  319. package/design-system/components/TopBar/preview.html +14 -27
  320. package/design-system/components/TopBar/style.css +35 -0
  321. package/design-system/components/TopicRail/README.md +108 -0
  322. package/design-system/components/TopicRail/preview.html +58 -0
  323. package/design-system/components/TopicRail/style.css +48 -0
  324. package/design-system/components/TrendBars/README.md +52 -14
  325. package/design-system/components/TrendBars/preview.html +65 -32
  326. package/design-system/components/TrendBars/style.css +25 -0
  327. package/design-system/components/TrendLine/README.md +164 -0
  328. package/design-system/components/TrendLine/preview.html +373 -0
  329. package/design-system/components/TrendLine/style.css +155 -0
  330. package/design-system/components/Well/README.md +64 -22
  331. package/design-system/components/Well/preview.html +14 -14
  332. package/design-system/components/Well/style.css +22 -0
  333. package/design-system/components/_house.css +324 -0
  334. package/design-system/components/bundle.css +4086 -744
  335. package/design-system/tokens.json +1310 -124
  336. package/dist/fello-core.css +2 -2
  337. package/dist/fello.css +6 -1369
  338. package/dist/fello.scoped.css +7 -0
  339. package/dist/index.d.ts +109 -10
  340. package/dist/index.js +781 -96
  341. package/dist/palettes.d.ts +464 -0
  342. package/dist/palettes.js +497 -0
  343. package/dist/scoped.d.ts +3 -0
  344. package/dist/scoped.js +16 -0
  345. package/dist/toast.d.ts +14 -0
  346. package/dist/toast.js +33 -29
  347. package/dist/tokens.d.ts +1686 -62
  348. package/dist/tokens.js +1668 -61
  349. package/package.json +20 -4
  350. package/scripts/check-palette.mjs +295 -0
  351. package/scripts/token-model.mjs +552 -0
  352. package/tokens/_dark.css +173 -0
  353. package/tokens/_palettes.css +46 -0
  354. package/tokens/_product.css +266 -53
  355. package/tokens/_source.hubl.css +39 -19
  356. package/tokens/design-tokens.json +319 -0
  357. package/tokens/palettes.ts +504 -0
  358. package/tokens/shadcn-compat.css +19 -19
  359. package/tokens/shadcn-compat.hsl.css +76 -0
  360. package/tokens/tokens.css +1287 -62
  361. package/tokens/tokens.md +587 -61
  362. package/tokens/tokens.root.css +1293 -62
  363. package/tokens/tokens.ts +1677 -64
@@ -1,73 +1,196 @@
1
1
  # Space and layout
2
2
 
3
- A 4 px grid, a few named gaps, and alignment rules that make a screen read as one hand.
3
+ A 4 px grid with four half steps, a rhythm set by relationship, rimmed containers, one content edge per surface,
4
+ numbers in fixed columns, and layouts that re-lay out by the room they have. Seth's frames (the Fia report, Fixes,
5
+ Inbox and Tally frames, and his North app) are the reference for every value here; where they disagree with each
6
+ other, this chapter says which one the kit takes (Decisions, 4 Nov 2026).
7
+
8
+ ## The scale
9
+
10
+ The 4 px steps (`space-xxs` 4, `space-xs` 8, `space-sm` 12, `space-md` 16, `space-lg` 24, `space-xl` 32, `space-2xl`
11
+ 40, `space-3xl` 48, `space-4xl` 64 and up) plus the half steps Seth uses in two or more places: 2 (`space-3xs`), 6
12
+ (`space-xxs-plus`), 10 (`space-xs-plus`) and 14 (`space-sm-plus`).
13
+
14
+ - **Every other value snaps to the nearest step.** A one-off 5, 7, 9, 19 or 22 in a frame is a near miss, not a new step.
15
+ - **Build from Seth's base values, not Figma's scaled ones.** A component scaled into its slot reads 17.5, 13.12 or
16
+ 43.74 in the file; its base values are 16, 12 and 40, and those are what the kit uses.
17
+ - **Never a one-off in your own code.** If no step fits, say so and leave it (How Claude decides, step 5).
18
+ - **The scale spaces layout, not a drawing's marks.** The gaps inside a chart (ticks 3 apart in Seth's row strips, the
19
+ 1 px cuts in a share bar) are the chart's own geometry, named in Charts and in its README.
4
20
 
5
21
  ## Spacing, by relationship
6
22
 
7
23
  | Relationship | Space | Token |
8
24
  | --- | --- | --- |
9
- | An icon and its word, inside a row, between a bar's segments | 4 | `space-xxs`, `ws-gap-tight` |
10
- | Related controls, rows in a tight list, a label and its field | 8 | `space-xs`, `ws-gap` |
11
- | Rows that breathe, a dialog's buttons, inside a plate | 12 | `space-sm`, `ws-gap-loose` |
12
- | Between components (cards on a board, a toolbar and its board), inside a stat tile | 16 | `space-md`, `ws-gap-component` |
13
- | Inside a card, a pane, a dialog (its sides and head) | 20 | `ws-card-inset` |
14
- | Between groups, between a card's sections, the page gutter on a large screen, the chat's line | 24 | `space-lg`, `ws-gap-group`, `ws-gutter` |
15
- | A footer band's sides | 28 | `ws-band-inset` |
16
- | Between a chat's turns | 22 | `ws-gap-turn` |
17
- | The page edge on a phone | 16 | `space-md` |
18
-
19
- A page never adds its own padding inside the canvas: the gutter is the canvas's. A card never adds a margin: the board's gap
20
- separates cards.
21
-
22
- ## Layout widths (defaults)
23
-
24
- | Piece | Width | Token |
25
+ | Items in a segmented track, a stat's label and its value | 2 | `space-3xs` |
26
+ | An icon and its word inside a row, segments of one group | 4 | `space-xxs`, `ws-gap-tight` |
27
+ | A button's icon and its words, a big figure and the line under it, a label and its title | 6 | `space-xxs-plus` |
28
+ | Related controls, a label and its field, a pair of buttons, tiles in a tight grid | 8 | `space-xs`, `ws-gap`, `ws-stack`, `ws-cluster` |
29
+ | A title and its tag, an area heading and its card, a box and short words beside it | 10 | `space-xs-plus` |
30
+ | Rows that breathe, a section head and its cards or list, a dialog's buttons, groups of segments | 12 | `space-sm`, `ws-gap-loose` |
31
+ | A face and the title beside it, the parts of a row with a box | 14 | `space-sm-plus` |
32
+ | Cards in a grid, the parts inside one block (figure, strip, sentence), a tile's inside, the header to the content | 16 | `space-md`, `ws-gap-component` |
33
+ | Inside a card: its head, its rows' start edge | 20 | `ws-card-inset` |
34
+ | A chart and its side column, a report and its drawer, the drawer's foot and the stage edge, between groups | 24 | `space-lg`, `ws-gap-group` |
35
+ | A drawer section's sides | 28 | `ws-band-inset` |
36
+ | Between the blocks of a report column (tabs, score, list); the app page's gutter | 32 | `ws-gap-block` (`ws-stack--block`), `ws-gutter` |
37
+ | Between page sections (a hero, a chart row, a board) | 56 | `ws-gap-section` (`ws-stack--section`) |
38
+ | The page edge on a phone | 16 | `space-md`, plus the safe area |
39
+
40
+ A stack (`ws-stack`, top to bottom) and a cluster (`ws-cluster`, side by side, wrapping) are 8 apart; `--tight`,
41
+ `--loose`, `--component` and `--group` take the named gaps above, and a stack also takes `--block` (32) and `--section`
42
+ (56). Their gap is the step itself, never an inherited `--ws-gap`, so a parent's own layout gap does not leak into them.
43
+
44
+ A page never adds its own padding inside the stage: the gutter is the stage's. A card never adds a margin: the board's
45
+ gap separates cards. A chat's turns follow `ChatTurn` and `ChatShell`.
46
+
47
+ ## One content edge
48
+
49
+ The one alignment rule teams break most. Seth's Tally report alone has its words at 14, 15, 16, 16.6, 17, 19, 20 and 22
50
+ from the edge: each a near miss, together a page that looks hand-placed.
51
+
52
+ - **One inset per surface.** In a card the title, the sentence, the rows, the plate and the foot's words share one
53
+ start edge. A rimmed card's inset is measured from its outer edge: the 1 px rim, then the surface's padding.
54
+ - **A heading outside a card** aligns to the card's outer edge, never somewhere between it and the card's content.
55
+ - **A detail opened under a row** starts on the row's words column, not on its box or a few pixels past it.
56
+ - **Shared edges across regions**: anything docked into a bar (a search, a filter, the crumbs) sits on the same x as its
57
+ page counterpart below.
58
+ - **A quiet act's hover box bleeds out by its own padding** (a negative margin equal to the padding), so its words line
59
+ up with the text above; a close button pulls into its corner the same way.
60
+ - **Labels sit above fields** in a product screen; help or an error sits under, 4 px below.
61
+ - **Buttons in a band or a dialog foot sit right**, the one primary last. In a drawer or a pane two acts may fill the
62
+ width as equal halves (8 apart, the primary last); where a half would be under 160 or break its label, they stack
63
+ full width, the primary at the bottom (`ws-btn-split`). In an item's act row (the inbox's open review) the acts start on
64
+ the content edge, 8 apart, the primary first.
65
+ - **A card's aside** (a switch, a select, a group of controls in one element) sits top right of the head; when it would
66
+ squeeze the title under 200 px it drops under the title as one piece rather than shrinking it. **Icon acts** (a
67
+ close, an expand) never drop: they stay top right on the title's first line and the title wraps instead.
68
+ - **Rows align their first column** (a box, a face, a dot) on one vertical line through the list.
69
+
70
+ ## Optical alignment
71
+
72
+ Align to the ink, not the box. The geometry check measures glyphs, so it sees what a designer sees.
73
+
74
+ - **A big figure's ink meets the column.** At 72 px and up a numeral's side bearing shows: pull it left until the
75
+ glyph's visible edge sits on the edge (GoalTicks pulls its 72 by 4); lines under a large score indent to its visible
76
+ edge, not its box. Measure each size: Seth's 96 in the Grow report needs no pull.
77
+ - **An icon centres on the first line of its neighbour**, not on the neighbour's box. A 32 px close beside a 22 / 28
78
+ title moves up by half the difference (`margin-block: calc((var(--ws-leading-title) - var(--ws-control-h)) / 2)`).
79
+ - **A chip beside a big numeral** sits with its bottom on the numeral's baseline, everywhere it appears.
80
+ - **One line of text centres in its box.** Draw a control's edge inside (an inset shadow), so a 32 px button stays 32
81
+ and its words do not land on half pixels.
82
+ - **Inline icons** sit on the words' line (`ws-icon`), never on the baseline below it.
83
+
84
+ ## Numbers in fixed columns
85
+
86
+ - **Every number in a list sits in a fixed-width, right-aligned column**, so the figures line up down the list:
87
+ Seth's check rows give the score 56 and the status 112, both right-aligned; North's rows end in a 64 px figure
88
+ column. Tabular numerals as well (`ws-tnum`, Type); fixed columns do not replace them.
89
+ - **A row's right column** (a value over its sub-value) is right-aligned as one block.
90
+ - **Rows that compare counts share one grid**, so counts and labels line up across rows; a count is never centred in a
91
+ wide box (GoalBars).
92
+ - **A number never truncates**: the words beside it give way first.
93
+
94
+ ## Rimmed containers
95
+
96
+ The product card is Seth's rimmed construction (D5): the tray (`ws-tray`, #EDEDED) shows as a 1 px rim (`ws-rim`)
97
+ through the card's padding, and the cream surface sits inside it. It replaces the 0.5 px outline; the class names stay,
98
+ so existing markup upgrades in place.
99
+
100
+ | Part | Rule | Token |
25
101
  | --- | --- | --- |
26
- | Sidebar open / folded | 232 / 72 | `ws-sidebar-width`, `ws-rail-width` |
27
- | The one column (home, chat) | 656, centred | `ws-column-width` |
28
- | The panel beside the chat | 440, at most half the stage | `ws-thing-width` |
29
- | A card on a board | 556, giving to 480 before the column wraps | `ws-chart-card-w`, `ws-chart-card-min` |
30
- | The stage | the window less the sidebar, a 16 px cornered surface on the grey | `ws-radius-panel`, `ws-page` |
102
+ | Rim | 1 px of the tray around the surface, all sides | `ws-tray`, `ws-rim` |
103
+ | Corners | concentric: 8 outside, 7 inside; a drawer 12 and 11 | `ws-radius-card`, `ws-radius-card-inner`, `ws-radius-drawer`, `ws-radius-drawer-inner` |
104
+ | Surface | the cream; a draft or a plate inside sits on the sunk cream the same way | `color-bg-page`, `ws-surface-sunk` |
105
+ | Rows | cream, joined by 0.5 px full-width dividers; the first rounds its top corners, the last its bottom ones | `ws-divider` |
106
+ | Foot | optional, on the tray itself: short (one line of words), no fill and no shade of its own | words on the tray take the word tokens, all AA there |
107
+ | Hover | when the whole card is one target, the rim darkens; nothing moves | `ws-well-hover` |
108
+ | At rest | no outline, no shadow | |
109
+
110
+ - **The rows round their own corners**; the card never takes `overflow: hidden` to do it (Scrolling).
111
+ - **Two trays can join into one** (a detail and its list, `ListDetail`): each keeps its outer corners and a single
112
+ 1 px line of the tray splits them.
113
+
114
+ ## Dividers and grouping
115
+
116
+ - **A divider is 0.5 px and runs the container's full width**, past its padding (`border-top: var(--ws-divider)`). In a
117
+ list of inset rows (rows as pills on a 4 px padded surface) the divider runs the surface's width, and the dividers on
118
+ both sides of the selected row drop out: a filled pill needs no line.
119
+ - **Proximity first**: related things 4 to 8 apart, different tasks 16 to 24. The line between groups is usually the gap
120
+ itself; a rule between groups only where it orients (the sidebar's groups, a chat's topics, a report's lanes).
121
+ - **Rows in one list share one min-height**: the tallest single-line form (56 when any row carries a 32 px act). A row
122
+ with a second line grows; a row without an act does not shrink.
123
+ - **A selected or open row never changes size**: only its ground and its weight change, never its type size or line
124
+ height, so nothing under it moves.
125
+ - **Cells that touch** (a heatmap) are split by a 1 px inset ring in the paper colour, not by a gap.
126
+ - A plate (`ws-surface-sunk`) holds a card's facts; a well (`ws-well`) holds a list of things to ask.
31
127
 
32
- Size from the space a region actually has (container queries at 40, 48, 60 and 76 rem: `area-sm` to `area-xl`), never from
33
- the window: a card beside the chat has less room than the same card on a page.
34
-
35
- ## Alignment
128
+ ## Corners and elevation
36
129
 
37
- - **One content edge per card**: the title, the sentence, the body and the band's words share the 20 px inset; the band's
38
- words sit at 28 so they read as a different surface.
39
- - **Text aligns to the start edge**; numbers in a column align right and use tabular numerals; a figure and its chip align
40
- on the baseline.
41
- - **Labels sit above fields** (never beside them in a product screen); help or an error sits under, 4 px below.
42
- - **Buttons in a band or a dialog foot sit right**, the one primary last; a form's submit inside a card sits full width.
43
- - **A card's aside** (a switch, a close) sits top right of the head; when it would squeeze the title it drops under the
44
- title rather than shrinking it.
45
- - **Rows align their first column** (a face, a dot, a check) on one vertical line through the list.
46
- - **Icons centre on the words' x-height.**
130
+ Corners climb with size, each a literal length: a bar or a tick 1 (`ws-radius-bar`), a field, a chip, a tag or a
131
+ checkbox 4 (`ws-radius-control`), a button, a square icon button or a row 6 (`ws-radius-row`), a card 8 (its inner
132
+ surface 7), a menu 10 (North's), a dialog or a drawer 12 (inner 11), the chat bubble 14 (a 4 px tail corner), the stage
133
+ 16 (`ws-radius-panel`), a toast's pill 18. A component's README says which step
134
+ each part takes. Never `--radius-xl` or `--radius-2xl` in product CSS: Tailwind owns those names.
135
+ A public page's `KitCard` is 4.
47
136
 
48
- ## Grouping
137
+ Everything is flat at rest. What floats lifts on one family of shadows, a single soft drop each: a popover
138
+ (`ws-shadow-pop`), a menu (`ws-shadow-menu`), a tooltip or hover card (`ws-shadow-tip`), a floating chat or a tile opened
139
+ out of its slot (`ws-shadow-float`). In dark each carries a 0.5 px light rim. Buttons never lift. Layers: `z-dropdown`
140
+ for menus and tips, `z-modal` for a dialog or drawer, `z-toast` for a toast.
49
141
 
50
- Group related information closely (4 to 8 px), separate different tasks with more (16 to 24). Proximity before lines: a
51
- hairline between rows is `ws-edge-slot`; a line between groups is the gap itself, not a rule. A plate (`ws-surface-sunk`)
52
- holds a card's facts; a well (`ws-well`) holds a list of things to ask.
142
+ ## The frame
53
143
 
54
- ## Corners and elevation
144
+ | Piece | Rule | Token |
145
+ | --- | --- | --- |
146
+ | Page behind the stage | the soft frame gradient | `ws-frame` (as `background:`) |
147
+ | Stage | a 16 px cornered surface with a 1 px edge; glass in an app shell | `ws-radius-panel`, `ws-edge-stage`, `ws-glass`, `ws-glass-blur` |
148
+ | Stage insets | 13 from the top, 12 from the right and the bottom | `ws-stage-inset-top`, `ws-stage-inset` |
149
+ | App page in the stage | a 56 px header with 32 px sides; the content 16 under it, 32 from both sides, filling the stage | `ws-header-h`, `ws-gutter`, `space-md` |
150
+ | A single page | `Page` takes the same 32 px gutter (16 on a phone) | `ws-gutter` |
55
151
 
56
- Corners climb with size: a bar 1 px, a chip 2, a control 4, a row 6, a card 8, a bubble 12, a dialog or the stage 16 (a
57
- public page's `KitCard` is 4). Everything is flat; only a menu, a popover or a tooltip (`z-dropdown`), a dialog or drawer
58
- (`z-modal`) and a toast (`z-toast`) lift.
152
+ The content inside the stage is left-anchored: a board never centres itself in a wide stage, so every block shares one
153
+ start edge (K12).
59
154
 
60
- ## Boards
155
+ ## Layout widths (defaults)
61
156
 
62
- A page of cards is a board (`CardBoard`, or `Page`'s board on a single page): columns side by side at 556, each card its
63
- own height, one column on a phone in the same DOM order (Accessibility, reading order). A
64
- list or a board of things is one card. Four stat tiles go across from the `lg` width, two below. A `Tile` spans by
65
- content, never to fill a gap.
157
+ | Piece | Width | Token |
158
+ | --- | --- | --- |
159
+ | Sidebar open, folded to its rail | 232, 64 folded | `ws-sidebar-width`, `ws-rail-width` |
160
+ | The one column (home, chat) | 656, centred; `ChatShell`'s docked and full-screen modes hold their own widths | `ws-column-width` |
161
+ | The panel beside the chat, a drawer beside a report | 440, at most half the stage; a report and its drawer 24 apart | `ws-thing-width` |
162
+ | A side column beside a chart | a fixed width, the chart takes the rest, 24 apart | `ws-thing-width` or the design's |
163
+ | A card on a board | 556, giving to 480 before the column wraps | `ws-chart-card-w`, `ws-chart-card-min` |
66
164
 
67
- ## Responsive
165
+ ## Boards and grids
166
+
167
+ - **A board of cards** (`CardBoard`, or `Page`'s board): columns side by side at 556, each card its own height, one
168
+ column on a phone in the same DOM order. A list or a board of things is one card.
169
+ - **Grids above and below share one column grid.** Seth's inbox puts three tiles 8 apart over a list exactly one column
170
+ wide and a detail spanning the other two, so the list's right edge meets the first tile's.
171
+ - **A main column with an aside** is `Split`: the aside a fixed width, tops aligned, stacking under by container width.
172
+ - **Stat tiles**: four across where they fit, then two, then one; five or six go three across in two rows, never four
173
+ and an orphan. `StatTiles` measures its own width.
174
+ - **A `Tile` spans by content**, never to fill a gap.
175
+
176
+ ## Responsive: by container, re-lay out, never just shrink
177
+
178
+ - **Size from the region, not the window.** A component that adapts is its own size container (`StatTiles`, a board,
179
+ `PageHero`), so it reads the column it sits in. A card beside the chat has less room than the same card on a page.
180
+ - **Switch where the content stops fitting**, measured. Seth's North switches its page at 1120, 940 and 820 px and a
181
+ chat card at 470; the kit's named areas are 40, 48, 60 and 76 rem (`area-sm` to `area-xl`).
182
+ - **Re-lay out, never just shrink** (Seth's own heading): columns drop, side columns move under, header parts become
183
+ flow, a band's second line goes before a title shrinks. Type never shrinks to fit and a figure keeps its size.
184
+ - **Write the DOM in the phone's order**: when a list belongs above its detail on a phone, it comes first in the markup
185
+ (Accessibility, reading order).
186
+ - **Nothing fixed-width pushes past its column**: a panel, a sidebar or a strip caps at `max-width: 100%`. An
187
+ inline-level piece (a segmented switch) never stretches in a column unless asked (`--stretch`).
188
+ - **A card moving between two sizes is not a size container** while it moves, so its layout cannot flip halfway.
189
+ - **Phone**: the edge is 16 plus the safe area; the stage loses its corners and edge; below 40 rem a drawer is the whole
190
+ screen; bars with links collapse on their own below 40 rem; the panel is the screen; a board is one column.
191
+ - **320 px works**: every face reflows at 320 wide (Accessibility, zoom and reflow).
68
192
 
69
193
  Every face renders at 100%. A dense desk app may choose a UI zoom (Decisions); it then divides viewport units back by
70
- the zoom. Below 1280 px the panel beside the chat is a slide-over; on a
71
- phone the chat is full bleed, the panel is the screen and a board is one column.
194
+ the zoom. Below 1280 px the panel beside the chat is a slide-over.
72
195
 
73
196
  The marketing face sizes from the kit's layout tokens, not the workspace's (Public pages, Layout).
@@ -9,9 +9,9 @@ deliberately, in the rationale.
9
9
  | Body | 14 / 20 | 16 / 24 (`kit-md`) | 16 / 24 | 16 / 24; a lead 18 / 28 (`kit-lg`) |
10
10
  | Meta, labels | 12 to 13 | 13 to 14 | 13 to 14 | 12 to 14 |
11
11
  | Title | 22 / 28 | 22 / 28 | 22 / 28 | `kit-4xl` sections, `kit-5xl` to `kit-6xl` hero; smaller on a phone |
12
- | Controls | 28 small, 32 default, 36 large | 36 | 40 boxed, 48 submit, 24 words that act | 45 (`KitButton` large), 40 fields |
13
- | Row height | 32 to 40; 48 with a face | 48 | 48 | 48 |
14
- | Card inset | 20 | 24 | 20 | 24 |
12
+ | Controls | 28 small, 32 default, 36 large; 40 for a pane's acts | 36 | 40 boxed (`ws-touch`), 48 submit, 24 words that act | 44 every act (`ws-touch-public`; `KitButton` large is 45), 40 fields |
13
+ | Row height | by content, one min-height per list: 28 a sidebar row, 40 a dense row, 48 with a face or in a matrix, 56 a check row | 48 | 48 | 48 |
14
+ | Card inset | 20 (a tile 16, a drawer's sections 28 at the sides) | 24 | 20 | 24 |
15
15
  | Gap between components | 16 | 24 | 16 | 24 |
16
16
  | Line length | up to 656 px | 60 to 70 characters | the screen less 32 | 60 to 75 characters |
17
17
 
@@ -24,4 +24,4 @@ deliberately, in the rationale.
24
24
  - **Touch is a floor, not a profile switch**: on a coarse pointer (`pointer: coarse`) the touch floors in Accessibility
25
25
  apply whatever the profile.
26
26
  - **Enlarged text (200%)** must reflow in every profile: columns stack, the panel becomes the screen, nothing clips sideways.
27
- - **A number card keeps its 72 px number** in every profile; what gives is the room around it.
27
+ - **A hero figure keeps its size** (the 72 px number, the 96 px score) in every profile; what gives is the room around it.
@@ -1,37 +1,83 @@
1
1
  # Scrolling
2
2
 
3
- Who scrolls, what stays, and what "fits" means. Compactness comes from prioritising and grouping, never from shrinking words
4
- or clipping content to avoid a scroll.
3
+ Who scrolls, what stays, and what "fits" means. Compactness comes from prioritising and grouping, never from shrinking
4
+ words or clipping content to avoid a scroll.
5
5
 
6
6
  ## By surface
7
7
 
8
8
  | Surface | Default | Who owns the scroll |
9
9
  | --- | --- | --- |
10
10
  | Home | fits: the greeting, the composer, Needs you, a few starters; the list grows down if it must | the stage |
11
- | Chat | the conversation scrolls; the composer stays reachable at the foot (24 px above the edge) | the thread, with a new turn gliding to the bottom (`scrollBehavior`) |
12
- | Panel beside the chat (440) | the thing's own view scrolls inside the panel; its 56 px header stays | the panel |
13
- | App page (a board) | the key cards first; the page grows; nothing sideways | the page |
14
- | A dialog | content scrolls inside; head and foot stay | the dialog's content |
15
- | A drawer | as a dialog, from the right | the drawer's content |
16
- | A list with a detail pane | the list and the pane scroll independently when both need it; the chosen row stays visible | each region |
17
- | A wide table | contained horizontal scroll inside its card, the first column sticky, never the page | the card |
11
+ | Chat | the conversation scrolls; the composer stays reachable at the foot; room under the last turn so it never sits on the composer | the thread, with a new turn gliding to the bottom (`scrollBehavior`) |
12
+ | Panel beside the chat (440) | the thing's own view scrolls inside the panel; its 56 px header stays | the panel's body |
13
+ | App page (a board) | the key cards first; the page grows; nothing sideways | the shell's body |
14
+ | A dialog | content scrolls inside; the head and the foot stay; the dialog is never taller than the window less 32. Under 40 rem of window height or width the whole pane scrolls under its head and the foot comes at the end | the dialog's content (the pane, when short or on a phone) |
15
+ | A drawer | as a dialog, from the right; below 40 rem wide it is the whole screen | the drawer's content |
16
+ | A list with a detail | the list and the detail scroll independently when both need it; the chosen row stays visible | each region |
17
+ | A wide table | contained sideways scroll inside its card, the first column and its header sticky, never the page | the table's scroller |
18
+ | A board of stages (kanban) on its own page | the board fills the room left; each column scrolls down; the sideways bar sits at the window's foot | the board, and each column |
18
19
  | A form or settings | normal vertical page scroll; the submit at the end of the card, not sticky unless the form is long on a phone | the page |
19
20
  | A guide, a long read | normal vertical page scroll, a slim sticky header only if it holds the one act | the page |
20
21
 
22
+ ## The shell owns its scroll
23
+
24
+ An app shell is the window's height; its body is the one scroll region. The kit builds the rules below in (K1, K2), so
25
+ the shell's markup never needs patching.
26
+
27
+ - **A scroll region's children never shrink.** In a height-bound column (the shell's body and nav, a dialog, a panel's
28
+ body, a stack, a compound card, a page, a board's column) every child keeps its height and the column scrolls. A child
29
+ that should scroll inside says so: `flex: 1; min-height: 0; overflow: auto`. A card squashed to 0 px, a table sliced
30
+ mid-row or a tab row reduced to its hairline is this rule broken.
31
+ - **Every kit scroller is positioned**, so what sits absolutely inside it (screen-reader words, a sticky cell's shade)
32
+ stays inside and never stretches the window. A shell whose window scrolls past its own end is this rule broken.
33
+ - **The nav's foot never scrolls**: the wordmark at the top, the groups scrolling between, the person pinned at the foot.
34
+ - **No `overflow: hidden` on a card or a table**: it clips menus, focus rings and edges. Round the first and last child
35
+ instead.
36
+ - **A long page never chains into the window**: the body's scroll stops at its end (`overscroll-behavior: contain`).
37
+
38
+ ## Sticky
39
+
40
+ - **Sticky is for the one act and the orientation**: a dialog's head and foot, a panel's header, a table's first column
41
+ and its header cell. A sticky element never covers content: pad the scrolling region by its height.
42
+ - **A sticky head shows its bottom hairline only once content scrolls under it.** At rest it has no line; the line (a
43
+ 0.5 px `ws-edge-slot`) appears when something passes beneath, and goes when the region is back at the top.
44
+ - **Cap what sticks.** A drawer's or dialog's sticky head is its one title line (`ws-header-h`, 56): the name, its tag,
45
+ the labelled x and at most one more icon act. The kit pins the whole head (a full-screen phone drawer must keep its
46
+ close), so what you put in the head is what sticks: facts, figures, chips, editors and acts go in the scrolling
47
+ content (the drawer's first section), never in the head. The foot holds one row, at most two buttons. Under 40 rem of
48
+ window height or width the foot scrolls with the content. A phone keeps most of its height for the content, never a
49
+ third of it.
50
+ - **The sticky column of a wide table** carries its header cell with it, on the card's ground, with a soft edge while
51
+ the table is scrolled sideways.
52
+
53
+ ## Overflow that must be seen
54
+
55
+ - **A tab row that overflows** shows it: an edge fade while it can scroll, the chosen tab scrolled into view, the
56
+ scroll padded by 24 at the ends. On a phone, more than four tabs become a `Select`; a shared tab row stays one line and
57
+ scrolls sideways with its focus ring drawn inside.
58
+ - **A wide table** shows that columns exist past the edge: the same edge fade, a thin visible scrollbar. It shows the
59
+ columns the question needs and folds the rest into each row under 480 px.
60
+ - **A menu or a popover** opens in the top layer (the native `popover` attribute or a portal), flips and shifts to stay
61
+ on screen, and scrolls inside past the window's height. No card, dialog or stage clips it.
62
+ - **A full screen** (a chat card's) goes through `morph()`, which lifts it into the top layer while it is full: a bare
63
+ `position: fixed` fills only the nearest ancestor with a transform, a filter or backdrop-filter, `contain` or
64
+ `will-change` (a glass surface is one), and is cut to it. A tooltip anchors to the window the same way.
65
+ - **A wide heatmap** (Seth's lanes by metrics) may scroll sideways inside its own card when its columns cannot narrow
66
+ further; the page around it never does.
67
+
21
68
  ## Rules
22
69
 
23
- - **Every screen works at both the panel width and the page width and fits without clipping**: nothing cut off, no sideways
24
- scroll. Where it does not fit, reduce what is shown (the panel shows the essentials, the page shows everything), not the
25
- size of what is shown.
26
- - **One scroll region per view where possible**; a second only when two things must be compared or kept in place (list +
27
- detail, chat + panel).
28
- - **Sticky is for the one act and the orientation**: a dialog's head and foot, a panel's header, a table's first column. A
29
- sticky element never covers content: pad the scrolling region by its height.
30
- - **Focus follows the opening**: a panel that opens takes focus to its header; Escape or Close returns it to what opened it;
31
- a page returned to restores its scroll position and the chosen row.
70
+ - **Every screen works at both the panel width and the page width and fits without clipping**: nothing cut off, no
71
+ sideways page scroll. Where it does not fit, reduce what is shown (the panel shows the essentials, the page shows
72
+ everything), not the size of what is shown.
73
+ - **One scroll region per view where possible**; a second only when two things must be compared or kept in place
74
+ (list and detail, chat and panel).
75
+ - **Focus follows the opening**: a panel that opens takes focus to its header; Escape or the x returns it to what
76
+ opened it; a page returned to restores its scroll position and the chosen row.
32
77
  - **Keyboard open on a phone**: the composer and a sticky submit sit above it; the thread scrolls to keep the last turn
33
78
  visible.
34
79
  - **Long collections**: a list over about 50 rows paginates or virtualises; a board of cards never exceeds what one page
35
80
  can show without a second column of columns; a table shows the columns the question needs and folds the rest.
36
- - **Charts never scroll**: a chart that does not fit at 480 px wraps its labels, drops to one column, or becomes a different
37
- chart (a wide bar chart becomes rows of ticks).
81
+ - **Charts do not scroll**: a chart that does not fit at 480 px wraps its labels, drops to one column, or becomes a
82
+ different chart (a wide bar chart becomes rows of ticks). The one exception is a wide heatmap, above.
83
+ - **No scrollbar while a card is moving** between two sizes, and a scrolled card returns to its top before it closes.
@@ -1,28 +1,34 @@
1
1
  # Choosing components
2
2
 
3
3
  Each user need, the component that answers it, and the rule that decides. Start here, not in the component list.
4
+ Components new in 0.5.0 are marked (new).
4
5
 
5
6
  ## Acting and navigating
6
7
 
7
8
  | Need | Component | Rule |
8
9
  | --- | --- | --- |
9
- | Do the one thing this card or page is for | `Button` primary, large (36) | one navy button per card and per page, last on the band |
10
- | Do a second thing beside it | `Button` secondary, large | never a second navy |
11
- | A page header's acts ("Build a call", "New criteria") | `Button` secondary, small (28) beside a title, medium (32) in a toolbar of 32 px fields | |
12
- | A row's acts ("Done", "Approve", "Move") | `Button` secondary or ghost, small | |
10
+ | Do the one thing this card or page is for | `Button` primary, large | one navy button per card and per page, last on the band |
11
+ | Do a second thing beside it | `Button` secondary, large; in a drawer or a row, Seth's grey `ws-btn--well` | never a second navy; in a drawer the two may fill the width as equal halves (the well, then the primary), stacking full width when a half would break a label |
12
+ | A page header's acts ("Refresh", "Settings") | `Button` secondary at the default 32, in the 56 px header or a toolbar of 32 px fields | |
13
+ | A row's acts ("Done", "Approve", "Review") | `Button` secondary or ghost at the default 32 (Seth's fix rows); small in a dense table row | the act may turn primary while its row is open |
14
+ | A label that may be wider than its column (a long link act, a translation) | `Button` with `ws-btn--wrap` | a button is one line and never shrinks beside its row's words; only an opted-in label wraps, in balanced lines (a link, text or ghost reads from its start) |
13
15
  | Words that act inside a sentence | `Button` link (mid blue: goes somewhere or shows more) or text (navy: a quiet act) | never a boxed button in running words |
14
16
  | Go somewhere | `Button` as a link (`ButtonLink`), or `ws-link` | a link is a link in the markup, whatever it looks like |
15
- | An act with no words (send, close, more, mic) | `IconButton` with a label | |
17
+ | An act with no words (send, close, more, previous, next) | `IconButton` with a label | |
16
18
  | Turn something on or off, stays on | `Button selected` or `IconButton selected` (navy) | a toggle's state is `aria-pressed` |
17
19
  | Switch between a few views of one thing | `Segmented` (a switch) | inside the card it filters |
18
- | Move between 2 to 4 views of one thing | `Segmented tabs` (a real tablist) | no tab row of its own styles; no inner tabs on a board page |
19
- | Move between 5 or more sections of a settings or detail page | `Tabs` (underline) | scrolls sideways on a phone |
20
- | Know where you are in a deep hierarchy | `Breadcrumb` | collapse the middle over four levels |
20
+ | Move between 2 to 4 views of one thing | `Segmented tabs` (a real tablist) | the well look carries a figure per tab; no tab row of its own styles |
21
+ | Move between 5 or more sections of a settings or detail page | `Tabs` (underline) | overflow shows an edge fade; more than four on a phone become a `Select` |
22
+ | Filter a whole page by period and scope | `FilterBar` (new) | one per page, under its head, docking into the bar as the page scrolls; a filter for one chart stays in that card |
23
+ | Know where you are in a deep hierarchy | `Breadcrumb` | the root crumb never shrinks; collapse the middle over four levels |
21
24
  | Move through a long collection | `Pagination` in the card's foot | |
22
- | A product of several pages that is not chat-first | `AppShell` and `TopBar` | the same rows, gutters and one navy button as the chat shell |
25
+ | A product of several pages that is not chat-first | `AppShell` (with its sidebar) and `TopBar` | the same rows, gutters and one navy button as the chat shell |
23
26
  | A single page: an artifact, a report, an internal page | `Page` with a `PageBar` | no shell; its board holds the cards; start from `Starter` |
24
- | Open the one thing's details | a link `Card`, a `Well` row, a table row | it opens in the panel beside the chat, or the page's side pane |
27
+ | A thread or app page in place of the chat | `PageBar`'s 56 px thread header | the page's name, the app's name, its acts, the way back |
28
+ | Open the one thing's details | a link `Card`, a `Well` row, a `CheckRow`, a table row | it opens in the panel beside the chat, a drawer, or the page's side pane |
25
29
  | A list of things to ask or start | `Well` (its rows are `WellRow`s) | every "what to ask" list |
30
+ | A few starters under an ask field or in the chat | `SuggestionChip` (new) | short, sentence case, at most a row of them |
31
+ | Choose light, dark or the system's | `ThemeSwitch` (new) | at the foot of the nav; dark is opt-in (Colour) |
26
32
  | Find a page or a command | a command palette on ⌘K (a pattern; no catalog piece yet) | |
27
33
  | Show a keyboard shortcut | `Kbd` | beside the command it runs, never alone |
28
34
 
@@ -36,11 +42,12 @@ Each user need, the component that answers it, and the rule that decides. Start
36
42
  | Choose one of many | `Select` | over 5 options, or a choice that changes the data rather than the view |
37
43
  | Choose one of many with search, or several as tags | `Combobox` | over about 20 options, or when the list is open-ended ("Create 'Pine Street'") |
38
44
  | A number with a unit or steps | `NumberInput` | |
45
+ | A value on a range (a team size, a share) | `Slider` (new) | the value said in words beside it |
39
46
  | A password | `PasswordInput` | |
40
47
  | A file | `FileUpload` | |
41
48
  | Choose several | `Checkbox` | independent choices; the label is part of the target |
42
49
  | A setting that applies at once | `Switch`, with "Saved" shown for a moment | the whole row is the target |
43
- | Talk or type to an agent | `Composer` | the one chat box |
50
+ | Talk or type to an agent | `Composer` | the one chat box; a drawer's small ask field is its compact look |
44
51
  | Pick a date or a range | `DateInput` (native first, with its popover month grid) | |
45
52
  | Search a list | `Input` with the search icon, in the card it searches | (Patterns) |
46
53
 
@@ -48,32 +55,45 @@ Each user need, the component that answers it, and the rule that decides. Start
48
55
 
49
56
  | Need | Component | Rule |
50
57
  | --- | --- | --- |
51
- | A question with an answer and an act | `Card` (title, one line, body, band) | the whole site's unit |
58
+ | A question with an answer and an act | `Card` (title, one line, body, foot or band) | the whole site's unit; rimmed (Space and layout) |
52
59
  | Several questions on one page | `CardBoard` of cards | one card per question; the key cards first |
60
+ | A main column with a side column | `Split` (new) | the aside a fixed width, tops aligned, stacking by container width |
53
61
  | A list or a pipeline | one `Card` holding rows or a board | a list is one card, never loose rows on the page |
62
+ | A list beside the one item it opens (an inbox) | `ListDetail` (new) | the list one column, the item the rest; the chosen row stays lit; on a phone the item is its own screen |
63
+ | A short grouped list in a side column, no card | `SideList` (new) | small heads, 0.5 px dividers, rows that open |
64
+ | Several ratings or checks, each opening its detail | `CheckRow` (new) in a rimmed `Card` | name, a tick strip, the figure and the status in fixed right-aligned columns |
65
+ | A checklist of fixes with one act each | `CheckRow` (new), the fix form | the box, the title and its effort, one act, a chevron that opens the detail in place |
66
+ | Yes or no across a few sources (a question by platform) | `Matrix` (new) | one column template for head and rows; hovering a row dims the others |
54
67
  | Repeated attributes to compare (columns) | `Table` inside a card | only when the question is about columns; when each item is read as a thing (a person), rows |
55
68
  | Who leads, by a score | `Leaderboard` | the person's own row lit |
56
69
  | What to do next, one row a person or thing ("who needs a nudge") | `ActionList` in a `Card` | the reason in words with its figures; one secondary act per row; a bulk act in the band |
57
70
  | What happened, in order | `Timeline` | |
58
71
  | Things moving through stages | `KanbanBoard` | a card glides between stages |
59
72
  | A few facts about one thing | a `Plate` of label and value rows | inside the card |
60
- | A number that matters | `GoalTicks` (the 72 px number with its change chip) or `StatTiles` (several 40 px figures) | one 72 px number per card; tiles only where the answer is numbers |
73
+ | A score that answers a report | `ScoreHero` (new) | the 96 px score, its strip, the rating word and one sentence; one per report |
74
+ | A number that matters | `GoalTicks` (the 72 px number with its change chip) or `StatTiles` (several figures) | one hero figure per card; tiles only where the answer is numbers |
75
+ | A key metric that opens across its row | `MetricTile` (new) | closed: label, figure, pace bar, foot; open: its chart and side column |
76
+ | Progress against a pace or a target | `PaceBar` (new) | the fill, the pace mark, the figure in words beside |
61
77
  | A change since when | `ChangeChip` (in `Chip`) | an arrow and words, never colour alone |
62
- | A count, a kind, a state | `Chip` | |
78
+ | A count, a kind, a state | `Chip` | a rating's tag takes the rating's tint and word |
63
79
  | A disclosure ("Why", "All details", a chapter) | `Fold` (card, quiet or row) | the one disclosure; never a custom accordion |
64
80
  | A small group inside a card | `Section` | |
65
- | A tile in a bento | `Tile` | |
81
+ | A tile in a bento, or the row of what an app can do | `Tile` | the tile row sits on the well, each tile a door or the step it waits on |
66
82
  | People | `Avatar` (and its stack) | |
67
83
  | An agent | the assistant's own mark, drawn by the designer (no catalog piece) | still outside the chat (AI experiences) |
68
- | A short tip on hover or focus | `Tooltip` | never the only place a label lives |
84
+ | A short tip on hover or focus | `Tooltip` | never the only place a label lives; its navy note holds a cell's full words |
85
+ | A reading of a chart's mark under the pointer | `HoverCard` (new) | a caret to its mark; the value is still written beside the mark |
69
86
  | Content anchored to a control (a small form, an explanation) | `Popover` | Escape closes, focus returns |
70
87
  | A count on a face, an icon or a row | `Badge` | a dot alone where a number would crowd |
88
+ | Charts of every kind | Charts | `TickStrip`, `ShareBar`, `StepLine`, `Heatmap`, `SegmentedProgress` and the rest |
71
89
 
72
90
  ## Containing and interrupting
73
91
 
74
92
  | Need | Component | Rule |
75
93
  | --- | --- | --- |
76
- | Inspect one thing while keeping the list or chat | `Panel` (440 beside the chat) or a page's side pane | the same view component in both; Close is a word |
94
+ | Inspect one thing while keeping the list or chat | `Panel` (440 beside the chat, or a rimmed drawer beside a report) or a page's side pane | the same view component in each |
95
+ | The chat as a bar, docked beside a page, floating or full screen | `ChatShell` (new) | one chat; it moves between its modes as itself |
96
+ | One long conversation, marked by topic | `TopicRail` (new) with `ChatShell` | the topics as a rail; the conversation stays one thread |
77
97
  | A short blocking task (confirm, name, one field) | `Dialog` | sparingly; head, content, foot with the one primary last |
78
98
  | A list of acts | `Menu` | the three dots open it |
79
99
  | A quiet confirmation of a background act | `Toast` | essential information lives elsewhere |
@@ -86,16 +106,24 @@ Each user need, the component that answers it, and the rule that decides. Start
86
106
 
87
107
  | Need | Component | Rule |
88
108
  | --- | --- | --- |
89
- | Content on its way | `Skeleton` | never a spinner for content |
90
- | A press waiting on its answer | `Button pending` | a second press waits; the button stays focusable |
109
+ | Content on its way | `Skeleton` (the shimmer, one quiet grey, over ghost shapes) | never a spinner for content |
110
+ | An answer at work | `StatusLine` (new) | the agent, what it is doing, the step |
111
+ | A long load with no figure | `LoadBar` (new) | it never claims to finish before it has |
112
+ | A press waiting on its answer | `Button pending` | keeps its width; a second press waits; the button stays focusable |
91
113
  | A long job | `Stepper`, or a `Meter` for a share done | |
92
- | Nothing here yet | `EmptyState` | first use, no matches and unavailable differ (Patterns) |
114
+ | Nothing here yet | `EmptyState` | a plain cream card; first use, no matches and unavailable differ (Patterns) |
93
115
  | Data that does not exist | nothing: leave the card out | never a placeholder card |
94
116
 
95
117
  ## Deciding between near neighbours
96
118
 
97
- - **Dialog vs panel vs page**: one field or a yes/no is a dialog; a thing with its own content is a panel; anything with
98
- steps, several sections or its own navigation is a page (or an entry step), never a dialog.
119
+ - **Dialog vs panel vs page**: one field or a yes/no is a dialog; a thing with its own content is a panel or a drawer;
120
+ anything with steps, several sections or its own navigation is a page (or an entry step), never a dialog.
99
121
  - **Chip vs ChangeChip vs word**: a chip names a kind or a count; a change chip says how a number moved; a plain word in a
100
122
  tone says a state inside a sentence.
123
+ - **TickStrip vs TickRow vs GoalTicks**: a share across the full width in one tone is a `TickStrip`; a small count of a
124
+ few ticks is a `TickRow`; a goal's one number with its gradient strip is `GoalTicks`.
125
+ - **CheckRow vs Table vs ActionList**: things read as ratings or fixes, each opening its detail, are `CheckRow`s; columns
126
+ to compare are a `Table`; who to act on next, each with a reason, is an `ActionList`.
127
+ - **ListDetail vs Panel**: when choosing a row is the whole page's job (an inbox), the detail shares the page's grid
128
+ (`ListDetail`); when the list is the page and the detail is a visit, it opens in a `Panel`.
101
129
  - **Editing**: inline, panel or page, as Patterns' editing table says.