@orbitcommerce/constellation-docs 0.0.0-stage → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/LICENSE.md +6 -0
  2. package/README.md +6 -2
  3. package/dist/docs.css +8260 -0
  4. package/dist/index.d.ts +33 -0
  5. package/dist/index.js +308 -0
  6. package/dist/pages/Playground-CNbBbErC.js +129 -0
  7. package/dist/pages/_figures-data-BDmScEny.js +606 -0
  8. package/dist/pages/_foundations-blXWyYh8.js +30 -0
  9. package/dist/pages/_overlays-specimens-Dpn6oiyH.js +310 -0
  10. package/dist/pages/alert-BD4e6QTh.js +769 -0
  11. package/dist/pages/app-shell-KbA-nRqZ.js +1479 -0
  12. package/dist/pages/area-chart-B91dLcGo.js +562 -0
  13. package/dist/pages/avatar-DPPHXJAu.js +713 -0
  14. package/dist/pages/badge-C9JR0thI.js +729 -0
  15. package/dist/pages/button-D3V912P4.js +518 -0
  16. package/dist/pages/calendar-DSDZ9nRH.js +630 -0
  17. package/dist/pages/card-DUggbis3.js +659 -0
  18. package/dist/pages/checkbox-DwimQaK3.js +365 -0
  19. package/dist/pages/colour-BwuO8xAv.js +1498 -0
  20. package/dist/pages/command-palette-xAD7fOg6.js +1243 -0
  21. package/dist/pages/date-picker-BYSa816m.js +1421 -0
  22. package/dist/pages/delta-CtAo0eIM.js +574 -0
  23. package/dist/pages/dialog-BRAf4LMh.js +1451 -0
  24. package/dist/pages/docs-BNOb7AqR.js +515 -0
  25. package/dist/pages/empty-state-C-mLrXW2.js +417 -0
  26. package/dist/pages/figure-tabs-CoPFzzKz.js +460 -0
  27. package/dist/pages/home-dashboard-CFQwDtC9.js +959 -0
  28. package/dist/pages/host-B6znjEgQ.js +109 -0
  29. package/dist/pages/icon-button-C9eSVPPW.js +861 -0
  30. package/dist/pages/icons-sxkTs5Ob.js +473 -0
  31. package/dist/pages/input-KF9Gkawf.js +1093 -0
  32. package/dist/pages/installation-DpsX8G_n.js +445 -0
  33. package/dist/pages/kbd-cNfDoikz.js +544 -0
  34. package/dist/pages/live-globe-ClvLn9Lb.js +571 -0
  35. package/dist/pages/logo-BfGF1Pq9.js +571 -0
  36. package/dist/pages/menu-by2sgQ09.js +1618 -0
  37. package/dist/pages/motion-BvTGc2Dk.js +855 -0
  38. package/dist/pages/orbit-spinner-Dil1Z3Oy.js +332 -0
  39. package/dist/pages/overview-BPEbZQ6g.js +130 -0
  40. package/dist/pages/pagination-BBUnGvv5.js +249 -0
  41. package/dist/pages/popover-Db1gLDpb.js +1136 -0
  42. package/dist/pages/principles-CeAIOIdt.js +483 -0
  43. package/dist/pages/radio-group-CkdBWWfG.js +1077 -0
  44. package/dist/pages/registry-CroHzK9I.js +244 -0
  45. package/dist/pages/release-Dvo684UJ.js +13 -0
  46. package/dist/pages/rolling-number-qmvH84Mq.js +529 -0
  47. package/dist/pages/search-field-BN7MWGQ4.js +693 -0
  48. package/dist/pages/segmented-control-CTbIpRBW.js +777 -0
  49. package/dist/pages/select-DguELoRR.js +1429 -0
  50. package/dist/pages/separator-CPZub9pv.js +351 -0
  51. package/dist/pages/shape-DKvA0YKr.js +627 -0
  52. package/dist/pages/skeleton-DLuBhP46.js +561 -0
  53. package/dist/pages/sparkline-DMMYGbHn.js +668 -0
  54. package/dist/pages/switch-B-Qe4kcT.js +517 -0
  55. package/dist/pages/table-AMoODng4.js +607 -0
  56. package/dist/pages/tabs-B4M-usCV.js +1455 -0
  57. package/dist/pages/textarea-fTuUZRQb.js +693 -0
  58. package/dist/pages/toast-CKP03zjy.js +1176 -0
  59. package/dist/pages/tooltip-CBYil3kt.js +697 -0
  60. package/dist/pages/typography-PCbg8Bhg.js +735 -0
  61. package/manifest.json +3125 -0
  62. package/package.json +35 -4
package/manifest.json ADDED
@@ -0,0 +1,3125 @@
1
+ {
2
+ "name": "@orbitcommerce/constellation-docs",
3
+ "version": "1.0.0",
4
+ "constellation": {
5
+ "name": "@orbitcommerce/constellation",
6
+ "version": "1.0.2"
7
+ },
8
+ "groups": [
9
+ {
10
+ "id": "start",
11
+ "title": "Get started"
12
+ },
13
+ {
14
+ "id": "foundations",
15
+ "title": "Foundations"
16
+ },
17
+ {
18
+ "id": "components",
19
+ "title": "Components"
20
+ },
21
+ {
22
+ "id": "patterns",
23
+ "title": "Patterns"
24
+ }
25
+ ],
26
+ "nav": [
27
+ {
28
+ "id": "start",
29
+ "title": "Get started",
30
+ "paths": [
31
+ "/",
32
+ "/start/installation",
33
+ "/start/principles"
34
+ ]
35
+ },
36
+ {
37
+ "id": "foundations",
38
+ "title": "Foundations",
39
+ "paths": [
40
+ "/foundations/colour",
41
+ "/foundations/typography",
42
+ "/foundations/shape",
43
+ "/foundations/motion",
44
+ "/foundations/icons",
45
+ "/foundations/logo"
46
+ ]
47
+ },
48
+ {
49
+ "id": "actions",
50
+ "title": "Actions",
51
+ "paths": [
52
+ "/components/button",
53
+ "/components/icon-button"
54
+ ]
55
+ },
56
+ {
57
+ "id": "inputs",
58
+ "title": "Inputs",
59
+ "paths": [
60
+ "/components/input",
61
+ "/components/textarea",
62
+ "/components/select",
63
+ "/components/search-field",
64
+ "/components/checkbox",
65
+ "/components/radio-group",
66
+ "/components/switch",
67
+ "/components/segmented-control",
68
+ "/components/date-picker",
69
+ "/components/calendar",
70
+ "/components/tabs"
71
+ ]
72
+ },
73
+ {
74
+ "id": "overlays",
75
+ "title": "Overlays",
76
+ "paths": [
77
+ "/components/menu",
78
+ "/components/popover",
79
+ "/components/dialog",
80
+ "/components/tooltip",
81
+ "/components/command-palette"
82
+ ]
83
+ },
84
+ {
85
+ "id": "data",
86
+ "title": "Data",
87
+ "paths": [
88
+ "/components/table",
89
+ "/components/pagination"
90
+ ]
91
+ },
92
+ {
93
+ "id": "display",
94
+ "title": "Feedback and display",
95
+ "paths": [
96
+ "/components/alert",
97
+ "/components/toast",
98
+ "/components/badge",
99
+ "/components/avatar",
100
+ "/components/card",
101
+ "/components/delta",
102
+ "/components/empty-state",
103
+ "/components/kbd",
104
+ "/components/separator",
105
+ "/components/skeleton",
106
+ "/components/orbit-spinner"
107
+ ]
108
+ },
109
+ {
110
+ "id": "figures",
111
+ "title": "Figures and charts",
112
+ "paths": [
113
+ "/components/live-globe",
114
+ "/components/rolling-number",
115
+ "/components/sparkline",
116
+ "/components/area-chart",
117
+ "/components/figure-tabs"
118
+ ]
119
+ },
120
+ {
121
+ "id": "patterns",
122
+ "title": "Patterns",
123
+ "paths": [
124
+ "/patterns/app-shell",
125
+ "/patterns/home-dashboard"
126
+ ]
127
+ }
128
+ ],
129
+ "pages": [
130
+ {
131
+ "path": "/patterns/app-shell",
132
+ "group": "patterns",
133
+ "slug": "app-shell",
134
+ "title": "App shell",
135
+ "status": "new",
136
+ "lead": "The Orbit app frame: the merchant's store and navigation on the porcelain ground, a slim header across the top, and every page on one white canvas raised on it. Use it once, at the root of every Orbit dashboard.",
137
+ "importNames": [
138
+ "AppShell",
139
+ "Canvas",
140
+ "Sidebar",
141
+ "SidebarItem",
142
+ "TopBar"
143
+ ],
144
+ "sections": [
145
+ {
146
+ "id": "frame",
147
+ "title": "The frame, live",
148
+ "text": "A whole shell for an invented shop, Harbour Desk Co, in a fixed-height frame. Move between pages and watch the white pill glide, open the store switcher at the foot, press Receive an order, and fold the sidebar with the toggle beside the logo or the [ key. On this page [ folds this demo frame; the docs site's own sidebar is held open."
149
+ },
150
+ {
151
+ "id": "anatomy",
152
+ "title": "Anatomy",
153
+ "text": "Two planes: the ground (sidebar and header) and the raised canvas. Every part is a separate component, so hosts compose their own sidebar and header."
154
+ },
155
+ {
156
+ "id": "items",
157
+ "title": "Sidebar items",
158
+ "text": "active marks the page you are on: the white pill settles there, the label turns ink and the icon swaps to its duotone activeIcon in teal. current marks a parent whose child page is active: it reads as current without taking the pill. Here Returns is active and Orders is current."
159
+ },
160
+ {
161
+ "id": "rail",
162
+ "title": "Expanded and the icon rail",
163
+ "text": "Folded, the sidebar becomes a 68px rail: labels fade out, section titles become hairline ticks, counts become dots, the store shows only its logo, and each item's name moves into a tooltip on the right. The columns resize on the settle spring over 480ms. Both states side by side, in both themes:"
164
+ },
165
+ {
166
+ "id": "responsive",
167
+ "title": "Tablet and phone",
168
+ "text": "The shell reads the window width, reports it as mode, and changes shape only on phones."
169
+ },
170
+ {
171
+ "id": "use-shell",
172
+ "title": "useShell and useOptionalShell",
173
+ "text": "Anything inside AppShell can read and drive the frame. useShell() throws outside a shell; useOptionalShell() returns null instead, for parts that also render on their own (the sidebar, the header and the toggle use it). The frame's canvas above reads it to show the mode and to fold the sidebar."
174
+ },
175
+ {
176
+ "id": "top-bar",
177
+ "title": "Header, breadcrumbs and brand",
178
+ "text": "TopBar takes three slots. start holds Breadcrumbs (or a page title), center the search pill that grows into the command palette, and end the actions: ghost icon buttons 4px apart, the View store pill and the account avatar. ShellBrand is the Orbit logo: placement=\"header\" for the app's logo top left of the sidebar, or the default quiet signature (with an optional meta such as a version) for a footer. Both turn to the mark alone in the rail."
179
+ },
180
+ {
181
+ "id": "guidelines",
182
+ "title": "Guidelines",
183
+ "text": ""
184
+ },
185
+ {
186
+ "id": "accessibility",
187
+ "title": "Accessibility",
188
+ "text": ""
189
+ },
190
+ {
191
+ "id": "props",
192
+ "title": "Props",
193
+ "text": ""
194
+ }
195
+ ]
196
+ },
197
+ {
198
+ "path": "/components/button",
199
+ "group": "components",
200
+ "slug": "button",
201
+ "title": "Button",
202
+ "category": "actions",
203
+ "status": "stable",
204
+ "lead": "A pill that starts an action. The primary pill carries Orbit's comet: light that passes once around it on hover and stays in orbit while the action runs.",
205
+ "importNames": [
206
+ "Button"
207
+ ],
208
+ "sections": [
209
+ {
210
+ "id": "playground",
211
+ "title": "Playground",
212
+ "text": "Change the props and watch the pill. Hover the primary to send the comet round; turn on loading to keep it in orbit."
213
+ },
214
+ {
215
+ "id": "variants",
216
+ "title": "Variants",
217
+ "text": "Six materials, one shape. secondary is the default. Use primary once per view, for the action the page exists for."
218
+ },
219
+ {
220
+ "id": "both-themes",
221
+ "title": "In both themes",
222
+ "text": "Every variant, light and dark side by side. In dark, primary turns mint and its label turns ink."
223
+ },
224
+ {
225
+ "id": "sizes",
226
+ "title": "Sizes",
227
+ "text": "Heights snap to the control scale shared by every control in the kit, so a button, a search field and a segmented control line up in any toolbar: xs 24px, sm 30px, md 36px (default), lg 44px."
228
+ },
229
+ {
230
+ "id": "icons",
231
+ "title": "With icons",
232
+ "text": "icon leads, iconEnd trails. A trailing caret means the button opens a menu; a trailing arrow-out means it leaves Orbit. Icons are 16px in md and scale with the size."
233
+ },
234
+ {
235
+ "id": "loading",
236
+ "title": "Loading",
237
+ "text": "While the action runs, the comet stays in orbit around the pill and the leading icon becomes an Orbit spinner. The button keeps focus and ignores repeat presses. Press it to see."
238
+ },
239
+ {
240
+ "id": "disabled",
241
+ "title": "Disabled",
242
+ "text": "Use sparingly. A disabled button does not say why, so prefer leaving it enabled and explaining the problem when it is pressed. When you must disable, say why nearby."
243
+ },
244
+ {
245
+ "id": "as-link",
246
+ "title": "As a link",
247
+ "text": "When the button goes somewhere rather than doing something, render the link itself with asChild. It keeps the link's semantics (open in new tab, copy address) and the pill's look."
248
+ },
249
+ {
250
+ "id": "full-width",
251
+ "title": "Full width",
252
+ "text": "Fills its container. For narrow panels, sheets on phones and the foot of a card."
253
+ },
254
+ {
255
+ "id": "guidelines",
256
+ "title": "Guidelines",
257
+ "text": ""
258
+ },
259
+ {
260
+ "id": "accessibility",
261
+ "title": "Accessibility",
262
+ "text": ""
263
+ },
264
+ {
265
+ "id": "props",
266
+ "title": "Props",
267
+ "text": "Also accepts every native button attribute."
268
+ }
269
+ ]
270
+ },
271
+ {
272
+ "path": "/foundations/colour",
273
+ "group": "foundations",
274
+ "slug": "colour",
275
+ "title": "Colour",
276
+ "lead": "A faintly teal-tinted neutral world with warm ink for words. Orbit teal is a line of light: it draws rings, focus, live marks, selection and the one primary pill, and never fills a panel.",
277
+ "sections": [
278
+ {
279
+ "id": "orbit-teal",
280
+ "title": "Orbit teal",
281
+ "text": "The logo colour, #336A65, is the accent in light. In dark it becomes Orbit Mint: the same teal, lit. Each theme uses it three ways: as a fill for small marks, as a line for rings and arcs, and as light for the comet."
282
+ },
283
+ {
284
+ "id": "primitives",
285
+ "title": "Primitive ramps",
286
+ "text": "The raw ramps. Components never read these directly; they read the semantic tokens below, which the themes remap. Every grey carries a trace of the teal. Select a colour to copy its variable."
287
+ },
288
+ {
289
+ "id": "semantic",
290
+ "title": "Semantic tokens",
291
+ "text": "What components read. Light and dark remap every one of them, so a component never asks which theme it is in. Values below are read from the live stylesheet."
292
+ },
293
+ {
294
+ "id": "contrast",
295
+ "title": "Contrast",
296
+ "text": "Measured live from the tokens on this page, against WCAG 2.2: 4.5:1 for text, 3:1 for large text. Every text token clears 4.5:1 on the canvas and on the ground, in both themes. Mist is only for marks that are not text, such as ticks and separators, so it is never used for words."
297
+ },
298
+ {
299
+ "id": "where-teal-goes",
300
+ "title": "Where teal may appear",
301
+ "text": "The Line-of-Light Rule: Orbit teal is drawn, never poured. Anything it fills is small: a dot, a count, a switch track, a pale wash under a badge. These are all the places it goes."
302
+ },
303
+ {
304
+ "id": "dark",
305
+ "title": "Dark theme",
306
+ "text": "Night is its own palette, not an inversion. The same components on both, with nothing branching on the theme."
307
+ },
308
+ {
309
+ "id": "in-code",
310
+ "title": "In code",
311
+ "text": "Read the semantic tokens, and make tints with color-mix so they follow the theme."
312
+ }
313
+ ]
314
+ },
315
+ {
316
+ "path": "/",
317
+ "group": "start",
318
+ "slug": "overview",
319
+ "title": "Constellation by Orbit Commerce",
320
+ "lead": "The design system Orbit Commerce builds its dashboards with: tokens, components and patterns that make every screen feel like one product. Use it to build plugins and apps that look at home inside Orbit Commerce.",
321
+ "sections": []
322
+ },
323
+ {
324
+ "path": "/patterns/home-dashboard",
325
+ "group": "patterns",
326
+ "slug": "home-dashboard",
327
+ "title": "Home dashboard",
328
+ "status": "new",
329
+ "lead": "The home page of Orbit Commerce's store dashboard: the live globe and today's takings at the top, the next job beside them, then how the shop is doing over time. A pattern built entirely from the kit's components; this page shows how they fit together and the rules that hold them.",
330
+ "sections": [
331
+ {
332
+ "id": "thesis",
333
+ "title": "Your business, at the centre",
334
+ "text": "The home answers one question the moment it opens: how is the shop doing right now? So the first screen is the shop live: a globe with a pin wherever someone is browsing, and beside it today's takings with the next job under them. Everything else follows by urgency: how the shop is doing over time, then the latest orders and best sellers. The frame keeps the same order: Orbit's logo top left takes you home, and the merchant's store sits at the foot of the sidebar, one click from every other store. It reads like a till. Money and counts are set in Sora with tabular numerals and roll into place digit by digit, the way a till display turns over. The performance figures sit on one hairline like the totals on a Z-read, the report a till prints at the close of the day: label, figure and change on one line each, with no boxes around them. Teal is drawn, never poured. On the home it is only ever a line or a small mark: the visitor pins on the globe, the line under the selected figure, the chart's line, the share bars, the live dot, the done dots on the tape, and the one primary button. Everything you read stays ink. That keeps teal meaning live or chosen, leaves amber and red free to mean waiting and refunded, and stops the page becoming a wall of colour in which nothing stands out."
335
+ },
336
+ {
337
+ "id": "live",
338
+ "title": "The page, live",
339
+ "text": "A working miniature of the home with an invented shop's evening, built from the kit's components. Drag the globe, click a pin to zoom in, change the range, pick a figure, and simulate a sale."
340
+ },
341
+ {
342
+ "id": "composition",
343
+ "title": "Composition",
344
+ "text": "Top to bottom, each region and what it is made of."
345
+ },
346
+ {
347
+ "id": "today",
348
+ "title": "Today",
349
+ "text": "The first screen is the live globe beside today's takings and the next job. Nothing above them but the greeting."
350
+ },
351
+ {
352
+ "id": "performance",
353
+ "title": "The Z-read strip",
354
+ "text": "Four figures (total sales, orders, sessions and conversion rate) on one hairline, each a figure tab. Changing the range rolls every figure to its new value; picking a figure glides the teal line to it and the chart follows. Today is drawn by the hour (\"14:00\") and longer ranges by the day (\"3 Aug\"). The chart sits in a tab panel named after the selected figure."
355
+ },
356
+ {
357
+ "id": "lists",
358
+ "title": "The tape and top products",
359
+ "text": "Below the chart the page splits 1.35 to 1: the latest orders on the left, the best sellers on the right. Both sit straight on the canvas under a heading and a hairline."
360
+ },
361
+ {
362
+ "id": "layout",
363
+ "title": "Layout",
364
+ "text": ""
365
+ },
366
+ {
367
+ "id": "states",
368
+ "title": "Loading and empty",
369
+ "text": "Every region has a loading shape and an empty line of its own, so a new shop's home reads as ready rather than broken."
370
+ },
371
+ {
372
+ "id": "guidelines",
373
+ "title": "Guidelines",
374
+ "text": ""
375
+ },
376
+ {
377
+ "id": "accessibility",
378
+ "title": "Accessibility",
379
+ "text": ""
380
+ }
381
+ ]
382
+ },
383
+ {
384
+ "path": "/components/icon-button",
385
+ "group": "components",
386
+ "slug": "icon-button",
387
+ "title": "Icon button",
388
+ "category": "actions",
389
+ "status": "stable",
390
+ "lead": "A round button that holds a single icon, for compact actions in the header, toolbars and rows. It always carries a label: screen readers read it as the button's name, and a tooltip shows it to everyone else.",
391
+ "importNames": [
392
+ "IconButton",
393
+ "Tooltip"
394
+ ],
395
+ "sections": [
396
+ {
397
+ "id": "playground",
398
+ "title": "Playground",
399
+ "text": "Change the props and watch the button. The playground starts on secondary so the circle shows at rest; the component's default is ghost, only a glyph until the pointer arrives."
400
+ },
401
+ {
402
+ "id": "variants",
403
+ "title": "Variants",
404
+ "text": "The same six materials as Button, on a circle. ghost is the default, because icon buttons usually sit in groups where filled circles would crowd each other."
405
+ },
406
+ {
407
+ "id": "both-themes",
408
+ "title": "In both themes",
409
+ "text": "Every variant, light and dark side by side. Hover the ghost button to see its tint."
410
+ },
411
+ {
412
+ "id": "sizes",
413
+ "title": "Sizes",
414
+ "text": "The control scale shared with every control in the kit, so an icon button lines up with the pills and fields beside it. The button is always a circle: its width is its height."
415
+ },
416
+ {
417
+ "id": "tooltip",
418
+ "title": "With a tooltip",
419
+ "text": "The label names the button for screen readers, but sighted people only see the icon. Wrap the button in a Tooltip that repeats the label, so hovering or tabbing to it says what it does. When the action has a keyboard shortcut, pass shortcut and the keys appear beside the words. A tooltip opens after a short hover and straight away on keyboard focus. Once one is open, its neighbours open instantly, so moving along a toolbar is quick. Hover the header actions below."
420
+ },
421
+ {
422
+ "id": "toolbar",
423
+ "title": "In a toolbar",
424
+ "text": "Group related icon buttons 4px apart and split the groups with a vertical Separator. For a button that switches something on and off, pass aria-pressed and switch it to soft while it is on. Try the formatting buttons."
425
+ },
426
+ {
427
+ "id": "loading",
428
+ "title": "Loading",
429
+ "text": "While the action runs, a comet circles the button (teal on every material but primary), presses are ignored and focus stays put. Press the refresh button to see it."
430
+ },
431
+ {
432
+ "id": "disabled",
433
+ "title": "Disabled",
434
+ "text": "Drops to 45% and can no longer be focused, so a keyboard user never reaches its tooltip. Undo and redo are the fair use: when there is nothing to undo, the reason is obvious. Otherwise leave it enabled and explain the problem when it is pressed."
435
+ },
436
+ {
437
+ "id": "guidelines",
438
+ "title": "Guidelines",
439
+ "text": ""
440
+ },
441
+ {
442
+ "id": "accessibility",
443
+ "title": "Accessibility",
444
+ "text": ""
445
+ },
446
+ {
447
+ "id": "props",
448
+ "title": "Props",
449
+ "text": "Also accepts every native button attribute, such as aria-pressed and type."
450
+ }
451
+ ]
452
+ },
453
+ {
454
+ "path": "/start/installation",
455
+ "group": "start",
456
+ "slug": "installation",
457
+ "title": "Installation",
458
+ "lead": "Constellation by Orbit Commerce is one package: tokens, styles, fonts, icons and React components. Import the stylesheet once, wrap the app in a tooltip provider, and every screen looks at home in Orbit Commerce.",
459
+ "sections": [
460
+ {
461
+ "id": "install",
462
+ "title": "Install",
463
+ "text": "The whole kit is one package on npm."
464
+ },
465
+ {
466
+ "id": "styles",
467
+ "title": "Add the styles",
468
+ "text": "Import the fonts and the stylesheet once, at the root, after the app's own CSS."
469
+ },
470
+ {
471
+ "id": "fonts",
472
+ "title": "Fonts",
473
+ "text": "fonts.css loads Geist, Sora and Geist Mono, self-hosted through Fontsource (SIL Open Font License). A host that already ships Geist can load only what it is missing."
474
+ },
475
+ {
476
+ "id": "base",
477
+ "title": "The optional base",
478
+ "text": "The kit never resets the host page. An app that adopts it as its whole look adds.o-root to its root element; without it, components still look right and the host's own text, background and focus styles stay as they are."
479
+ },
480
+ {
481
+ "id": "icons",
482
+ "title": "Icons",
483
+ "text": "Icons come from the package's icons entry: Phosphor, re-exported so the set can be swapped for Orbit's own drawings later without touching product code. See Icons."
484
+ },
485
+ {
486
+ "id": "dark-theme",
487
+ "title": "Dark theme",
488
+ "text": "Light is the default. Dark applies under any of three markers on an ancestor, so the kit follows whichever toggle the host already has. Components read semantic tokens and never branch on the theme."
489
+ },
490
+ {
491
+ "id": "theme-scope",
492
+ "title": "Theme islands",
493
+ "text": "ThemeScope makes a light or dark island inside a page of the other theme: a dark band on a light page, a preview. Menus, popovers, dialogs, tooltips and the command palette opened inside it follow the island, even though they are portalled out of it. Open the menu to see."
494
+ },
495
+ {
496
+ "id": "tooltip-provider",
497
+ "title": "Tooltip provider",
498
+ "text": "Wrap the app in one TooltipProvider, near the root. It shares timing across tooltips: once one is open, its neighbours open instantly, which is what makes a toolbar feel quick. A lone tooltip brings its own provider, so nothing breaks without it; it is just slower."
499
+ },
500
+ {
501
+ "id": "frameworks",
502
+ "title": "Vite and Next.js",
503
+ "text": "The package ships ES modules and CommonJS with type definitions. In Vite, import and go. For React Server Components, the build adds a 'use client' banner to every bundle, because every component uses hooks: import components straight into Server Components and they render as client components."
504
+ },
505
+ {
506
+ "id": "licence",
507
+ "title": "Licence",
508
+ "text": ""
509
+ },
510
+ {
511
+ "id": "browsers",
512
+ "title": "Browser support",
513
+ "text": "Chrome 125, Safari 16.4 and Firefox 128 or later. The kit relies on oklch(), color-mix(), @property and linear() easing."
514
+ },
515
+ {
516
+ "id": "checklist",
517
+ "title": "Checklist",
518
+ "text": ""
519
+ }
520
+ ]
521
+ },
522
+ {
523
+ "path": "/foundations/typography",
524
+ "group": "foundations",
525
+ "slug": "typography",
526
+ "title": "Typography",
527
+ "lead": "Sora for figures and titles, Geist for every word of UI, Geist Mono for code. Every numeral is tabular, so figures read like a till.",
528
+ "sections": [
529
+ {
530
+ "id": "typefaces",
531
+ "title": "Three typefaces",
532
+ "text": "Sora's geometric lowercase echoes the Orbit wordmark and gives money the presence of a till display. Geist does every other job with an instrument's neutrality. All three are variable fonts, self-hosted through fonts.css."
533
+ },
534
+ {
535
+ "id": "ramp",
536
+ "title": "The ramp in product",
537
+ "text": "Twelve roles, each set exactly as the components set them. Sora carries the figures and headlines; from Title down, everything is Geist."
538
+ },
539
+ {
540
+ "id": "tokens",
541
+ "title": "Type tokens",
542
+ "text": "A fixed rem scale for product UI, with a ratio of about 1.14. Components use 2xs to lg; the larger steps are for page titles, headlines and figures."
543
+ },
544
+ {
545
+ "id": "numerals",
546
+ "title": "Tabular numerals",
547
+ "text": "The Till Rule: every numeral is tabular, everywhere. Figures, badges, deltas, fields, times, amounts, shortcuts. Columns of money line up, and a total that changes never shuffles sideways."
548
+ },
549
+ {
550
+ "id": "weights",
551
+ "title": "Weight in half-steps",
552
+ "text": "Emphasis is tuned, not shouted: Geist moves in steps of 50, so a label can sit a half-step above its value. Synthesised bold is switched off inside.o-root, so a weight is never faked."
553
+ },
554
+ {
555
+ "id": "both-themes",
556
+ "title": "In both themes",
557
+ "text": "The same ramp, light and dark. Words stay ink in both."
558
+ },
559
+ {
560
+ "id": "guidelines",
561
+ "title": "Guidelines",
562
+ "text": ""
563
+ },
564
+ {
565
+ "id": "in-code",
566
+ "title": "In code",
567
+ "text": "Read the tokens, or use the two utility classes:.o-display for Sora with display tracking, and.o-num for tabular numerals."
568
+ }
569
+ ]
570
+ },
571
+ {
572
+ "path": "/start/principles",
573
+ "group": "start",
574
+ "slug": "principles",
575
+ "title": "Principles",
576
+ "lead": "Six ideas behind every Orbit screen. Each one is a rule the components already follow, so building with them keeps a screen on course.",
577
+ "sections": [
578
+ {
579
+ "id": "centre",
580
+ "title": "Your business, at the centre",
581
+ "text": "The direction for the whole system. The merchant's shop sits at the centre of the view and everything else orbits it. Its North Star is the Till in Orbit: a precise instrument for running a UK shop, not a row of KPI cards over a 30-day chart."
582
+ },
583
+ {
584
+ "id": "state-first",
585
+ "title": "1. The shop's state first",
586
+ "text": "What happened, then what needs doing, in that order. Every screen offers the obvious next move, and only that move is a primary pill."
587
+ },
588
+ {
589
+ "id": "line-of-light",
590
+ "title": "2. Teal is a line of light",
591
+ "text": "Orbit teal is drawn, never poured: lines, rings, focus, live marks, what is selected and the one primary pill. Words stay ink. In dark it becomes mint, the same teal lit."
592
+ },
593
+ {
594
+ "id": "till",
595
+ "title": "3. Figures read like a till",
596
+ "text": "Money and counts that lead a view are set in Sora, every numeral is tabular, and a change rolls into place like a till display. A fall is written with a true minus sign."
597
+ },
598
+ {
599
+ "id": "shape",
600
+ "title": "4. Pills, and corners that rise",
601
+ "text": "If it can be pressed, it is a pill. Surfaces round their corners the higher they sit: a field at 12px inside a card at 16px, inside the canvas at 18px."
602
+ },
603
+ {
604
+ "id": "motion",
605
+ "title": "5. Calm, then alive",
606
+ "text": "Nothing moves unless it explains a change. Things settle on springs, the comet circles what is working, and every movement has a still version for people who ask for less motion."
607
+ },
608
+ {
609
+ "id": "plain-words",
610
+ "title": "6. Plain words",
611
+ "text": "Sentence case, UK English, no jargon. A control names its action, and a message says what happened and what to do next."
612
+ },
613
+ {
614
+ "id": "rules",
615
+ "title": "The named rules",
616
+ "text": "The principles, made specific. Every rule is kept by the components themselves, in light and dark, in every Orbit dashboard."
617
+ }
618
+ ]
619
+ },
620
+ {
621
+ "path": "/foundations/shape",
622
+ "group": "foundations",
623
+ "slug": "shape",
624
+ "title": "Shape and depth",
625
+ "lead": "Pills for everything that can be pressed, sheets that round as they rise, and two planes: the porcelain ground and one white canvas raised on it.",
626
+ "sections": [
627
+ {
628
+ "id": "radius",
629
+ "title": "Radius scale",
630
+ "text": "Every radius in use. The Pill Rule: if it can be pressed, it is a pill, and variants change the material, never the shape. Surfaces take the soft corners, rounder the higher they float."
631
+ },
632
+ {
633
+ "id": "altitude",
634
+ "title": "Altitude",
635
+ "text": "The Altitude Rule: the higher a surface floats, the rounder its corners. A field sits in the page at 12px, a menu floats at 14px, a card at 16px, the canvas at 18px and a dialog, highest of all, at 20px."
636
+ },
637
+ {
638
+ "id": "controls",
639
+ "title": "Control heights",
640
+ "text": "Every control snaps to one ladder: 24, 30, 36 and 44px. Buttons, fields, search and segmented controls of the same size share a height, so any toolbar lines up. 36px is the default."
641
+ },
642
+ {
643
+ "id": "planes",
644
+ "title": "Two planes",
645
+ "text": "Flat inside the page, lifted at the frame. The sidebar and header share the porcelain ground, so the white canvas is the only raised plane. Inside the canvas, depth is tonal: hairlines, sunken wells and pebble fills."
646
+ },
647
+ {
648
+ "id": "shadows",
649
+ "title": "Shadows",
650
+ "text": "Kept for what floats over the page, and for pills, which carry a hairline ring and a 1px drop so a white pill still reads on a white canvas. In light, shadows are teal-tinted near-black; in dark they deepen to black and gain a faint white ring, because a shadow alone vanishes on a dark ground."
651
+ },
652
+ {
653
+ "id": "hairline-or-shadow",
654
+ "title": "Hairline or shadow",
655
+ "text": "The Hairline-or-Shadow Rule: a surface carries a 1px hairline or an elevation shadow, never both. A card that lifts swaps its hairline for a transparent border, so changing variant never moves its content."
656
+ },
657
+ {
658
+ "id": "spacing",
659
+ "title": "Spacing",
660
+ "text": "A 4px base with 2px half-steps. Component interiors live on 2 to 12px, with odd pixels (5, 7, 9, 11px) kept as optical corrections around icons; layouts use 16px and up."
661
+ },
662
+ {
663
+ "id": "in-context",
664
+ "title": "In context",
665
+ "text": "Pills inside a card inside the canvas: each level rounder than the one it sits in."
666
+ }
667
+ ]
668
+ },
669
+ {
670
+ "path": "/foundations/motion",
671
+ "group": "foundations",
672
+ "slug": "motion",
673
+ "title": "Motion",
674
+ "lead": "Orbital, and always explaining a change. Things settle into place on springs, light circles what is working, and nothing moves at idle unless it is live.",
675
+ "importNames": [
676
+ "spring",
677
+ "ease",
678
+ "duration"
679
+ ],
680
+ "sections": [
681
+ {
682
+ "id": "durations",
683
+ "title": "Durations",
684
+ "text": "Six steps from instant to focal. Exits run faster than entrances: a menu opens in 200ms and closes in 110ms, a dialog arrives in 320ms and leaves in 150ms."
685
+ },
686
+ {
687
+ "id": "easings",
688
+ "title": "Easings",
689
+ "text": "Arrivals take the confident ease-out or the settle spring. Authored moments take the Orbit curve. The two springs are sampled into linear(), so CSS can settle with an overshoot: about 3% for settle and 12% for pop. The curves below are drawn from the live tokens."
690
+ },
691
+ {
692
+ "id": "springs",
693
+ "title": "Springs in JavaScript",
694
+ "text": "Motion driven from React uses motion/react with the presets from the package, so a shared layout glides on the same spring everywhere. Figures are stiffness and damping, then mass where it is not 1."
695
+ },
696
+ {
697
+ "id": "signature",
698
+ "title": "Signature moments",
699
+ "text": "Four moments carry the brand. Each lives in a component; try them here."
700
+ },
701
+ {
702
+ "id": "choreography",
703
+ "title": "Choreography",
704
+ "text": "Overlays grow out of their trigger, scaling from 0.96 with a fade, and leave faster than they came. The 12% pop is kept for small confirmations: a count changing, a check landing."
705
+ },
706
+ {
707
+ "id": "reduced-motion",
708
+ "title": "Reduced motion",
709
+ "text": "The Stillness Rule: every component carries its own reduced-motion version. Movement (translate, scale, rotate, orbit) is dropped while opacity and colour stay, so every change of state is still legible."
710
+ }
711
+ ]
712
+ },
713
+ {
714
+ "path": "/foundations/icons",
715
+ "group": "foundations",
716
+ "slug": "icons",
717
+ "title": "Icons",
718
+ "lead": "Phosphor's line set, served through the kit's icons entry. Regular at rest, duotone when active, fill only for emphasis.",
719
+ "importNames": [
720
+ "PackageIcon",
721
+ "ReceiptIcon"
722
+ ],
723
+ "sections": [
724
+ {
725
+ "id": "weights",
726
+ "title": "Weights",
727
+ "text": "Three of Phosphor's six weights are in use. Regular is the default. Duotone marks what is active or selected: in the sidebar the current page's icon turns duotone and takes the accent. Fill is for emphasis, sparingly."
728
+ },
729
+ {
730
+ "id": "sizes",
731
+ "title": "Sizes",
732
+ "text": "16px in controls, 18px in navigation, 20px in empty states and larger tiles. The kit's components size their icons for you, so pass the icon bare: a button's icon follows the button's size (13, 15, 16 or 18px)."
733
+ },
734
+ {
735
+ "id": "labels",
736
+ "title": "Icon-only controls need a label",
737
+ "text": "An icon on its own says nothing to a screen reader. IconButton requires a label: it becomes the accessible name, and the tooltip when you wrap it in Tooltip."
738
+ },
739
+ {
740
+ "id": "browse",
741
+ "title": "Browse the set",
742
+ "text": "The icons Orbit uses, grouped by job. Search by name or by what it is for, switch the weight, and select an icon to copy its import name. Every other Phosphor icon is available from the same entry."
743
+ },
744
+ {
745
+ "id": "in-code",
746
+ "title": "In code",
747
+ "text": "Import from the kit, never from Phosphor directly, so the set can be swapped for Orbit's own drawings later without touching product code."
748
+ }
749
+ ]
750
+ },
751
+ {
752
+ "path": "/foundations/logo",
753
+ "group": "foundations",
754
+ "slug": "logo",
755
+ "title": "Logo",
756
+ "lead": "The Orbit Commerce logo, drawn inline so it takes the text colour around it: a ring with an orbiting swoosh, on its own or with the wordmark.",
757
+ "importNames": [
758
+ "OrbitLogo",
759
+ "ShellBrand"
760
+ ],
761
+ "sections": [
762
+ {
763
+ "id": "lockup-and-mark",
764
+ "title": "Lockup and mark",
765
+ "text": "The lockup (the default) pairs the mark with the orbit commerce wordmark. The mark alone is for square or tight spaces: the icon rail, favicons, app icons."
766
+ },
767
+ {
768
+ "id": "colour",
769
+ "title": "Colour",
770
+ "text": "The ring and the wordmark take the text colour (currentColor). The swoosh, \"commerce\" and the dot of the i take --o-logo-accent: Orbit Teal in light, Night Line in dark."
771
+ },
772
+ {
773
+ "id": "sizes",
774
+ "title": "Sizes",
775
+ "text": "size is the height in pixels; the width follows the logo's proportions. The sidebar sizes are set by ShellBrand; the larger lockups are starting points for new screens."
776
+ },
777
+ {
778
+ "id": "clear-space",
779
+ "title": "Clear space",
780
+ "text": "Give the logo room: keep at least a quarter of its height clear on every side, free of text, edges and other marks. ShellBrand's padding keeps this in the sidebar."
781
+ },
782
+ {
783
+ "id": "in-the-sidebar",
784
+ "title": "In the sidebar",
785
+ "text": "ShellBrand places the logo in the sidebar. In the Orbit shell it sits at the head (placement=\"header\"): the app's own logo, top left at full strength, linking home, with the merchant's store at the foot of the sidebar. The default is a quieter signature for a footer. In the icon rail both become the mark."
786
+ },
787
+ {
788
+ "id": "donts",
789
+ "title": "Don'ts",
790
+ "text": "The logo is drawn once and used as it is."
791
+ },
792
+ {
793
+ "id": "files",
794
+ "title": "Brand files",
795
+ "text": "The original SVGs ship in the package under assets/brand/, so you can import them as @orbitcommerce/constellation/assets/brand/<file>.svg. They carry fixed colours (the ring in slate on light, white on dark), so they suit email and print. In product UI, use OrbitLogo: it follows the theme."
796
+ },
797
+ {
798
+ "id": "accessibility",
799
+ "title": "Accessibility",
800
+ "text": ""
801
+ },
802
+ {
803
+ "id": "props",
804
+ "title": "Props",
805
+ "text": ""
806
+ }
807
+ ]
808
+ },
809
+ {
810
+ "path": "/components/input",
811
+ "group": "components",
812
+ "slug": "input",
813
+ "title": "Input and field",
814
+ "category": "inputs",
815
+ "status": "stable",
816
+ "lead": "Input is the single-line text field, for names, prices, SKUs and anything else typed on one line. Field gives a control its label, a hint and an error, and wires them together for screen readers.",
817
+ "importNames": [
818
+ "Input",
819
+ "Field",
820
+ "useFieldControl"
821
+ ],
822
+ "sections": [
823
+ {
824
+ "id": "playground",
825
+ "title": "Playground",
826
+ "text": "Change the props, then click into the field to see the teal focus edge and its halo."
827
+ },
828
+ {
829
+ "id": "field",
830
+ "title": "With a field",
831
+ "text": "Put one control inside a Field to give it a label above and a hint below. The label points at the control, so clicking it focuses the field, and the hint becomes the control's description. Every field needs a label; an Input on its own needs an aria-label."
832
+ },
833
+ {
834
+ "id": "sizes",
835
+ "title": "Sizes",
836
+ "text": "sm 30px, md 36px (default) and lg 44px: the same heights as buttons, so a field and its button share a line. Text is 13, 14 and 15px; icons are 15, 16 and 18px."
837
+ },
838
+ {
839
+ "id": "adornments",
840
+ "title": "Icon, prefix and suffix",
841
+ "text": "icon leads, muted until the field has focus. prefix is text set tight against the value, so a price reads £18.00, never £ 18.00. suffix trails: a unit, a status or a small button. Clicking the icon, the prefix or the padding focuses the input; a button in the suffix keeps its own click."
842
+ },
843
+ {
844
+ "id": "states",
845
+ "title": "States",
846
+ "text": "Hover firms the hairline. Focus turns it teal and grows a soft 3px halo: click into any field to see it. An error swaps the teal for red. Read-only and disabled fields sink into the well."
847
+ },
848
+ {
849
+ "id": "errors",
850
+ "title": "Hints and errors",
851
+ "text": "A hint says what to enter or how it will be used. An error says what is wrong and how to fix it: it replaces the hint, turns the edge red, sets aria-invalid on the control and settles 3px down into place. Check when the form is sent, not on every keystroke, and clear the error as soon as the person starts fixing it. Press Send invite to try it."
852
+ },
853
+ {
854
+ "id": "required",
855
+ "title": "Required and optional",
856
+ "text": "Field has no required prop and draws no asterisk. Pass required to the control: it reaches the native input, so screen readers announce the field as required. Most fields in a form should be required, so mark the few that are not by ending their label with \"(optional)\"."
857
+ },
858
+ {
859
+ "id": "form",
860
+ "title": "In a form",
861
+ "text": "Pricing and inventory for a product. Fields sit two to a row on wide screens and stack on phones. Press Save product while the SKU is empty: every problem shows at once and focus moves to the first one, so a screen reader reads its error straight away."
862
+ },
863
+ {
864
+ "id": "custom-controls",
865
+ "title": "Custom controls",
866
+ "text": "Field works with any single control. Input and SearchField pick up its wiring on their own; for anything else, call useFieldControl() inside the control and put the id, description and invalid state on the element that takes focus. For a real multi-line field use Textarea, which does this for you. Here a plain textarea, styled for this page, shows the wiring by hand. Type past 160 characters to see the error arrive."
867
+ },
868
+ {
869
+ "id": "both-themes",
870
+ "title": "In both themes",
871
+ "text": "A filled field with a prefix, an error and a disabled field, light and dark side by side."
872
+ },
873
+ {
874
+ "id": "guidelines",
875
+ "title": "Guidelines",
876
+ "text": ""
877
+ },
878
+ {
879
+ "id": "accessibility",
880
+ "title": "Accessibility",
881
+ "text": ""
882
+ },
883
+ {
884
+ "id": "props",
885
+ "title": "Props",
886
+ "text": ""
887
+ }
888
+ ]
889
+ },
890
+ {
891
+ "path": "/components/textarea",
892
+ "group": "components",
893
+ "slug": "textarea",
894
+ "title": "Textarea",
895
+ "category": "inputs",
896
+ "status": "new",
897
+ "lead": "A multi-line text field, for notes, messages and descriptions: anything longer than a line. It is the Input's frame, and it can grow with its text and count characters against a limit.",
898
+ "importNames": [
899
+ "Textarea"
900
+ ],
901
+ "sections": [
902
+ {
903
+ "id": "playground",
904
+ "title": "Playground",
905
+ "text": "Change the props, then type a few lines. With autoGrow on, the field grows to eight rows and then scrolls."
906
+ },
907
+ {
908
+ "id": "field",
909
+ "title": "With a field",
910
+ "text": "Put it in a Field for a label above and a hint below, as with an Input: the label points at the textarea, the hint becomes its description, and an error marks it invalid. Set rows to the length of answer you expect; three is the default."
911
+ },
912
+ {
913
+ "id": "sizes",
914
+ "title": "Sizes",
915
+ "text": "sm, md (default) and lg take the Input's 13, 14 and 15px text. Lines run on a fixed rhythm, so one row is exactly as tall as an Input of the same size (30, 36 or 44px). A one-row field that grows sits on a line with its button, and stays lined up with it until the text wraps."
916
+ },
917
+ {
918
+ "id": "auto-grow",
919
+ "title": "Auto-grow",
920
+ "text": "autoGrow fits the field to its text, from minRows (or rows) up to maxRows, then scrolls. It is measured by a hidden copy of the text set in the same place, so the page never jumps as the field grows, and the resize handle goes. Type a few more lines into this note."
921
+ },
922
+ {
923
+ "id": "count",
924
+ "title": "Character count",
925
+ "text": "showCount puts a count in the frame's bottom corner: the characters typed, out of maxLength when there is one. It stays quiet until the last tenth of the limit, then takes the warning wash; the browser stops typing at the limit itself. A value set in code that runs over turns it red. This description starts 5 short of its 160: delete a few words, or add some."
926
+ },
927
+ {
928
+ "id": "states",
929
+ "title": "States",
930
+ "text": "The Input's states, many lines tall. Hover firms the hairline; focus turns it teal with the soft halo; an error in the Field swaps the teal for red. Read-only and disabled sink into the well: a read-only field can still be selected and copied."
931
+ },
932
+ {
933
+ "id": "both-themes",
934
+ "title": "In both themes",
935
+ "text": "A count in its warning wash, an error and a disabled field, light and dark side by side."
936
+ },
937
+ {
938
+ "id": "guidelines",
939
+ "title": "Guidelines",
940
+ "text": ""
941
+ },
942
+ {
943
+ "id": "accessibility",
944
+ "title": "Accessibility",
945
+ "text": ""
946
+ },
947
+ {
948
+ "id": "props",
949
+ "title": "Props",
950
+ "text": ""
951
+ }
952
+ ]
953
+ },
954
+ {
955
+ "path": "/components/select",
956
+ "group": "components",
957
+ "slug": "select",
958
+ "title": "Select",
959
+ "category": "inputs",
960
+ "status": "new",
961
+ "lead": "Choose one value from a list that is too long, or too likely to grow, to show all at once: a country, a stock location, a delivery rate. The trigger is an Input frame; the list is the Menu's sheet, growing out of the trigger.",
962
+ "importNames": [
963
+ "Select",
964
+ "SelectTrigger",
965
+ "SelectContent",
966
+ "SelectItem"
967
+ ],
968
+ "sections": [
969
+ {
970
+ "id": "playground",
971
+ "title": "Playground",
972
+ "text": "Change the props, then open the list: try the arrow keys, Enter, and typing the first letters of a row."
973
+ },
974
+ {
975
+ "id": "basics",
976
+ "title": "Basics",
977
+ "text": "The common case needs one tag: pass options and Select renders the trigger and the list. Put it in a Field for a label and a hint, and control it with value and onValueChange. The placeholder shows while nothing is chosen; set value=\"\" to bring it back."
978
+ },
979
+ {
980
+ "id": "sizes",
981
+ "title": "Sizes",
982
+ "text": "sm 30px, md 36px (default) and lg 44px: the Input and Button heights, so a select shares a line with both. The rows in the list follow the size (30, 34 and 40px)."
983
+ },
984
+ {
985
+ "id": "rows",
986
+ "title": "Rows",
987
+ "text": "A row can carry an icon, a quieter description under its label and a hint at the end, such as a price or a stock count. Only the icon and label come up into the trigger once a row is chosen. A disabled row dims and the arrow keys skip it: say why in its hint."
988
+ },
989
+ {
990
+ "id": "groups",
991
+ "title": "Groups and separators",
992
+ "text": "For headings and hairlines, compose the parts: a SelectTrigger, then a SelectContent holding SelectItem s, with SelectGroup, SelectLabel and SelectSeparator between them. Composed by hand, the trigger takes the same props as Select does in the simple form. With options, a group is an entry with a label and its own options, and hairlines are drawn between groups for you."
993
+ },
994
+ {
995
+ "id": "long-lists",
996
+ "title": "Long lists",
997
+ "text": "The list stops at 320px, or where the window runs out, and scrolls. Soft arrows at either end show there is more, and resting the pointer on one scrolls the list. With the list closed or open, typing the first letters of a row jumps to it: try \"sw\" for Sweden."
998
+ },
999
+ {
1000
+ "id": "states",
1001
+ "title": "States",
1002
+ "text": "The trigger is an Input in every state. Hover firms the hairline; keyboard focus, and the whole time the list is open, turn it teal with the soft halo. An error in the Field swaps the teal for red. Disabled sinks into the well. A long value is cut short with an ellipsis rather than pushing the chevron out."
1003
+ },
1004
+ {
1005
+ "id": "in-a-dialog",
1006
+ "title": "In a dialog",
1007
+ "text": "The list is portalled and sits above dialogs and sheets, so it opens over the dialog's edge rather than being cut off by it, and Escape closes the list before the dialog. Press Transfer without choosing where the stock is going to see the error."
1008
+ },
1009
+ {
1010
+ "id": "both-themes",
1011
+ "title": "In both themes",
1012
+ "text": "Held open for review: delivery rates with descriptions and prices, and a grouped list long enough to scroll, light above dark. The sheet is the canvas colour in light and lifts to graphite in dark, as the Menu does."
1013
+ },
1014
+ {
1015
+ "id": "guidelines",
1016
+ "title": "Guidelines",
1017
+ "text": ""
1018
+ },
1019
+ {
1020
+ "id": "accessibility",
1021
+ "title": "Accessibility",
1022
+ "text": ""
1023
+ },
1024
+ {
1025
+ "id": "props",
1026
+ "title": "Props",
1027
+ "text": ""
1028
+ }
1029
+ ]
1030
+ },
1031
+ {
1032
+ "path": "/components/search-field",
1033
+ "group": "components",
1034
+ "slug": "search-field",
1035
+ "title": "Search field",
1036
+ "category": "inputs",
1037
+ "status": "stable",
1038
+ "lead": "A pill-shaped search input that filters what is already on screen: a list of orders, a product picker, a menu of options. To search the whole of Orbit, people use the command palette instead.",
1039
+ "importNames": [
1040
+ "SearchField"
1041
+ ],
1042
+ "sections": [
1043
+ {
1044
+ "id": "playground",
1045
+ "title": "Playground",
1046
+ "text": "Change the props, then type into the pill: the keycaps fade and a clear button pops in where they were."
1047
+ },
1048
+ {
1049
+ "id": "filtering",
1050
+ "title": "Filtering a list",
1051
+ "text": "Control the query with value and onValueChange, and filter as people type. Say how many results match, and when nothing does, repeat the query and offer a way back. The shortcut caps are only a hint, shown while the field is empty and idle. Bind the key yourself: this example binds /, so press it anywhere on the page."
1052
+ },
1053
+ {
1054
+ "id": "clearing",
1055
+ "title": "Clearing",
1056
+ "text": "Once there is a query, a round clear button pops in where the keycaps were. Pressing it empties the field, calls onValueChange('') and then onClear, and puts focus back in the field. Escape does the same from the keyboard, and it clears before anything else hears it. Inside a dialog or popover, the first Escape clears the search and only the next one closes the dialog. Open the dialog, type and press Escape twice."
1057
+ },
1058
+ {
1059
+ "id": "keyboard",
1060
+ "title": "Keyboard",
1061
+ "text": ""
1062
+ },
1063
+ {
1064
+ "id": "sizes",
1065
+ "title": "Sizes",
1066
+ "text": "md 36px (default) and sm 30px, the same heights as buttons, so a search sits in a toolbar row with them. There is no large search."
1067
+ },
1068
+ {
1069
+ "id": "in-a-field",
1070
+ "title": "With a label",
1071
+ "text": "Most searches are named by what sits around them, so an aria-label is enough. When a visible label helps, as in a filter panel, put the search in a Field: it picks up the label and the hint."
1072
+ },
1073
+ {
1074
+ "id": "ground",
1075
+ "title": "On the ground",
1076
+ "text": "On the app's ground, as in a side panel, the pill still stands off the surface, and so does its focus halo."
1077
+ },
1078
+ {
1079
+ "id": "command-palette",
1080
+ "title": "Search field or command palette?",
1081
+ "text": "They look alike on purpose, and they do different jobs. The header's SearchTrigger is a button that opens the command palette; SearchField is a real input that filters in place."
1082
+ },
1083
+ {
1084
+ "id": "loading",
1085
+ "title": "While results load",
1086
+ "text": "SearchField has no loading state. When results come from the server, show the wait where the results will appear, with skeleton rows or a spinner in the list, and keep the field free to type in."
1087
+ },
1088
+ {
1089
+ "id": "both-themes",
1090
+ "title": "In both themes",
1091
+ "text": "Empty with a shortcut, with a query, small and disabled, light and dark side by side."
1092
+ },
1093
+ {
1094
+ "id": "guidelines",
1095
+ "title": "Guidelines",
1096
+ "text": ""
1097
+ },
1098
+ {
1099
+ "id": "accessibility",
1100
+ "title": "Accessibility",
1101
+ "text": ""
1102
+ },
1103
+ {
1104
+ "id": "props",
1105
+ "title": "Props",
1106
+ "text": "Other native input attributes, and the ref, go to the input. className and style go to the pill."
1107
+ }
1108
+ ]
1109
+ },
1110
+ {
1111
+ "path": "/components/checkbox",
1112
+ "group": "components",
1113
+ "slug": "checkbox",
1114
+ "title": "Checkbox",
1115
+ "category": "inputs",
1116
+ "status": "new",
1117
+ "lead": "A box to tick: one of several independent choices, a row to act on in a table, or a setting that applies when the form is saved. A real checkbox underneath, with a tick that draws itself in.",
1118
+ "importNames": [
1119
+ "Checkbox"
1120
+ ],
1121
+ "sections": [
1122
+ {
1123
+ "id": "playground",
1124
+ "title": "Playground",
1125
+ "text": ""
1126
+ },
1127
+ {
1128
+ "id": "states",
1129
+ "title": "States",
1130
+ "text": "Unticked, ticked and part-ticked (checked=\"indeterminate\", for a parent whose children are mixed). Hover firms the edge; pressing sinks the box a little."
1131
+ },
1132
+ {
1133
+ "id": "description",
1134
+ "title": "With a description",
1135
+ "text": "A quieter second line explains the consequence. It is linked to the box for screen readers."
1136
+ },
1137
+ {
1138
+ "id": "select-all",
1139
+ "title": "Select all",
1140
+ "text": "A parent box over a group shows part-ticked while its children are mixed. Ticking it ticks them all; unticking clears them."
1141
+ },
1142
+ {
1143
+ "id": "in-a-table",
1144
+ "title": "In a table",
1145
+ "text": "Without a label, give the box an aria-label that names the row (\"Select order #1043\"). See Table for row selection."
1146
+ },
1147
+ {
1148
+ "id": "both-themes",
1149
+ "title": "In both themes",
1150
+ "text": ""
1151
+ },
1152
+ {
1153
+ "id": "guidelines",
1154
+ "title": "Guidelines",
1155
+ "text": ""
1156
+ },
1157
+ {
1158
+ "id": "accessibility",
1159
+ "title": "Accessibility",
1160
+ "text": ""
1161
+ },
1162
+ {
1163
+ "id": "props",
1164
+ "title": "Props",
1165
+ "text": "Also accepts every native input attribute (name, value, required, aria-label)."
1166
+ }
1167
+ ]
1168
+ },
1169
+ {
1170
+ "path": "/components/radio-group",
1171
+ "group": "components",
1172
+ "slug": "radio-group",
1173
+ "title": "Radio group",
1174
+ "category": "inputs",
1175
+ "status": "new",
1176
+ "lead": "One choice out of a few, with every option in view: what happens when stock runs out, how long customers have to return an item. Options are rows beside their labels, or cards for settings that choose between richer options.",
1177
+ "importNames": [
1178
+ "RadioGroup",
1179
+ "RadioGroupItem"
1180
+ ],
1181
+ "sections": [
1182
+ {
1183
+ "id": "playground",
1184
+ "title": "Playground",
1185
+ "text": "Change the props, then choose with the pointer, or Tab in and use the arrow keys. The code shows the group's own props; inside it are three RadioGroupItem s, each with a label and, when switched on, a description and a hint."
1186
+ },
1187
+ {
1188
+ "id": "basics",
1189
+ "title": "Basics",
1190
+ "text": "A RadioGroup holds a RadioGroupItem per option, each with a value and a label. A description under the label explains what the choice does. Put the group in a Field to name it, and control it with value and onValueChange."
1191
+ },
1192
+ {
1193
+ "id": "cards",
1194
+ "title": "Cards",
1195
+ "text": "variant=\"card\" turns each option into a tile, for settings that choose between richer options. The whole tile is the radio: clicking anywhere on it chooses, its edge takes the teal when chosen, and the focus ring goes round the tile. A label can carry a small Badge, as here."
1196
+ },
1197
+ {
1198
+ "id": "hints",
1199
+ "title": "Hints",
1200
+ "text": "A hint sits at the end of the option: a price, a fee, \"Free\". In a list the row then spans the group, so the hints line up; on a card it is set firmer, in ink."
1201
+ },
1202
+ {
1203
+ "id": "orientation",
1204
+ "title": "Horizontal",
1205
+ "text": "orientation=\"horizontal\" sets short options in a row that wraps when it runs out of room. Cards in a row share the width equally, and fall into a column on a phone. The arrow keys move between options whichever way they run."
1206
+ },
1207
+ {
1208
+ "id": "errors",
1209
+ "title": "In a field, with an error",
1210
+ "text": "Inside a Field, the group is named by the Field's label and described by its hint or error. An error rings the radios in red and sets aria-invalid on the group. Start with nothing chosen only when there is no safe default, and check on save. Press Save to see the error, then choose a window to clear it."
1211
+ },
1212
+ {
1213
+ "id": "states",
1214
+ "title": "States",
1215
+ "text": "Unchosen and chosen, an option that is off (disabled on the item, with the reason in its description), a whole group that is off, and an invalid group. Hover firms the ring; pressing sinks the radio a little; the dot drops in on the pop spring."
1216
+ },
1217
+ {
1218
+ "id": "own-labels",
1219
+ "title": "Your own labels",
1220
+ "text": "Without a label, an item is just the radio, for a layout of your own: give it an id and point a <label htmlFor> at it (or give it an aria-label). Here the last option shows a field of its own once it is chosen."
1221
+ },
1222
+ {
1223
+ "id": "sizes",
1224
+ "title": "Sizes",
1225
+ "text": "md radios are 16px (default) and sm 14px, the Checkbox sizes; the hit area is at least 24px either way. Small cards also tighten their padding."
1226
+ },
1227
+ {
1228
+ "id": "both-themes",
1229
+ "title": "In both themes",
1230
+ "text": "A list with a chosen option and one that is off, and cards with a chosen tile, light and dark side by side."
1231
+ },
1232
+ {
1233
+ "id": "guidelines",
1234
+ "title": "Guidelines",
1235
+ "text": ""
1236
+ },
1237
+ {
1238
+ "id": "accessibility",
1239
+ "title": "Accessibility",
1240
+ "text": ""
1241
+ },
1242
+ {
1243
+ "id": "props",
1244
+ "title": "Props",
1245
+ "text": ""
1246
+ }
1247
+ ]
1248
+ },
1249
+ {
1250
+ "path": "/components/switch",
1251
+ "group": "components",
1252
+ "slug": "switch",
1253
+ "title": "Switch",
1254
+ "category": "inputs",
1255
+ "status": "stable",
1256
+ "lead": "An on or off setting that takes effect the moment it is flipped, such as holiday mode or a notification email. When a choice only counts once a form is sent, it is a checkbox's job instead.",
1257
+ "importNames": [
1258
+ "Switch"
1259
+ ],
1260
+ "sections": [
1261
+ {
1262
+ "id": "playground",
1263
+ "title": "Playground",
1264
+ "text": "Change the props, then flip the switch. Press and hold it to feel the thumb stretch."
1265
+ },
1266
+ {
1267
+ "id": "states",
1268
+ "title": "States",
1269
+ "text": "Off is ink at 15%; on is Orbit teal. Disabled drops to 45% and cannot be focused. Every state at both sizes:"
1270
+ },
1271
+ {
1272
+ "id": "both-themes",
1273
+ "title": "In both themes",
1274
+ "text": "On, off and disabled with labels, light and dark side by side. In dark, on turns mint."
1275
+ },
1276
+ {
1277
+ "id": "sizes",
1278
+ "title": "Sizes",
1279
+ "text": "md is 36 by 20px with 14px label text (default). sm is 30 by 17px with 13px text, for dense panels and settings inside cards."
1280
+ },
1281
+ {
1282
+ "id": "label-and-description",
1283
+ "title": "Label and description",
1284
+ "text": "label puts text to the right of the switch: it names the switch, and clicking it flips the switch too. There is no description prop, so write the description under it and link it with aria-describedby: native props go to the switch itself. Indent it by the switch's width and gap (46px, or 38px small) so it lines up with the label."
1285
+ },
1286
+ {
1287
+ "id": "settings-list",
1288
+ "title": "In a settings list",
1289
+ "text": "A list of switches under one heading, split by hairlines. Nothing waits for a Save button: each change is saved as it is made, and a quiet line says so."
1290
+ },
1291
+ {
1292
+ "id": "controlled",
1293
+ "title": "Controlled",
1294
+ "text": "Pass checked and onCheckedChange when the page needs to react to the switch, or when the value comes from the server."
1295
+ },
1296
+ {
1297
+ "id": "switch-or-checkbox",
1298
+ "title": "Switch or checkbox?",
1299
+ "text": "A switch is a setting that is on or off right now. A checkbox is an answer that counts when a form is sent. If there is a Save or Submit button, the choices above it are checkboxes."
1300
+ },
1301
+ {
1302
+ "id": "motion",
1303
+ "title": "Motion",
1304
+ "text": "The thumb slides on the settle spring in 320ms. While it is pressed it takes the weight and stretches 4px towards the side it is about to go to (3px small). Under reduced motion it moves at once and only the colour fades."
1305
+ },
1306
+ {
1307
+ "id": "guidelines",
1308
+ "title": "Guidelines",
1309
+ "text": ""
1310
+ },
1311
+ {
1312
+ "id": "accessibility",
1313
+ "title": "Accessibility",
1314
+ "text": ""
1315
+ },
1316
+ {
1317
+ "id": "props",
1318
+ "title": "Props",
1319
+ "text": "Other native button attributes, and the ref, go to the switch. className goes to the outer element: the label row when there is a label."
1320
+ }
1321
+ ]
1322
+ },
1323
+ {
1324
+ "path": "/components/segmented-control",
1325
+ "group": "components",
1326
+ "slug": "segmented-control",
1327
+ "title": "Segmented control",
1328
+ "category": "inputs",
1329
+ "status": "stable",
1330
+ "lead": "A pill track for choosing one of a few views: the date range of a chart, a grid or a list, a device to preview on. The chosen option rides a raised thumb that glides between them.",
1331
+ "importNames": [
1332
+ "SegmentedControl"
1333
+ ],
1334
+ "sections": [
1335
+ {
1336
+ "id": "playground",
1337
+ "title": "Playground",
1338
+ "text": "Change the props, then click between the options to watch the thumb glide."
1339
+ },
1340
+ {
1341
+ "id": "controlled",
1342
+ "title": "A date range for a chart",
1343
+ "text": "The most common job: pick the period, and the figure and chart change in place. Control it with value and onValueChange. Typed options keep the value typed too."
1344
+ },
1345
+ {
1346
+ "id": "sizes",
1347
+ "title": "Sizes",
1348
+ "text": "md is 36px tall (default) and sm 30px, the same heights as buttons. Labels are 13px and 12px; icons 15px and 13px."
1349
+ },
1350
+ {
1351
+ "id": "full-width",
1352
+ "title": "Full width",
1353
+ "text": "fullWidth stretches the track and shares it equally between the options. Use it in dialogs, popovers and narrow panels, where the control is the width of the fields around it. The control has no visible label of its own and cannot sit in a Field. For a visible label, write it above and point aria-labelledby at it, in place of aria-label. A hint below can be linked with aria-describedby."
1354
+ },
1355
+ {
1356
+ "id": "icons",
1357
+ "title": "With icons",
1358
+ "text": "A leading icon on each option, for views that have a well-known picture."
1359
+ },
1360
+ {
1361
+ "id": "disabled",
1362
+ "title": "Disabled",
1363
+ "text": "An option with disabled: true drops to 45%, cannot be chosen and is skipped by the arrow keys. Say nearby why it is off. disabled on the control turns off every option."
1364
+ },
1365
+ {
1366
+ "id": "keyboard",
1367
+ "title": "Keyboard",
1368
+ "text": "It behaves as a radio group: one Tab stop, and the arrows move the choice."
1369
+ },
1370
+ {
1371
+ "id": "motion",
1372
+ "title": "The gliding thumb",
1373
+ "text": "There is one thumb, and it moves: a raised pill (white in light, a step lighter than the track in dark) that glides to the new choice on the snappy spring. The chosen label turns semibold without changing width, because an invisible semibold copy of the text holds the space. Under reduced motion the thumb jumps straight to the new option, and only the text colour fades. Click along the options, or use the arrow keys."
1374
+ },
1375
+ {
1376
+ "id": "both-themes",
1377
+ "title": "In both themes",
1378
+ "text": "Text, icons and icon only, light and dark side by side. In dark the thumb is a lighter step of the track."
1379
+ },
1380
+ {
1381
+ "id": "guidelines",
1382
+ "title": "Guidelines",
1383
+ "text": ""
1384
+ },
1385
+ {
1386
+ "id": "accessibility",
1387
+ "title": "Accessibility",
1388
+ "text": ""
1389
+ },
1390
+ {
1391
+ "id": "props",
1392
+ "title": "Props",
1393
+ "text": "Other attributes, such as aria-describedby, go to the group."
1394
+ }
1395
+ ]
1396
+ },
1397
+ {
1398
+ "path": "/components/date-picker",
1399
+ "group": "components",
1400
+ "slug": "date-picker",
1401
+ "title": "Date picker",
1402
+ "category": "inputs",
1403
+ "status": "new",
1404
+ "lead": "A field that opens a calendar: one day (and a time, if it matters) with DatePicker, or a first and last day with DateRangePicker. It looks and sizes exactly like Input, so dates sit in forms beside everything else.",
1405
+ "importNames": [
1406
+ "DatePicker",
1407
+ "DateRangePicker",
1408
+ "toISODate",
1409
+ "fromISODate"
1410
+ ],
1411
+ "sections": [
1412
+ {
1413
+ "id": "playground",
1414
+ "title": "Playground",
1415
+ "text": "Change the props, then open the calendar with a click, or with Enter or Space once the field has focus. A day pick closes it; with granularity=\"minute\" it stays open for the time."
1416
+ },
1417
+ {
1418
+ "id": "picking-a-day",
1419
+ "title": "Picking a day",
1420
+ "text": "Put the picker in a Field for its label, hint and error, as with any input. Here a delivery can be booked from tomorrow, on any day but Sunday: minValue rules out the past (and the months before it cannot even be reached), and disabledDays rules out Sundays. format adds the weekday to the field, because for a delivery the day of the week matters. Press Book delivery with no date to see the error, and focus come back to the field."
1421
+ },
1422
+ {
1423
+ "id": "sizes",
1424
+ "title": "Sizes",
1425
+ "text": "sm 30px, md 36px (default) and lg 44px: the heights of Input and Button, so a date, a text field and a button share a line exactly."
1426
+ },
1427
+ {
1428
+ "id": "states",
1429
+ "title": "States",
1430
+ "text": "Hover firms the edge; focus turns it teal with a soft halo (Tab into a field to see it). An error swaps the teal for red. Read-only shows the date in the well and will not open; disabled dims it and Tab skips it."
1431
+ },
1432
+ {
1433
+ "id": "clearing",
1434
+ "title": "Clearing",
1435
+ "text": "An optional date needs a way back to none. clearable adds a round clear button at the end of the field once there is a date, and Backspace or Delete on the field clears it too. The button stays out of the Tab order, as the search field's does. A required date leaves it off."
1436
+ },
1437
+ {
1438
+ "id": "time",
1439
+ "title": "Date and time",
1440
+ "text": "granularity=\"minute\" adds a time row under the calendar: hours and minutes on a 24-hour clock, as UK shops expect. Picking a day keeps the calendar open so the time can follow. Click into the hours and type \"9\": it can only mean 09, so focus moves on to the minutes. The arrow keys step either part, and Enter closes. Picking a new day always keeps the time the value had, even without a time row, so moving a 16:30 deadline to Friday leaves it at 16:30. With a time, minValue and maxValue hold to the minute."
1441
+ },
1442
+ {
1443
+ "id": "start-and-end",
1444
+ "title": "A start and an end",
1445
+ "text": "When the two ends each have a time, or the end is optional, as with a discount, use two pickers and let the start bound the end: minValue={starts} on the end keeps it from being picked before the start. Move the start past the end to see the error."
1446
+ },
1447
+ {
1448
+ "id": "ranges",
1449
+ "title": "Date ranges",
1450
+ "text": "DateRangePicker picks a run of whole days: the first click starts the range, the second ends it and closes the calendar. While the end is being picked, a fainter wash follows the pointer (or focus) to a teal ring. Picking an earlier day second simply swaps the ends. Two months sit side by side on screens 768px and wider, one below. The value is { from, to }, both local midnight and both included, and the field reads 2 Oct 2026 to 9 Oct 2026."
1451
+ },
1452
+ {
1453
+ "id": "presets",
1454
+ "title": "Presets",
1455
+ "text": "presets adds a column of ready-made ranges on the left, as reports need: Today, Last 7 days, Last 30 days, This month and Last month. Picking one applies it at once. When the range matches a preset, the field names it (\"Last 30 days\") and the preset carries a teal check; any other range shows its dates. onChange gets the preset's id as a second argument, so a report can keep \"Last 30 days\" rolling forward day by day rather than freezing the dates. On phones the presets become a row of chips above one month."
1456
+ },
1457
+ {
1458
+ "id": "limits",
1459
+ "title": "Limits and unavailable days",
1460
+ "text": "Both pickers take the same limits. Unavailable days stay visible, in mist, so the month keeps its shape, and cannot be picked or focused. The Calendar page lists every way to describe them."
1461
+ },
1462
+ {
1463
+ "id": "keyboard",
1464
+ "title": "Keyboard",
1465
+ "text": "Everything works from the keyboard: open, move, pick and close, and focus always lands somewhere useful."
1466
+ },
1467
+ {
1468
+ "id": "native",
1469
+ "title": "Replacing a native date field",
1470
+ "text": "The pickers take and give a Date. A native <input type=\"date\"> holds a string, YYYY-MM-DD, and new Date() reads that as midnight UTC, which is still the day before anywhere west of Greenwich. Convert at the edge with the helpers, which read and write the local day and never shift it. Pick a day, then clear it, and watch the stored string."
1471
+ },
1472
+ {
1473
+ "id": "both-themes",
1474
+ "title": "In both themes",
1475
+ "text": "Held open for review, light beside dark: the field keeps its teal edge while the calendar is open, and the sheet is white in light and graphite in dark. The pickers on the rest of this page are live."
1476
+ },
1477
+ {
1478
+ "id": "guidelines",
1479
+ "title": "Guidelines",
1480
+ "text": ""
1481
+ },
1482
+ {
1483
+ "id": "accessibility",
1484
+ "title": "Accessibility",
1485
+ "text": ""
1486
+ },
1487
+ {
1488
+ "id": "props",
1489
+ "title": "Props",
1490
+ "text": "Both pickers forward every other button attribute, and the ref, to the field's button. className and style go to the well around it."
1491
+ }
1492
+ ]
1493
+ },
1494
+ {
1495
+ "path": "/components/calendar",
1496
+ "group": "components",
1497
+ "slug": "calendar",
1498
+ "title": "Calendar",
1499
+ "category": "inputs",
1500
+ "status": "new",
1501
+ "lead": "A month of days to pick from, inline on the page: one day, or a first and a last. It is the calendar inside DatePicker and DateRangePicker, for when the date is the main thing on screen rather than one field in a form.",
1502
+ "importNames": [
1503
+ "Calendar"
1504
+ ],
1505
+ "sections": [
1506
+ {
1507
+ "id": "basics",
1508
+ "title": "Picking a day",
1509
+ "text": "Each day is a pill that tints on hover. Today carries a teal satellite under its numeral, and the chosen day fills with Orbit teal, the disc settling into place. Days that cannot be picked fade to mist. Weeks start on Monday, and month and day names come from Intl in British English. Here a customer picks a collection day: from tomorrow, never on a Sunday. required keeps the chosen day when it is pressed again, rather than clearing it."
1510
+ },
1511
+ {
1512
+ "id": "states",
1513
+ "title": "Days and their states",
1514
+ "text": "Every state a day can be in, light and dark side by side. Hover and focus are live: point at a day, or Tab into the grid and use the arrows."
1515
+ },
1516
+ {
1517
+ "id": "ranges",
1518
+ "title": "Ranges",
1519
+ "text": "mode=\"range\" picks a first and a last day. The first click starts the range and onChange gets { from }; the second completes it as { from, to }, swapping the ends if the second day is earlier; the next click starts again. Both ends are local midnight, and both are included. numberOfMonths sets months side by side. With more than one, the days of other months are left out, so no day appears twice. Here, the shop's Christmas closure."
1520
+ },
1521
+ {
1522
+ "id": "unavailable",
1523
+ "title": "Unavailable days",
1524
+ "text": "minValue and maxValue rule out everything outside them, and the months beyond cannot be reached. disabled rules out any other days, and takes one matcher or a list of them. Here, dispatch on a weekday in the next 60 days that is not a bank holiday in England and Wales."
1525
+ },
1526
+ {
1527
+ "id": "locale",
1528
+ "title": "Language and the start of the week",
1529
+ "text": "locale takes a BCP 47 tag. Month and weekday names come from Intl, and so does the first day of the week: Monday in British English, Sunday in American English. weekStartsOn overrides it, 0 being Sunday. What the calendar reads out (Previous month, Next month, Today, selected) is English by default: pass translations through labels."
1530
+ },
1531
+ {
1532
+ "id": "keyboard",
1533
+ "title": "Keyboard",
1534
+ "text": "The grid is one Tab stop: focus lands on the chosen day, or today, or the first day that can be picked."
1535
+ },
1536
+ {
1537
+ "id": "guidelines",
1538
+ "title": "Guidelines",
1539
+ "text": ""
1540
+ },
1541
+ {
1542
+ "id": "accessibility",
1543
+ "title": "Accessibility",
1544
+ "text": ""
1545
+ },
1546
+ {
1547
+ "id": "props",
1548
+ "title": "Props",
1549
+ "text": "Built on react-day-picker 9, styled entirely by the kit (react-day-picker's own stylesheet is not used). Pass className, style, id and dir for the root, and the ref reaches it too."
1550
+ }
1551
+ ]
1552
+ },
1553
+ {
1554
+ "path": "/components/tabs",
1555
+ "group": "components",
1556
+ "slug": "tabs",
1557
+ "title": "Tabs",
1558
+ "category": "inputs",
1559
+ "status": "new",
1560
+ "lead": "Tabs split one view into a few sections the merchant moves between without leaving the page: a product's General, Variants and Inventory. A teal line marks the chosen tab and glides to the next one.",
1561
+ "importNames": [
1562
+ "Tabs",
1563
+ "TabsList",
1564
+ "TabsTrigger",
1565
+ "TabsContent"
1566
+ ],
1567
+ "sections": [
1568
+ {
1569
+ "id": "playground",
1570
+ "title": "Playground",
1571
+ "text": "Change the props, then click along the tabs or use the arrow keys."
1572
+ },
1573
+ {
1574
+ "id": "line",
1575
+ "title": "Line: sections of a page",
1576
+ "text": "The default. Tabs sit on a hairline that runs the full width; the chosen one is ink at 600 with a 2px teal line under it, and one hover pill follows the pointer along the row. Each tab owns a TabsContent panel with the same value. Space the panel from the list yourself."
1577
+ },
1578
+ {
1579
+ "id": "pill",
1580
+ "title": "Pill: a switch inside a card or a dialog",
1581
+ "text": "variant=\"pill\" is the segmented control's track and gliding thumb, drawn from the same classes and tokens, so the two always match. Use it where a hairline would be lost: in a card header, in a dialog, beside a title. Here the tabs live in the card's header and the panels below it."
1582
+ },
1583
+ {
1584
+ "id": "steps",
1585
+ "title": "Steps: the stages of a task",
1586
+ "text": "variant=\"steps\" numbers its tabs and gives each a status: a grey ring while not-started, half drawn in teal while in-progress, and filled teal with a check once completed. The path to the next step turns teal when a step is done, and the chosen step wears the soft halo of a focused field. Disable the steps that cannot be reached yet: they stay readable, only quieter. Work through the steps below with Next, then go back to an earlier one."
1587
+ },
1588
+ {
1589
+ "id": "sizes",
1590
+ "title": "Sizes",
1591
+ "text": "sm 30px, md 36px (default) and lg 44px: the same heights as buttons and fields. Line labels are 13, 14 and 15px; pill labels follow the segmented control at 12, 13 and 14px. Reach for lg when the tabs head a whole page."
1592
+ },
1593
+ {
1594
+ "id": "icons-and-counts",
1595
+ "title": "Icons and counts",
1596
+ "text": "icon leads the label; on a chosen line tab it turns teal, and activeIcon can swap in the duotone weight, as the sidebar does. count trails the label as a small badge that takes the teal tint on the chosen tab and bumps when the number changes."
1597
+ },
1598
+ {
1599
+ "id": "disabled",
1600
+ "title": "Disabled",
1601
+ "text": "A disabled tab drops to 45%, cannot be chosen and is skipped by the arrow keys. Say nearby why it is off."
1602
+ },
1603
+ {
1604
+ "id": "narrow",
1605
+ "title": "On narrow screens",
1606
+ "text": "A row wider than its container never wraps. It scrolls sideways, fades at whichever end has more to show, and scrolls the chosen tab into view, here Returns, the sixth of eight. Only the row scrolls, never the page."
1607
+ },
1608
+ {
1609
+ "id": "empty",
1610
+ "title": "An empty tab",
1611
+ "text": "A tab with nothing in it yet still opens. Show a count of 0 so the merchant knows before they look, and put a small Empty state in its panel."
1612
+ },
1613
+ {
1614
+ "id": "keyboard",
1615
+ "title": "Keyboard",
1616
+ "text": "Radix Tabs underneath: one Tab stop for the row, and the arrows move between tabs."
1617
+ },
1618
+ {
1619
+ "id": "motion",
1620
+ "title": "Motion",
1621
+ "text": "There is one teal line and one hover pill per row, and they move: the line glides to the chosen tab on the snappy spring, and the pill follows the pointer from tab to tab, so the eye follows a single shape instead of a run of flashes. The chosen label turns semibold without changing width. The new panel fades in, rising 4px. Under reduced motion the line, the pill and the pill tabs' thumb jump straight to their place, and panels fade without rising."
1622
+ },
1623
+ {
1624
+ "id": "both-themes",
1625
+ "title": "In both themes",
1626
+ "text": "Line, pill and steps, light and dark side by side."
1627
+ },
1628
+ {
1629
+ "id": "guidelines",
1630
+ "title": "Guidelines",
1631
+ "text": ""
1632
+ },
1633
+ {
1634
+ "id": "accessibility",
1635
+ "title": "Accessibility",
1636
+ "text": ""
1637
+ },
1638
+ {
1639
+ "id": "props",
1640
+ "title": "Props",
1641
+ "text": "Tabs passes activationMode and dir to Radix. On TabsList, ref and other props go to the tablist; className and style go to the scrolling row around it."
1642
+ }
1643
+ ]
1644
+ },
1645
+ {
1646
+ "path": "/components/menu",
1647
+ "group": "components",
1648
+ "slug": "menu",
1649
+ "title": "Menu",
1650
+ "category": "overlays",
1651
+ "status": "stable",
1652
+ "lead": "A short list of actions or choices that opens from a button. Reach for it when a row, a record or the page has more actions than fit on screen, or for a quick choice such as how a list is sorted.",
1653
+ "importNames": [
1654
+ "Menu",
1655
+ "MenuTrigger",
1656
+ "MenuContent",
1657
+ "MenuItem"
1658
+ ],
1659
+ "sections": [
1660
+ {
1661
+ "id": "basics",
1662
+ "title": "Basics",
1663
+ "text": "A menu is a trigger and a sheet of rows. Wrap a Button or IconButton in MenuTrigger asChild, and give each row an onSelect: it runs the action and closes the menu. The sheet grows out of its trigger on a spring and its rows settle in just behind it. Here, the actions for one order, from the button at the end of its row."
1664
+ },
1665
+ {
1666
+ "id": "both-themes",
1667
+ "title": "In both themes",
1668
+ "text": "Held open for review: the account menu with its Appearance submenu out, and a view menu with radio and checkbox rows, light above dark. The sheet is the canvas colour in light and lifts to graphite in dark, with a faint ring so its edge holds on a dark page."
1669
+ },
1670
+ {
1671
+ "id": "rows",
1672
+ "title": "Rows",
1673
+ "text": "Every action is a MenuItem. Its icon is 16px and stays muted until the row is highlighted. hint is a quiet detail at the end, such as a file format or why a row is off. shortcut draws keycaps that read right on every platform (mod is ⌘ on a Mac and Ctrl elsewhere); it only draws them, so bind the keys in the app."
1674
+ },
1675
+ {
1676
+ "id": "checkbox-items",
1677
+ "title": "Checkbox items",
1678
+ "text": "MenuCheckboxItem is a setting that toggles. The teal check draws itself in along its own path. Choosing a row closes the menu, so when people usually change several at once, keep it open with onSelect={(event) => event.preventDefault()}."
1679
+ },
1680
+ {
1681
+ "id": "radio-groups",
1682
+ "title": "Radio groups",
1683
+ "text": "One choice from a few. MenuRadioGroup holds the value; each MenuRadioItem is one option, and the chosen row carries a teal satellite that drops into its ring. Show the current choice on the trigger, so nobody has to open the menu to find out."
1684
+ },
1685
+ {
1686
+ "id": "structure",
1687
+ "title": "Labels, groups and separators",
1688
+ "text": "MenuLabel is a quiet heading for the rows under it, in sentence case. MenuSeparator is a hairline between groups. MenuGroup ties rows together for assistive tech and has no look of its own. A view menu for the orders list mixes a radio group and checkboxes, and stays open while you change it."
1689
+ },
1690
+ {
1691
+ "id": "submenus",
1692
+ "title": "Submenus",
1693
+ "text": "A MenuSub holds a MenuSubTrigger and a MenuSubContent. The submenu opens on hover, on click, or with the arrow key towards it. It sits 4px clear of the sheet with its first row level with the trigger, and slides 4px out from the side it opens on. Put the current choice in the trigger's hint. Here, the account menu from the header."
1694
+ },
1695
+ {
1696
+ "id": "header",
1697
+ "title": "Header",
1698
+ "text": "MenuHeader is a free-form block at the top of the sheet: who is signed in, or the record the menu acts on. It is not a row, so it cannot be focused and the arrow keys pass over it. Follow it with a separator."
1699
+ },
1700
+ {
1701
+ "id": "width",
1702
+ "title": "Width",
1703
+ "text": "By default the sheet fits its rows, and is never narrower than 220px. Pass width in pixels (or any CSS length) to fix it, or 'trigger' to match the button that opened it, which suits a menu standing in for a select. Long labels truncate with an ellipsis rather than wrap."
1704
+ },
1705
+ {
1706
+ "id": "placement",
1707
+ "title": "Alignment and side",
1708
+ "text": "The sheet opens below its trigger (side=\"bottom\"), 6px away, lined up with the trigger's start edge (align=\"start\"). Use align=\"end\" for triggers at the end of a row or the right of a header. When there is no room it flips to the other side and slides along to stay 8px inside the window."
1709
+ },
1710
+ {
1711
+ "id": "guidelines",
1712
+ "title": "Guidelines",
1713
+ "text": ""
1714
+ },
1715
+ {
1716
+ "id": "accessibility",
1717
+ "title": "Accessibility",
1718
+ "text": ""
1719
+ },
1720
+ {
1721
+ "id": "props",
1722
+ "title": "Props",
1723
+ "text": "Every part also accepts the matching Radix DropdownMenu props."
1724
+ }
1725
+ ]
1726
+ },
1727
+ {
1728
+ "path": "/components/popover",
1729
+ "group": "components",
1730
+ "slug": "popover",
1731
+ "title": "Popover",
1732
+ "category": "overlays",
1733
+ "status": "stable",
1734
+ "lead": "A raised sheet of free-form content anchored to a trigger: a quick edit, a few filters, or the details behind a value. It sits beside what it changes and the page stays live around it.",
1735
+ "importNames": [
1736
+ "Popover",
1737
+ "PopoverTrigger",
1738
+ "PopoverContent",
1739
+ "PopoverClose"
1740
+ ],
1741
+ "sections": [
1742
+ {
1743
+ "id": "basics",
1744
+ "title": "Basics",
1745
+ "text": "Wrap the button in PopoverTrigger asChild and put anything in PopoverContent. It shares the menu's sheet (14px corners, the floating shadow) and its motion: it grows out of its trigger on a spring and leaves faster than it came. Here, adjusting stock from a product row."
1746
+ },
1747
+ {
1748
+ "id": "both-themes",
1749
+ "title": "In both themes",
1750
+ "text": "Held open for review, light beside dark. In light the sheet is white on the floating shadow; in dark it lifts to graphite with a faint ring so its edge holds on a dark page. Fields inside it keep their own wells."
1751
+ },
1752
+ {
1753
+ "id": "padding",
1754
+ "title": "Padding",
1755
+ "text": "The content decides. md (16px, the default) suits forms. sm (12px) suits compact details like a customer card. none is for lists and tables that bring their own padding, so their rows and dividers run edge to edge."
1756
+ },
1757
+ {
1758
+ "id": "width",
1759
+ "title": "Width",
1760
+ "text": "By default the sheet fits its content. Pass width in pixels (or any CSS length) when the content would otherwise jump about as it changes, as a form does. 'trigger' matches the trigger, or the anchor when there is one (see Anchor). On a small screen the sheet never grows wider than the space it has."
1761
+ },
1762
+ {
1763
+ "id": "closing",
1764
+ "title": "Closing",
1765
+ "text": "A popover closes when you click outside it, press Escape, or press its trigger again. Inside, wrap any button that should close it in PopoverClose asChild: a Cancel, a Done, or a close button in the corner. To close it after an action, control open, as the stock example does after saving."
1766
+ },
1767
+ {
1768
+ "id": "anchor",
1769
+ "title": "Anchor",
1770
+ "text": "PopoverAnchor positions the sheet against something other than the trigger. Here the pencil opens it, but it lines up with the whole price row, and width=\"trigger\" makes it as wide as the row."
1771
+ },
1772
+ {
1773
+ "id": "choosing",
1774
+ "title": "Popover, menu or dialog",
1775
+ "text": "Four overlays, four jobs. Pick by what is inside and how much the moment matters."
1776
+ },
1777
+ {
1778
+ "id": "accessibility",
1779
+ "title": "Accessibility",
1780
+ "text": ""
1781
+ },
1782
+ {
1783
+ "id": "props",
1784
+ "title": "Props",
1785
+ "text": "Every part also accepts the matching Radix Popover props."
1786
+ }
1787
+ ]
1788
+ },
1789
+ {
1790
+ "path": "/components/dialog",
1791
+ "group": "components",
1792
+ "slug": "dialog",
1793
+ "title": "Dialog",
1794
+ "category": "overlays",
1795
+ "status": "stable",
1796
+ "lead": "A focused task over a dimmed, softly blurred page. Reach for it when the merchant has to finish or dismiss something before carrying on: a short form, or a question before an action that matters.",
1797
+ "importNames": [
1798
+ "Dialog",
1799
+ "DialogTrigger",
1800
+ "DialogContent",
1801
+ "DialogHeader",
1802
+ "DialogTitle",
1803
+ "ConfirmDialog"
1804
+ ],
1805
+ "sections": [
1806
+ {
1807
+ "id": "basics",
1808
+ "title": "Basics",
1809
+ "text": "A DialogTrigger opens it and a DialogContent holds the sheet: a DialogHeader with the DialogTitle and DialogDescription, a DialogBody, and a DialogFooter of actions with the primary last. A close button sits in the top right. The sheet rises 10px and settles on the spring; it leaves in half the time."
1810
+ },
1811
+ {
1812
+ "id": "both-themes",
1813
+ "title": "In both themes",
1814
+ "text": "Held open for review, light beside dark. The page behind dims to 34% near-black under a 3px blur (62% in dark), and the sheet has the system's widest corners (20px) on the modal shadow. In dark it lifts to graphite with a faint ring."
1815
+ },
1816
+ {
1817
+ "id": "sizes",
1818
+ "title": "Sizes",
1819
+ "text": "Three widths. On a screen narrower than the dialog it keeps 16px clear of each edge, and from 480px down its padding tightens to 20px and the footer stacks full width with the primary on top."
1820
+ },
1821
+ {
1822
+ "id": "long-content",
1823
+ "title": "Long content",
1824
+ "text": "The dialog never grows taller than the window less 48px. When its content would, only the DialogBody scrolls: the title and the actions stay in view. The body runs to the sheet's edges, so its scrollbar sits at the edge and focus rings inside it are never clipped."
1825
+ },
1826
+ {
1827
+ "id": "without-close",
1828
+ "title": "Without the close button",
1829
+ "text": "hideClose drops the top-right close button when the footer already offers a way out, as a Cancel does. Escape still closes it. closeLabel renames the close button for screen readers, for example in another language."
1830
+ },
1831
+ {
1832
+ "id": "confirm-dialog",
1833
+ "title": "Confirm dialog",
1834
+ "text": "ConfirmDialog asks one question before an action that matters. Give it the question as the title, what will happen as the description, and the verb as the confirmLabel. It is an alertdialog: a click outside never closes it."
1835
+ },
1836
+ {
1837
+ "id": "focus",
1838
+ "title": "Focus and Escape",
1839
+ "text": "What happens to focus, the keyboard and the page behind, from opening to closing."
1840
+ },
1841
+ {
1842
+ "id": "guidelines",
1843
+ "title": "Guidelines",
1844
+ "text": ""
1845
+ },
1846
+ {
1847
+ "id": "accessibility",
1848
+ "title": "Accessibility",
1849
+ "text": ""
1850
+ },
1851
+ {
1852
+ "id": "props",
1853
+ "title": "Props",
1854
+ "text": "The parts also accept the matching Radix Dialog props."
1855
+ }
1856
+ ]
1857
+ },
1858
+ {
1859
+ "path": "/components/tooltip",
1860
+ "group": "components",
1861
+ "slug": "tooltip",
1862
+ "title": "Tooltip",
1863
+ "category": "overlays",
1864
+ "status": "stable",
1865
+ "lead": "A short label on an inverse pill that names a control, usually an icon button, and can show its keyboard shortcut. It grows out of its trigger on hover or keyboard focus, and never holds anything you need to read to get on.",
1866
+ "importNames": [
1867
+ "Tooltip",
1868
+ "TooltipProvider"
1869
+ ],
1870
+ "sections": [
1871
+ {
1872
+ "id": "basics",
1873
+ "title": "Basics",
1874
+ "text": "Wrap the control in a Tooltip and give it content. The pill grows out of its trigger in 140ms, drifting 3px away from it, with no arrow: the growth shows where it came from. Hover or tab along the toolbar."
1875
+ },
1876
+ {
1877
+ "id": "both-themes",
1878
+ "title": "In both themes",
1879
+ "text": "Held open for review: real tooltips, one with keycaps and one long enough to wrap. It is an inverse pill: graphite with frost text in light, and pale with ink text in dark, so it stands off either page. One line is an exact pill; wrapped text becomes a softly rounded rectangle."
1880
+ },
1881
+ {
1882
+ "id": "sides",
1883
+ "title": "Sides",
1884
+ "text": "side picks where it prefers to open: top (the default), right, bottom or left. It flips to the other side when there is no room and keeps 8px inside the window. Use right beside a folded sidebar and bottom under a header."
1885
+ },
1886
+ {
1887
+ "id": "shortcuts",
1888
+ "title": "Shortcuts",
1889
+ "text": "shortcut adds keycaps after the text, restyled for the inverse pill. Keys take friendly names that read right on every platform: mod is ⌘ on a Mac and Ctrl elsewhere, and shift, alt, enter, esc and the arrows become their symbols on a Mac. Single letters are capitalised. The caps are only drawn: bind the keys in the app."
1890
+ },
1891
+ {
1892
+ "id": "long-text",
1893
+ "title": "Long text",
1894
+ "text": "A tooltip stops at 260px and wraps, balancing its lines. Keep it to a short phrase; a sentence is the most it should ever hold."
1895
+ },
1896
+ {
1897
+ "id": "delay",
1898
+ "title": "Delay",
1899
+ "text": "A tooltip waits 350ms under a resting pointer before it opens, so sweeping across the page does not set off a trail of them. delayDuration changes the wait for one tooltip; 0 opens it at once. Keyboard focus never waits."
1900
+ },
1901
+ {
1902
+ "id": "provider",
1903
+ "title": "Provider",
1904
+ "text": "TooltipProvider shares timing between the tooltips inside it. Once one has opened, moving to a neighbour within 150ms (skipDelayDuration) opens it straight away with a quick fade instead of the grow, which is what makes a toolbar feel quick. Wrap the app once; these docs do. A tooltip outside any provider brings its own with the same defaults."
1905
+ },
1906
+ {
1907
+ "id": "disabled",
1908
+ "title": "Disabled",
1909
+ "text": "disabled keeps a tooltip closed without unmounting anything, so the trigger keeps focus. Use it while a menu from the same trigger is open, so the label does not sit on top of the menu. A tooltip with empty content never opens either, which suits a label that only sometimes applies."
1910
+ },
1911
+ {
1912
+ "id": "keyboard-and-touch",
1913
+ "title": "Keyboard and touch",
1914
+ "text": "How a tooltip opens and closes beyond the mouse."
1915
+ },
1916
+ {
1917
+ "id": "guidelines",
1918
+ "title": "When not to use one",
1919
+ "text": ""
1920
+ },
1921
+ {
1922
+ "id": "accessibility",
1923
+ "title": "Accessibility",
1924
+ "text": ""
1925
+ },
1926
+ {
1927
+ "id": "props",
1928
+ "title": "Props",
1929
+ "text": ""
1930
+ }
1931
+ ]
1932
+ },
1933
+ {
1934
+ "path": "/components/command-palette",
1935
+ "group": "components",
1936
+ "slug": "command-palette",
1937
+ "title": "Command palette",
1938
+ "category": "overlays",
1939
+ "status": "stable",
1940
+ "lead": "Search and commands in one place. It grows out of the search pill in the header, finds pages, actions and records as the merchant types, and folds back into the pill when they are done.",
1941
+ "importNames": [
1942
+ "CommandPalette",
1943
+ "CommandGroup",
1944
+ "CommandItem",
1945
+ "SearchTrigger"
1946
+ ],
1947
+ "sections": [
1948
+ {
1949
+ "id": "basics",
1950
+ "title": "Basics",
1951
+ "text": "A SearchTrigger in the header opens a CommandPalette. Inside, a CommandGroup holds CommandItem s under a heading. Pages and quick actions are filtered right here as you type; orders, products and customers come from a (simulated) server half a second later, while a comet runs along the field."
1952
+ },
1953
+ {
1954
+ "id": "both-themes",
1955
+ "title": "In both themes",
1956
+ "text": "Held open for review, light above dark: a search for \"whit\" with the first order selected. The panel is 640px wide with 20px corners on the modal shadow. The selected row takes a hover tint, its icon tile turns teal, and a short teal mark on the rim marks it."
1957
+ },
1958
+ {
1959
+ "id": "morph",
1960
+ "title": "Growing out of the pill",
1961
+ "text": "Opened from a SearchTrigger, the palette grows out of it: the pill stretches into the panel as it glides to its place near the top of the window, the pill's words carry over into the field, and the results fade up behind them. The pill leaves the header while the palette is out. On closing, the panel folds back into the pill, a little faster and without a wobble. The words hand straight over when the palette's placeholder matches the pill's, which it does by default. origin grows it out of any other element, such as a round search button in a phone header, and origin={null} always scales it up from the centre. With no visible pill, or with reduced motion, it scales up from the centre or crossfades."
1962
+ },
1963
+ {
1964
+ "id": "search-trigger",
1965
+ "title": "Search trigger",
1966
+ "text": "The pill in the header. It looks like a field but is a button: pressing it opens the palette. It prefers 360px and shrinks with its container, dropping the keycaps first (below 260px) and then its words (below 96px), leaving a round search button. Its words become its accessible name, so it stays named when they are hidden."
1967
+ },
1968
+ {
1969
+ "id": "items",
1970
+ "title": "Items",
1971
+ "text": "A CommandItem is one result. icon sits in a rounded tile that turns teal when the row is selected; pass a Phosphor icon, or initials for a person. hint is quiet text at the end, such as a price or a status, and shortcut shows keycaps exactly as written. keywords are matched without being shown, like an SKU or an email. value must be unique in the palette; it defaults to the item's text."
1972
+ },
1973
+ {
1974
+ "id": "loading-and-empty",
1975
+ "title": "Loading and empty",
1976
+ "text": "While results are on their way, loading sends a comet along the bottom of the field and the list is marked busy. Show a CommandLoading row while there is nothing else to show. Once results have arrived, CommandEmpty appears by itself when nothing matches: an empty orbit, a line saying so and a description of what to try. Render it only when loading is done, or it flashes up before the results."
1977
+ },
1978
+ {
1979
+ "id": "keyboard",
1980
+ "title": "Keyboard",
1981
+ "text": "The palette is built to be driven without the mouse."
1982
+ },
1983
+ {
1984
+ "id": "accessibility",
1985
+ "title": "Accessibility",
1986
+ "text": ""
1987
+ },
1988
+ {
1989
+ "id": "props",
1990
+ "title": "Props",
1991
+ "text": "CommandHints takes no props. Items, groups, empty and loading also accept the matching cmdk props."
1992
+ }
1993
+ ]
1994
+ },
1995
+ {
1996
+ "path": "/components/table",
1997
+ "group": "components",
1998
+ "slug": "table",
1999
+ "title": "Table",
2000
+ "category": "data",
2001
+ "status": "new",
2002
+ "lead": "Rows of records on hairlines: orders, products, customers. Quiet headings that stay put while the rows scroll, a soft hover, and a line of teal on the rows you have chosen.",
2003
+ "importNames": [
2004
+ "TableFrame",
2005
+ "Table",
2006
+ "TableHead",
2007
+ "TableBody",
2008
+ "TableRow",
2009
+ "TableHeaderCell",
2010
+ "TableCell"
2011
+ ],
2012
+ "sections": [
2013
+ {
2014
+ "id": "basics",
2015
+ "title": "Basics",
2016
+ "text": "Plain table elements dressed by the kit, so bring any data engine (Orbit Commerce's store dashboard uses TanStack Table with virtual rows). Links in cells read as ink until pointed at: the row is the target."
2017
+ },
2018
+ {
2019
+ "id": "selection",
2020
+ "title": "Selection",
2021
+ "text": "A Checkbox column; the head box goes part-ticked while some rows are chosen. Chosen rows take a teal line on their leading edge and a tint. While anything is selected, the head row can make way for the actions that apply to the selection."
2022
+ },
2023
+ {
2024
+ "id": "sorting",
2025
+ "title": "Sorting",
2026
+ "text": "Give a heading sort and onSort and it becomes a button with an arrow; the header cell carries aria-sort. Press Date or Total."
2027
+ },
2028
+ {
2029
+ "id": "frame",
2030
+ "title": "Frame, scrolling and pages",
2031
+ "text": "TableFrame is the hairline box with its own scroll area: set height and the headings stay put while rows scroll. footer pins Pagination under it. Its ref goes to the scroll area, for virtual rows."
2032
+ },
2033
+ {
2034
+ "id": "density",
2035
+ "title": "Density",
2036
+ "text": "Rows are 56px (comfortable, the default) or 44px (compact) for long lists and side panels."
2037
+ },
2038
+ {
2039
+ "id": "both-themes",
2040
+ "title": "In both themes",
2041
+ "text": ""
2042
+ },
2043
+ {
2044
+ "id": "guidelines",
2045
+ "title": "Guidelines",
2046
+ "text": ""
2047
+ },
2048
+ {
2049
+ "id": "accessibility",
2050
+ "title": "Accessibility",
2051
+ "text": ""
2052
+ },
2053
+ {
2054
+ "id": "props",
2055
+ "title": "Props",
2056
+ "text": "Every part also accepts the native attributes of its element."
2057
+ }
2058
+ ]
2059
+ },
2060
+ {
2061
+ "path": "/components/pagination",
2062
+ "group": "components",
2063
+ "slug": "pagination",
2064
+ "title": "Pagination",
2065
+ "category": "data",
2066
+ "status": "new",
2067
+ "lead": "Pages of a long list: a summary of where you are on the left, round page buttons on the right, the current page in ink. On phones the numbers fold into 3 / 25 between the arrows.",
2068
+ "importNames": [
2069
+ "Pagination"
2070
+ ],
2071
+ "sections": [
2072
+ {
2073
+ "id": "playground",
2074
+ "title": "Playground",
2075
+ "text": ""
2076
+ },
2077
+ {
2078
+ "id": "with-summary",
2079
+ "title": "With a summary",
2080
+ "text": "Say what is on screen and how much there is: \"1–50 of 1,241 orders\". Press the pages."
2081
+ },
2082
+ {
2083
+ "id": "gaps",
2084
+ "title": "Which pages show",
2085
+ "text": "The first and last page, the current page with siblings either side, and a gap wherever pages are skipped. When the whole run fits in the room the gaps would take, every page shows."
2086
+ },
2087
+ {
2088
+ "id": "loading",
2089
+ "title": "While a page loads",
2090
+ "text": "Pass disabled while the next page is on its way, so a second press cannot queue another request."
2091
+ },
2092
+ {
2093
+ "id": "both-themes",
2094
+ "title": "In both themes",
2095
+ "text": ""
2096
+ },
2097
+ {
2098
+ "id": "guidelines",
2099
+ "title": "Guidelines",
2100
+ "text": ""
2101
+ },
2102
+ {
2103
+ "id": "accessibility",
2104
+ "title": "Accessibility",
2105
+ "text": ""
2106
+ },
2107
+ {
2108
+ "id": "props",
2109
+ "title": "Props",
2110
+ "text": ""
2111
+ }
2112
+ ]
2113
+ },
2114
+ {
2115
+ "path": "/components/alert",
2116
+ "group": "components",
2117
+ "slug": "alert",
2118
+ "title": "Alert",
2119
+ "category": "display",
2120
+ "status": "new",
2121
+ "lead": "An inline message inside a page, card or dialog: something the merchant should know about the thing in front of them, in plain words on its tone's pale wash. Not a toast: it stays beside the problem until the problem goes.",
2122
+ "importNames": [
2123
+ "Alert"
2124
+ ],
2125
+ "sections": [
2126
+ {
2127
+ "id": "playground",
2128
+ "title": "Playground",
2129
+ "text": "Change the props. Turn on dismissible and press the cross to watch it leave."
2130
+ },
2131
+ {
2132
+ "id": "tones",
2133
+ "title": "Tones",
2134
+ "text": "The tone is the meaning. Each one has its own icon and wash, and the words stay ink on all of them, so the message reads first and the colour backs it up. info is the default."
2135
+ },
2136
+ {
2137
+ "id": "title",
2138
+ "title": "With a title",
2139
+ "text": "Add a title when the message runs past a sentence or two. The title says what happened in a few words; under it the message steps back to slate and explains."
2140
+ },
2141
+ {
2142
+ "id": "actions",
2143
+ "title": "Actions",
2144
+ "text": "actions takes one or two small buttons (size=\"sm\"): the move that fixes it, and perhaps a ghost button for a second, quieter one. They sit under the message. Press Try again."
2145
+ },
2146
+ {
2147
+ "id": "dismissing",
2148
+ "title": "Dismissing",
2149
+ "text": "dismissible adds a cross. Pressed, the alert fades, the space it leaves closes up so the content below glides into place, and it removes itself. onDismiss runs once it has gone: use it to remember the choice. Passing onDismiss on its own also shows the cross. Only let merchants dismiss what they can safely ignore, such as news about a feature. A problem that is still there should stay until it is fixed."
2150
+ },
2151
+ {
2152
+ "id": "in-context",
2153
+ "title": "In a card and a dialog",
2154
+ "text": "An alert sits at the top of what it is about: the card, the form or the dialog. It is a block that fills the width it is given and brings no margins, so the container spaces it."
2155
+ },
2156
+ {
2157
+ "id": "long-content",
2158
+ "title": "Long content",
2159
+ "text": "The message can hold paragraphs and a list, and the actions wrap onto a second line when the alert is narrow. Keep lists short: the alert says what is wrong, the page it links to holds the detail."
2160
+ },
2161
+ {
2162
+ "id": "icon",
2163
+ "title": "Icon",
2164
+ "text": "Each tone brings its own Phosphor icon, drawn duotone so it reads as a tinted mark on the wash. Pass icon to use a picture that says more, coloured by the tone, or icon={null} to leave it out."
2165
+ },
2166
+ {
2167
+ "id": "both-themes",
2168
+ "title": "In both themes",
2169
+ "text": "Every tone, light and dark side by side. In dark the washes are the tone at 14% over the surface, the icons lift, and a hairline in the tone keeps each box crisp. The title holds at least 12:1 and the message at least 6.4:1 on every wash."
2170
+ },
2171
+ {
2172
+ "id": "guidelines",
2173
+ "title": "Guidelines",
2174
+ "text": ""
2175
+ },
2176
+ {
2177
+ "id": "accessibility",
2178
+ "title": "Accessibility",
2179
+ "text": ""
2180
+ },
2181
+ {
2182
+ "id": "props",
2183
+ "title": "Props",
2184
+ "text": "Also accepts every native div attribute."
2185
+ }
2186
+ ]
2187
+ },
2188
+ {
2189
+ "path": "/components/toast",
2190
+ "group": "components",
2191
+ "slug": "toast",
2192
+ "title": "Toast",
2193
+ "category": "display",
2194
+ "status": "new",
2195
+ "lead": "A short message at the edge of the window about something that just happened: an order fulfilled, an export started, a payment that failed. It leaves on its own, so it never carries anything the merchant has to act on.",
2196
+ "importNames": [
2197
+ "Toaster",
2198
+ "toast"
2199
+ ],
2200
+ "sections": [
2201
+ {
2202
+ "id": "basics",
2203
+ "title": "Basics",
2204
+ "text": "Mount one Toaster near the root of the app, then call toast from anywhere: an event handler, a mutation's onSuccess, a hook. The Toaster draws nothing until a toast arrives. Each toast rises in from the bottom right on the Orbit spring, stays a few seconds and slips back out."
2205
+ },
2206
+ {
2207
+ "id": "tones",
2208
+ "title": "Tones",
2209
+ "text": "Five tones and a plain message. The surface never changes: only the icon carries the tone, in its status colour. A loading toast shows the orbit spinner and stays until you update it with the same id, as the Loading button does after a moment."
2210
+ },
2211
+ {
2212
+ "id": "both-themes",
2213
+ "title": "In both themes",
2214
+ "text": "Held still for review, light beside dark. The surface matches the popover's (raised, 14px corners, the floating shadow) and adds a hairline ring, so its edge holds over any page. The title is in the UI weight and the description is muted. In dark the surface lifts to graphite and the status colours brighten to stay readable."
2215
+ },
2216
+ {
2217
+ "id": "descriptions",
2218
+ "title": "With and without a description",
2219
+ "text": "The title says what happened. Add a description only when the merchant needs one more fact: what happens next, or what changed."
2220
+ },
2221
+ {
2222
+ "id": "actions",
2223
+ "title": "Actions",
2224
+ "text": "One follow-up, as a small button under the text: Undo, Try again, View order. The toast closes once the action has run. Call event.preventDefault() in onClick to keep it open; an action on a loading toast never closes it."
2225
+ },
2226
+ {
2227
+ "id": "loading",
2228
+ "title": "Loading and promises",
2229
+ "text": "toast.promise shows a loading toast while the work runs, then turns it into the outcome in place: the spinner gives way to the tone icon, which lands with a small settle. Each state is a title, or a { title, description }; success and error can also be functions of the result or the error. Leave one out and the toast simply closes. It returns the toast's id straight away."
2230
+ },
2231
+ {
2232
+ "id": "timing",
2233
+ "title": "How long they stay",
2234
+ "text": "Each tone has its own time on screen, longest for errors because they say what went wrong and what to do about it. A loading toast stays until it is updated or dismissed. Pass duration in milliseconds to change one, or Infinity to keep it until it is closed."
2235
+ },
2236
+ {
2237
+ "id": "stacking",
2238
+ "title": "Stacking and position",
2239
+ "text": "The newest toast sits in front. Up to two more fold behind it, each 12px further back and 5% smaller, with their content hidden. Hover the stack (or press Alt+T) and it fans out, 12px apart, with their timers paused. Swipe a toast towards the edge it sits against to dismiss it."
2240
+ },
2241
+ {
2242
+ "id": "playground",
2243
+ "title": "Playground",
2244
+ "text": "Build a toast, show it, and copy the call. Toasts follow the site theme: switch it in the header."
2245
+ },
2246
+ {
2247
+ "id": "guidelines",
2248
+ "title": "Guidelines",
2249
+ "text": ""
2250
+ },
2251
+ {
2252
+ "id": "accessibility",
2253
+ "title": "Accessibility",
2254
+ "text": ""
2255
+ },
2256
+ {
2257
+ "id": "props",
2258
+ "title": "Props",
2259
+ "text": ""
2260
+ }
2261
+ ]
2262
+ },
2263
+ {
2264
+ "path": "/components/badge",
2265
+ "group": "components",
2266
+ "slug": "badge",
2267
+ "title": "Badge",
2268
+ "category": "display",
2269
+ "status": "stable",
2270
+ "lead": "A small pill that labels a status, a count or a category. Reach for it when one or two words tell the merchant the state of something at a glance: Paid, Unfulfilled, 3 new.",
2271
+ "importNames": [
2272
+ "Badge"
2273
+ ],
2274
+ "sections": [
2275
+ {
2276
+ "id": "tones",
2277
+ "title": "Tones",
2278
+ "text": "The tone is the meaning. neutral is the default. The four status tones carry the same meaning everywhere in Orbit, so a merchant learns them once."
2279
+ },
2280
+ {
2281
+ "id": "variants",
2282
+ "title": "Variants",
2283
+ "text": "Three materials. subtle is the default and is right for status. solid is for counts and the few states that must shout. outline is for categories and quiet flags that sit beside a status without competing with it."
2284
+ },
2285
+ {
2286
+ "id": "both-themes",
2287
+ "title": "In both themes",
2288
+ "text": "Every tone in every variant, light and dark side by side. In dark the washes deepen and the status hues lift, so toned text still reads as ink with a colour."
2289
+ },
2290
+ {
2291
+ "id": "sizes",
2292
+ "title": "Sizes",
2293
+ "text": "md is 22px tall with 12px text, the default. sm is 18px with 11px text, for dense table rows and beside 13px text."
2294
+ },
2295
+ {
2296
+ "id": "dot-and-pulse",
2297
+ "title": "Dot and pulse",
2298
+ "text": "dot puts a small tone dot before the label. It helps the eye scan a column of mixed states by colour before reading, so use it for every badge in that column or none. pulse makes the dot send out a ring on a loop, like a transmission: only for states that are live right now."
2299
+ },
2300
+ {
2301
+ "id": "icons",
2302
+ "title": "With an icon",
2303
+ "text": "icon leads the label at 12px (11px at sm). Use one when the picture says something the word alone does not, such as how an order is being collected. The icon is decorative; the label still has to carry the meaning."
2304
+ },
2305
+ {
2306
+ "id": "counts",
2307
+ "title": "Counts",
2308
+ "text": "A badge whose only content is a number, or a string of digits such as \"99+\", is a count. A number is formatted the UK way ({1204} shows as 1,204); a string is shown as written. A solid count is compact, and a single digit becomes a circle. When the value changes the badge bumps once, never on first render. Press the buttons to see it."
2309
+ },
2310
+ {
2311
+ "id": "order-statuses",
2312
+ "title": "Order statuses",
2313
+ "text": "The mapping for orders in Orbit Commerce's store dashboard. Pick the tone by what the merchant has to do next, not by how the word feels: warning when it needs them or money is still owed, negative when something failed or money went back out."
2314
+ },
2315
+ {
2316
+ "id": "guidelines",
2317
+ "title": "Guidelines",
2318
+ "text": ""
2319
+ },
2320
+ {
2321
+ "id": "accessibility",
2322
+ "title": "Accessibility",
2323
+ "text": ""
2324
+ },
2325
+ {
2326
+ "id": "props",
2327
+ "title": "Props",
2328
+ "text": "Also accepts every native span attribute."
2329
+ }
2330
+ ]
2331
+ },
2332
+ {
2333
+ "path": "/components/avatar",
2334
+ "group": "components",
2335
+ "slug": "avatar",
2336
+ "title": "Avatar",
2337
+ "category": "display",
2338
+ "status": "stable",
2339
+ "lead": "A person or a store, as a small circle or square. It shows an image when there is one and initials on a quiet tint when there is not, so every customer, colleague and shop has a face in lists, menus and headers.",
2340
+ "importNames": [
2341
+ "Avatar",
2342
+ "AvatarGroup",
2343
+ "initialsOf"
2344
+ ],
2345
+ "sections": [
2346
+ {
2347
+ "id": "sizes",
2348
+ "title": "Sizes",
2349
+ "text": "Five sizes. md is the default. Initials are set at 40% of the size, so they stay in proportion at every step."
2350
+ },
2351
+ {
2352
+ "id": "people-and-stores",
2353
+ "title": "People and stores",
2354
+ "text": "People are circles, the default. Stores, brands and suppliers are rounded squares, with corners at 28% of the size. The shape also changes the initials: a person takes their first and last name, a store its first two words, which is how shop names are shortened."
2355
+ },
2356
+ {
2357
+ "id": "tints",
2358
+ "title": "Tints",
2359
+ "text": "Without an image, initials sit on one of six quiet tints: Orbit teal turned a little either way around the colour wheel, plus a slate. The tint is picked from the name, so the same person or shop gets the same colour everywhere, on every visit."
2360
+ },
2361
+ {
2362
+ "id": "status",
2363
+ "title": "Status",
2364
+ "text": "A presence dot on the rim, for colleagues: online, away or busy. Each has its own shape as well as its own colour (a solid dot, a ring, a dot with a bar), so it reads without colour. The dot scales with the avatar."
2365
+ },
2366
+ {
2367
+ "id": "images",
2368
+ "title": "Images and fallbacks",
2369
+ "text": "Pass src and the image fades in once it has loaded (a cached image shows at once). If it is missing or fails, the initials stay. Logos that must not touch the edge take fit=\"contain\": the mark is inset on the canvas colour. With no name at all, a quiet silhouette stands in for a person and a shopfront for a store."
2370
+ },
2371
+ {
2372
+ "id": "groups",
2373
+ "title": "Groups",
2374
+ "text": "AvatarGroup overlaps avatars, each cut out of the one beneath by a ring in the surface colour. It sets the size and shape for all of them. With max, the rest collapse into a +N chip. Point at one and it comes forward."
2375
+ },
2376
+ {
2377
+ "id": "both-themes",
2378
+ "title": "In both themes",
2379
+ "text": "All six tints for people and for stores, with status and a group, light and dark side by side."
2380
+ },
2381
+ {
2382
+ "id": "initials",
2383
+ "title": "Initials",
2384
+ "text": "initialsOf(name, kind) is the function the avatar uses, exported for anywhere else you need the same letters. It drops company suffixes (Ltd, Limited, LLP, PLC, Inc), a leading \"The\" and stray punctuation, and keeps accented letters."
2385
+ },
2386
+ {
2387
+ "id": "guidelines",
2388
+ "title": "Guidelines",
2389
+ "text": ""
2390
+ },
2391
+ {
2392
+ "id": "accessibility",
2393
+ "title": "Accessibility",
2394
+ "text": ""
2395
+ },
2396
+ {
2397
+ "id": "props",
2398
+ "title": "Props",
2399
+ "text": ""
2400
+ }
2401
+ ]
2402
+ },
2403
+ {
2404
+ "path": "/components/card",
2405
+ "group": "components",
2406
+ "slug": "card",
2407
+ "title": "Card",
2408
+ "category": "display",
2409
+ "status": "stable",
2410
+ "lead": "A 16px surface that holds one piece of the shop together: a summary, a list of things to act on, a way into a section. Reach for it only when the grouping cannot be read from space and a hairline alone.",
2411
+ "importNames": [
2412
+ "Card",
2413
+ "CardHeader",
2414
+ "CardBody",
2415
+ "CardFooter"
2416
+ ],
2417
+ "sections": [
2418
+ {
2419
+ "id": "variants",
2420
+ "title": "Variants",
2421
+ "text": "Three materials, and each has its place. A card carries a hairline or a shadow, never both, and every variant keeps a 1px border (transparent unless outlined), so switching variant never moves the content."
2422
+ },
2423
+ {
2424
+ "id": "anatomy",
2425
+ "title": "Header, body and footer",
2426
+ "text": "CardHeader takes an optional icon in a 32px tile, a title, a one-line description and actions on the right. CardBody holds the content. CardFooter right-aligns its actions under a hairline that runs edge to edge. All three follow the card's padding."
2427
+ },
2428
+ {
2429
+ "id": "padding",
2430
+ "title": "Padding",
2431
+ "text": "md (20px) is the default. The gap between header, body and footer follows the padding, so a denser card is dense all the way through. none is for tables and media, whose rows bring their own spacing."
2432
+ },
2433
+ {
2434
+ "id": "interactive",
2435
+ "title": "Interactive",
2436
+ "text": "When the whole card is one way in, set interactive and render the link itself with asChild. Hover firms the hairline (a sunken card darkens, a raised card lifts to the floating shadow), a press dips it to 99.5%, and keyboard focus draws the teal ring. Point at them, or tab to them."
2437
+ },
2438
+ {
2439
+ "id": "both-themes",
2440
+ "title": "In both themes",
2441
+ "text": "All three variants, light and dark side by side. In dark the canvas is near black, so outline and sunken cards read by their hairline and their tone, and the raised card sits on the ground."
2442
+ },
2443
+ {
2444
+ "id": "guidelines",
2445
+ "title": "Guidelines",
2446
+ "text": "The kit groups with space, weight and hairlines before boxes. The page canvas is the one raised surface and the main container, and the home dashboard uses no cards at all. A card earns its border only when the grouping cannot be read without one."
2447
+ },
2448
+ {
2449
+ "id": "accessibility",
2450
+ "title": "Accessibility",
2451
+ "text": ""
2452
+ },
2453
+ {
2454
+ "id": "props",
2455
+ "title": "Props",
2456
+ "text": ""
2457
+ }
2458
+ ]
2459
+ },
2460
+ {
2461
+ "path": "/components/delta",
2462
+ "group": "components",
2463
+ "slug": "delta",
2464
+ "title": "Delta",
2465
+ "category": "display",
2466
+ "status": "stable",
2467
+ "lead": "How a figure moved: an arrow and a signed percentage on a tinted pill, with an optional comparison after it. It sits beside a figure and answers the merchant's next question: better or worse than before?",
2468
+ "importNames": [
2469
+ "Delta",
2470
+ "formatDelta"
2471
+ ],
2472
+ "sections": [
2473
+ {
2474
+ "id": "states",
2475
+ "title": "States",
2476
+ "text": "One arrow, turned to its heading: up and to the right when rising, down and to the right when falling, level when steady. A change under 0.5% either way is steady (noise, not news), so it stays neutral even though it keeps its sign. The pill is green when the change is good news and red when it is bad."
2477
+ },
2478
+ {
2479
+ "id": "when-up-is-bad",
2480
+ "title": "When up is bad",
2481
+ "text": "Most figures are good when they rise: takings, orders, conversion. For the ones where a rise is bad news (refunds, returns, abandoned checkouts), set positiveIsGood={false}. The arrow still shows the direction; only the colour flips."
2482
+ },
2483
+ {
2484
+ "id": "with-figures",
2485
+ "title": "Beside a figure",
2486
+ "text": "A delta always belongs to a figure. The figure stays in ink, set in Sora with tabular numerals, and the delta carries the colour on its own pill. label says what the change is measured against, in quiet text after the pill. Headline figures sit on one hairline, not in boxes: the real strip, with a chart beneath it, is Figure tabs."
2487
+ },
2488
+ {
2489
+ "id": "sizes",
2490
+ "title": "Sizes",
2491
+ "text": "md (22px, 12px text) is the default, beside figures. sm (18px, 11px text) is for tables and dense rows."
2492
+ },
2493
+ {
2494
+ "id": "precision",
2495
+ "title": "Precision",
2496
+ "text": "One decimal place by default. Use precision={0} for large swings, where a decimal adds nothing, and 2 only where small differences really matter, such as a conversion rate."
2497
+ },
2498
+ {
2499
+ "id": "both-themes",
2500
+ "title": "In both themes",
2501
+ "text": "Every state and both sizes, light and dark side by side."
2502
+ },
2503
+ {
2504
+ "id": "format-delta",
2505
+ "title": "formatDelta",
2506
+ "text": "The formatter the pill uses, exported for text, tooltips and exports that need the same wording: a plus for a rise, a true minus sign for a fall, UK number formatting, and no sign at all when the change rounds to nothing. precision is rounded and held between 0 and 4."
2507
+ },
2508
+ {
2509
+ "id": "guidelines",
2510
+ "title": "Guidelines",
2511
+ "text": ""
2512
+ },
2513
+ {
2514
+ "id": "accessibility",
2515
+ "title": "Accessibility",
2516
+ "text": ""
2517
+ },
2518
+ {
2519
+ "id": "props",
2520
+ "title": "Props",
2521
+ "text": "Also accepts every native span attribute except children."
2522
+ }
2523
+ ]
2524
+ },
2525
+ {
2526
+ "path": "/components/empty-state",
2527
+ "group": "components",
2528
+ "slug": "empty-state",
2529
+ "title": "Empty state",
2530
+ "category": "display",
2531
+ "status": "stable",
2532
+ "lead": "What a view shows before there is anything in it: a small drawn orbit, a plain title, a line on what will appear, and the next move. Emptiness is an invitation to act, never a dead end.",
2533
+ "importNames": [
2534
+ "EmptyState",
2535
+ "OrbitMark"
2536
+ ],
2537
+ "sections": [
2538
+ {
2539
+ "id": "pages-and-cards",
2540
+ "title": "In a page or a card",
2541
+ "text": "md, the default, is for a whole page or a card that has nothing in it yet. Give it the move that fills it: when the empty state is the page's main content, that move is the page's one primary button."
2542
+ },
2543
+ {
2544
+ "id": "panels-and-results",
2545
+ "title": "In a panel or a list of results",
2546
+ "text": "sm tightens everything (a 14px title, less padding, and no mark) for panels, search results and filtered lists. It says why the list is empty, and the action undoes whatever emptied it. The mark stays off at this size: two or three small planets side by side on one screen read as clutter."
2547
+ },
2548
+ {
2549
+ "id": "whole-screen",
2550
+ "title": "A whole screen",
2551
+ "text": "lg fills a screen that has nothing else on it: a page that was not found, a server that did not answer, a store the merchant cannot open. The title speaks in Display and the mark grows to 128px. For a page that was not found, pass <OrbitMark state=\"adrift\" />: the satellite slips off its orbit, leaves a dotted trail, and bobs where it stopped. Make the title the page's h1."
2552
+ },
2553
+ {
2554
+ "id": "the-mark",
2555
+ "title": "The mark",
2556
+ "text": "A neutral planet inside a tilted teal orbit, from the Orbit logo. On arrival the mark settles in, the satellite travels once around the planet drawing its orbit behind it, and comes to rest at the upper right, where the comet sits in the logo. The words rise into place after it. It plays once, then holds still."
2557
+ },
2558
+ {
2559
+ "id": "both-themes",
2560
+ "title": "In both themes",
2561
+ "text": "Light and dark side by side. In dark the orbit and its satellite take the night accent, and the planet stays a shade off the canvas."
2562
+ },
2563
+ {
2564
+ "id": "writing",
2565
+ "title": "Writing an empty state",
2566
+ "text": "An empty view is the moment a merchant is most likely to wonder what to do. Say what is empty, what will fill it, and offer the move that fills it. Even a finished job (\"Nothing to fulfil\") points somewhere useful."
2567
+ },
2568
+ {
2569
+ "id": "accessibility",
2570
+ "title": "Accessibility",
2571
+ "text": ""
2572
+ },
2573
+ {
2574
+ "id": "props",
2575
+ "title": "Props",
2576
+ "text": "Also accepts every native div attribute except title."
2577
+ }
2578
+ ]
2579
+ },
2580
+ {
2581
+ "path": "/components/kbd",
2582
+ "group": "components",
2583
+ "slug": "kbd",
2584
+ "title": "Kbd",
2585
+ "category": "display",
2586
+ "status": "stable",
2587
+ "lead": "A key cap, or with keys a shortcut made of several. It shows the keys the right way for the merchant's computer: ⌘ on a Mac, Ctrl everywhere else.",
2588
+ "importNames": [
2589
+ "Kbd",
2590
+ "modKey",
2591
+ "isApplePlatform"
2592
+ ],
2593
+ "sections": [
2594
+ {
2595
+ "id": "single-keys",
2596
+ "title": "Single keys",
2597
+ "text": "A muted tile with a darker bottom edge, so it reads as something you press. A string child is read as a key name, so esc shows as Esc and enter as ↵. Single letters are upper-cased."
2598
+ },
2599
+ {
2600
+ "id": "shortcuts",
2601
+ "title": "Shortcuts",
2602
+ "text": "Pass keys for a shortcut: one cap per key, 3px apart. Write mod for the main modifier and it becomes ⌘ on a Mac or iPhone and Ctrl elsewhere. On this device it is Ctrl."
2603
+ },
2604
+ {
2605
+ "id": "in-text",
2606
+ "title": "In a sentence",
2607
+ "text": "Caps sit on the text's middle line, so they drop into help text and hints without breaking the line."
2608
+ },
2609
+ {
2610
+ "id": "shortcuts-sheet",
2611
+ "title": "A shortcuts sheet",
2612
+ "text": "A list of shortcuts is Kbd and Separator: the action on the left, its keys on the right."
2613
+ },
2614
+ {
2615
+ "id": "where-caps-appear",
2616
+ "title": "Where caps appear",
2617
+ "text": "Tooltips, menu items and the search field take a shortcut list and draw it with Kbd, restyled for their surface. Hover or focus the buttons to see the caps on the tooltip's inverse pill."
2618
+ },
2619
+ {
2620
+ "id": "platform-helpers",
2621
+ "title": "Platform helpers",
2622
+ "text": "The two functions Kbd uses to decide, exported for labels, hints and aria-keyshortcuts. They read the browser's platform when called, so call them in the browser, not while rendering on a server."
2623
+ },
2624
+ {
2625
+ "id": "both-themes",
2626
+ "title": "In both themes",
2627
+ "text": "Single caps, shortcuts and caps in text, light and dark side by side."
2628
+ },
2629
+ {
2630
+ "id": "guidelines",
2631
+ "title": "Guidelines",
2632
+ "text": ""
2633
+ },
2634
+ {
2635
+ "id": "accessibility",
2636
+ "title": "Accessibility",
2637
+ "text": ""
2638
+ },
2639
+ {
2640
+ "id": "props",
2641
+ "title": "Props",
2642
+ "text": "Also accepts every native attribute of the kbd element."
2643
+ }
2644
+ ]
2645
+ },
2646
+ {
2647
+ "path": "/components/separator",
2648
+ "group": "components",
2649
+ "slug": "separator",
2650
+ "title": "Separator",
2651
+ "category": "display",
2652
+ "status": "stable",
2653
+ "lead": "A hairline between groups of content: across a panel, or down a toolbar. Reach for it when space alone does not make the break clear enough.",
2654
+ "importNames": [
2655
+ "Separator"
2656
+ ],
2657
+ "sections": [
2658
+ {
2659
+ "id": "horizontal",
2660
+ "title": "Horizontal",
2661
+ "text": "The default. A 1px hairline across the full width of its container, in the faintest border colour. Space around it comes from the layout, not the line."
2662
+ },
2663
+ {
2664
+ "id": "vertical",
2665
+ "title": "Vertical",
2666
+ "text": "orientation=\"vertical\" draws a 1px line that stretches to the height of its row, so it needs a flex or grid row to stand in. Inset it with a margin so it stops short of the bar's edges."
2667
+ },
2668
+ {
2669
+ "id": "decorative-or-semantic",
2670
+ "title": "Decorative or semantic",
2671
+ "text": "By default a separator is decorative: it is drawn but hidden from assistive tech, because the groups around it are usually clear from headings, lists or labels. Set decorative={false} when the line itself marks where one group ends, such as between groups of buttons in a toolbar. It is then announced as a separator, with its orientation when vertical. Both look the same: only what assistive tech hears changes."
2672
+ },
2673
+ {
2674
+ "id": "both-themes",
2675
+ "title": "In both themes",
2676
+ "text": "Both orientations, light and dark side by side."
2677
+ },
2678
+ {
2679
+ "id": "guidelines",
2680
+ "title": "Guidelines",
2681
+ "text": "The kit groups with space and weight first, a hairline second, and a box last. A separator is the second step."
2682
+ },
2683
+ {
2684
+ "id": "accessibility",
2685
+ "title": "Accessibility",
2686
+ "text": ""
2687
+ },
2688
+ {
2689
+ "id": "props",
2690
+ "title": "Props",
2691
+ "text": "Also accepts every native div attribute."
2692
+ }
2693
+ ]
2694
+ },
2695
+ {
2696
+ "path": "/components/skeleton",
2697
+ "group": "components",
2698
+ "slug": "skeleton",
2699
+ "title": "Skeleton",
2700
+ "category": "display",
2701
+ "status": "stable",
2702
+ "lead": "A placeholder in the shape of content that is on its way, with a slow sheen passing over it. Use it while a list, a card or a figure loads, so the page holds its layout and the content lands without a jump.",
2703
+ "importNames": [
2704
+ "Skeleton",
2705
+ "SkeletonText"
2706
+ ],
2707
+ "sections": [
2708
+ {
2709
+ "id": "shapes",
2710
+ "title": "Shapes",
2711
+ "text": "Skeleton is a block: give it a width, a height and the corners of what it stands in for. It fills the available width and is 16px tall unless told otherwise."
2712
+ },
2713
+ {
2714
+ "id": "text",
2715
+ "title": "Text",
2716
+ "text": "SkeletonText is a paragraph of pill lines that vary a little in width, as real lines do, with a shorter last line. Each line takes exactly the height of a line of text at the font size around it (at the normal 1.45 line height), so when the words arrive nothing moves. The sheen falls down the lines one after another."
2717
+ },
2718
+ {
2719
+ "id": "order-row",
2720
+ "title": "Loading a list",
2721
+ "text": "A list of orders while it loads: the same columns as the loaded rows, a circle for the avatar, a line for each line of text, a pill for the status. The region that is loading carries aria-busy. Switch Loaded on and off: the rows keep their height."
2722
+ },
2723
+ {
2724
+ "id": "card",
2725
+ "title": "Loading a card",
2726
+ "text": "Only the data waits. The icon and the title do not depend on it, so they render at once; the description, the product lines and the stock badges are placeholders until the numbers arrive."
2727
+ },
2728
+ {
2729
+ "id": "both-themes",
2730
+ "title": "In both themes",
2731
+ "text": "Shapes, text and a loading row, light and dark side by side."
2732
+ },
2733
+ {
2734
+ "id": "guidelines",
2735
+ "title": "Guidelines",
2736
+ "text": ""
2737
+ },
2738
+ {
2739
+ "id": "accessibility",
2740
+ "title": "Accessibility",
2741
+ "text": ""
2742
+ },
2743
+ {
2744
+ "id": "props",
2745
+ "title": "Props",
2746
+ "text": ""
2747
+ }
2748
+ ]
2749
+ },
2750
+ {
2751
+ "path": "/components/orbit-spinner",
2752
+ "group": "components",
2753
+ "slug": "orbit-spinner",
2754
+ "title": "Orbit spinner",
2755
+ "category": "display",
2756
+ "status": "stable",
2757
+ "lead": "A satellite with a fading tail, circling a faint orbit: Orbit's sign that something is working. It lives inside the thing that is busy, a button or a row, and takes that thing's colour.",
2758
+ "importNames": [
2759
+ "OrbitSpinner"
2760
+ ],
2761
+ "sections": [
2762
+ {
2763
+ "id": "sizes",
2764
+ "title": "Sizes",
2765
+ "text": "size is the diameter in pixels, 16 by default. The orbit's stroke grows with it (about a ninth of the size, never thinner than 1.5px), so it reads at every size."
2766
+ },
2767
+ {
2768
+ "id": "colour",
2769
+ "title": "Colour",
2770
+ "text": "The spinner has no colour of its own: it takes the text colour around it. The satellite and its tail are the full colour, and the orbit is the same colour at 20%. Set color on a parent to change it."
2771
+ },
2772
+ {
2773
+ "id": "in-buttons",
2774
+ "title": "In buttons",
2775
+ "text": "A button's loading swaps its leading icon for a spinner in the label's colour, and keeps the comet in orbit around the pill. You do not place the spinner yourself. Press a button to run it."
2776
+ },
2777
+ {
2778
+ "id": "with-text",
2779
+ "title": "Beside text",
2780
+ "text": "Sized to the words it sits with, and in their colour, for a status that is running somewhere on the page."
2781
+ },
2782
+ {
2783
+ "id": "reduced-motion",
2784
+ "title": "Reduced motion",
2785
+ "text": "One lap takes 0.95s, easing a little in and out, and it loops for as long as the wait lasts. When the system asks for reduced motion the satellite stops travelling: it holds at the top of its orbit, and it and its tail breathe, fading gently in and out, so it still says \"working\" without movement."
2786
+ },
2787
+ {
2788
+ "id": "both-themes",
2789
+ "title": "In both themes",
2790
+ "text": "Sizes, colours and loading buttons, light and dark side by side."
2791
+ },
2792
+ {
2793
+ "id": "guidelines",
2794
+ "title": "Guidelines",
2795
+ "text": ""
2796
+ },
2797
+ {
2798
+ "id": "accessibility",
2799
+ "title": "Accessibility",
2800
+ "text": ""
2801
+ },
2802
+ {
2803
+ "id": "props",
2804
+ "title": "Props",
2805
+ "text": "These three only: set colour and spacing on a wrapper."
2806
+ }
2807
+ ]
2808
+ },
2809
+ {
2810
+ "path": "/components/live-globe",
2811
+ "group": "components",
2812
+ "slug": "live-globe",
2813
+ "title": "Live globe",
2814
+ "category": "figures",
2815
+ "status": "new",
2816
+ "lead": "The world as a dot grid in Orbit's hand-drawn style, with a teal pin wherever someone is browsing the shop right now. The live instrument at the top of the home page in Orbit Commerce's store dashboard.",
2817
+ "importNames": [
2818
+ "LiveGlobe"
2819
+ ],
2820
+ "sections": [
2821
+ {
2822
+ "id": "playground",
2823
+ "title": "Playground",
2824
+ "text": "Drag to turn it. With zoom on, click a pin to fly in to that country and anywhere else to fly out."
2825
+ },
2826
+ {
2827
+ "id": "markers",
2828
+ "title": "Markers",
2829
+ "text": "A visitor does not get a pin of their own: the land dot nearest to them lights up, so pins sit on the map's own grid. Live visitors ping; recent ones sit faint. A chip names the place nearest the front, with a count when more than one person is there. Pass one marker per place, not per session: group sessions within about 11km (a city) and set count. With countryCode, pins close together roll up into one per country when the globe is zoomed out."
2830
+ },
2831
+ {
2832
+ "id": "arrivals",
2833
+ "title": "Arrivals",
2834
+ "text": "When someone new lands, give their marker an arrivedAt and change focus to their place with a new key: the globe eases round to face them and their pin flashes."
2835
+ },
2836
+ {
2837
+ "id": "holding",
2838
+ "title": "Holding still",
2839
+ "text": "When everyone is in one place, pass it as holdAt: the globe eases there and stops spinning, so the view stays where the action is. A drag still works and is respected afterwards."
2840
+ },
2841
+ {
2842
+ "id": "both-themes",
2843
+ "title": "In both themes",
2844
+ "text": "Land dots in ink, pins in the accent: teal in light, mint in dark. Chips sit on the canvas colour."
2845
+ },
2846
+ {
2847
+ "id": "sizing",
2848
+ "title": "Sizing",
2849
+ "text": "size is the canvas; the sphere is 0.76 of it, leaving room for chips and the zoom hint. So a 520px canvas draws a world about 400px across. The canvas is drawn at a fixed pixel size, so when its column changes width, measure it and pass a new size (in steps, as the store dashboard's home page does in 20px steps) rather than scaling it with CSS. width makes the canvas wider than tall, which gives a zoomed-in map room to breathe. safeInset keeps chips clear of a top and bottom band a parent may clip."
2850
+ },
2851
+ {
2852
+ "id": "theming",
2853
+ "title": "Theming",
2854
+ "text": "The canvas reads four custom properties at draw time. They map to tokens, so the globe follows light, dark and any ThemeScope around it. Set them on a parent to restyle one globe."
2855
+ },
2856
+ {
2857
+ "id": "guidelines",
2858
+ "title": "Guidelines",
2859
+ "text": ""
2860
+ },
2861
+ {
2862
+ "id": "accessibility",
2863
+ "title": "Accessibility",
2864
+ "text": ""
2865
+ },
2866
+ {
2867
+ "id": "props",
2868
+ "title": "Props",
2869
+ "text": ""
2870
+ }
2871
+ ]
2872
+ },
2873
+ {
2874
+ "path": "/components/rolling-number",
2875
+ "group": "components",
2876
+ "slug": "rolling-number",
2877
+ "title": "Rolling number",
2878
+ "category": "figures",
2879
+ "status": "new",
2880
+ "lead": "A figure that reads like a till display. Every digit is a reel, so when the number changes each column rolls to its new digit. Reach for it for the figures that lead a view and change while someone is watching: today's takings, a live count.",
2881
+ "importNames": [
2882
+ "RollingNumber"
2883
+ ],
2884
+ "sections": [
2885
+ {
2886
+ "id": "basics",
2887
+ "title": "Basics",
2888
+ "text": "Pass a number and a format. When the value changes, each digit rolls to its new place like an odometer (9 to 0 steps forward, never back through every digit) and each column to the right starts 25ms after its neighbour, so the roll reads as mechanical. The £ sign and the separators stay still. Press Simulate a sale."
2889
+ },
2890
+ {
2891
+ "id": "formats",
2892
+ "title": "Formats",
2893
+ "text": "format takes the same options as Intl.NumberFormat, and locale defaults to en-GB, so money, counts and rates come out the UK way. Percentages take a fraction: pass 0.031 to show 3.1%."
2894
+ },
2895
+ {
2896
+ "id": "digits",
2897
+ "title": "Gaining and losing digits",
2898
+ "text": "Columns are keyed by place value (ones, tens, hundreds), so a column keeps its reel as the number grows or shrinks. Going from 9,999 to 10,000 rolls the existing columns and opens a new one on its grid track, with its group separator; dividing closes columns the same way."
2899
+ },
2900
+ {
2901
+ "id": "arrival",
2902
+ "title": "First appearance",
2903
+ "text": "By default a figure counts up from zero the first time it renders, which gives a page's leading number an arrival. Turn it off with animateOnMount={false} where the figure should simply be there: in tables, in lists, and when a page is restored."
2904
+ },
2905
+ {
2906
+ "id": "type",
2907
+ "title": "Type and tabular figures",
2908
+ "text": "The reel inherits its font, size and colour, so the same component sits in a table cell in Geist or as the headline figure of a dashboard in Sora. Every numeral is tabular and each column is held open at the width of a zero, so figures never jitter as they roll and amounts line up in a column."
2909
+ },
2910
+ {
2911
+ "id": "both-themes",
2912
+ "title": "In both themes",
2913
+ "text": "Ink on the canvas in light, night ink in dark. The figure never takes a colour of its own."
2914
+ },
2915
+ {
2916
+ "id": "motion",
2917
+ "title": "Motion",
2918
+ "text": "The roll runs on the settle spring, which lands with a whisper of overshoot, like a reel clicking into place."
2919
+ },
2920
+ {
2921
+ "id": "guidelines",
2922
+ "title": "Guidelines",
2923
+ "text": ""
2924
+ },
2925
+ {
2926
+ "id": "accessibility",
2927
+ "title": "Accessibility",
2928
+ "text": ""
2929
+ },
2930
+ {
2931
+ "id": "props",
2932
+ "title": "Props",
2933
+ "text": "Also accepts every native span attribute except children."
2934
+ }
2935
+ ]
2936
+ },
2937
+ {
2938
+ "path": "/components/sparkline",
2939
+ "group": "components",
2940
+ "slug": "sparkline",
2941
+ "title": "Sparkline",
2942
+ "category": "figures",
2943
+ "status": "new",
2944
+ "lead": "A tiny trend line that sits beside a figure, in a stat or a table row, to show which way it has been heading. Reach for it when the shape matters more than the values; for values, use an area chart.",
2945
+ "importNames": [
2946
+ "Sparkline"
2947
+ ],
2948
+ "sections": [
2949
+ {
2950
+ "id": "basics",
2951
+ "title": "Basics",
2952
+ "text": "Pass the values oldest first. The line is a smooth curve that never overshoots the data, drawn 1.5px wide with round caps. showEnd marks the latest value with a dot and fill lays a soft wash beneath the line."
2953
+ },
2954
+ {
2955
+ "id": "tones",
2956
+ "title": "Tones",
2957
+ "text": "tone sets the colour by meaning, never by the data. A line does not turn red because it fell: say whether a change is good news with a Delta beside it."
2958
+ },
2959
+ {
2960
+ "id": "both-themes",
2961
+ "title": "In both themes",
2962
+ "text": "In dark the accent turns mint and the status hues lift, so each line keeps its contrast on the night canvas."
2963
+ },
2964
+ {
2965
+ "id": "sizes",
2966
+ "title": "Sizes",
2967
+ "text": "width and height are in pixels, 96 by 28 by default. The stroke stays 1.5px at every size, and the plot insets itself so round caps and the end dot are never clipped."
2968
+ },
2969
+ {
2970
+ "id": "in-context",
2971
+ "title": "In a stat and a table",
2972
+ "text": "Beside a figure, the sparkline shows the shape and the Delta says whether it is good news. Stats sit on a hairline strip rather than in a row of cards, the same way the headline figures do on the home."
2973
+ },
2974
+ {
2975
+ "id": "edge-cases",
2976
+ "title": "Flat and missing data",
2977
+ "text": "With fewer than two values, or values that never change, the sparkline draws a level line through the middle, so a quiet fortnight still reads as a line rather than an empty gap. Values that are not finite are skipped."
2978
+ },
2979
+ {
2980
+ "id": "motion",
2981
+ "title": "Motion",
2982
+ "text": "The line draws itself in once, left to right, over 600ms when it first appears; the wash settles in after it and the end dot pops at the end of the stroke. When the data changes later, the new line simply replaces the old one. With reduced motion on, the line and the dot fade in instead."
2983
+ },
2984
+ {
2985
+ "id": "guidelines",
2986
+ "title": "Guidelines",
2987
+ "text": ""
2988
+ },
2989
+ {
2990
+ "id": "accessibility",
2991
+ "title": "Accessibility",
2992
+ "text": ""
2993
+ },
2994
+ {
2995
+ "id": "props",
2996
+ "title": "Props",
2997
+ "text": "Also accepts SVG attributes, except width, height, fill and children."
2998
+ }
2999
+ ]
3000
+ },
3001
+ {
3002
+ "path": "/components/area-chart",
3003
+ "group": "components",
3004
+ "slug": "area-chart",
3005
+ "title": "Area chart",
3006
+ "category": "figures",
3007
+ "status": "new",
3008
+ "lead": "The range chart: one figure over time as a single Orbit line over a wash that fades to nothing, with an optional dashed comparison and a readout that snaps to the nearest day. Reach for it under headline figures, for takings, orders or visits across a range.",
3009
+ "importNames": [
3010
+ "AreaChart"
3011
+ ],
3012
+ "sections": [
3013
+ {
3014
+ "id": "basics",
3015
+ "title": "Basics",
3016
+ "text": "Give it one point per day, oldest first, with dates as YYYY-MM-DD strings (read as local dates) or Date objects. Hover the chart, or tab to it and use the arrow keys, to read each day."
3017
+ },
3018
+ {
3019
+ "id": "comparison",
3020
+ "title": "With a comparison",
3021
+ "text": "Add compare to each point and the chart draws the earlier period as a dashed grey line, adds a legend above the plot, and shows both values and the change in the readout. Name both series for what they are with valueLabel and compareLabel."
3022
+ },
3023
+ {
3024
+ "id": "ranges",
3025
+ "title": "Ranges and refreshes",
3026
+ "text": "A new range (different days) redraws: the old line fades out as the new one is uncovered from the left. A refresh of the same range (same days, new figures) morphs the line, the wash and the gridlines in place, so you can see what changed. Switch the range, then press Refresh."
3027
+ },
3028
+ {
3029
+ "id": "readout",
3030
+ "title": "The readout",
3031
+ "text": "The crosshair snaps to the nearest day and the readout glides after it on a spring, opening on whichever side has room. It leads with the value in Sora, keys each series with a short stroke that matches its line, and shows the change against the comparison. Here it is held open on one day in both themes."
3032
+ },
3033
+ {
3034
+ "id": "axes",
3035
+ "title": "Axes and formatting",
3036
+ "text": "Four formatters shape every label. The defaults are UK formats: dates such as \"3 Aug\" on the axis, \"Mon 3 Aug\" in the readout, and compact values such as \"2.5k\" on the gridlines. For hourly data, pass dates for each hour and format them as times (\"14:00\")."
3037
+ },
3038
+ {
3039
+ "id": "states",
3040
+ "title": "Loading and empty",
3041
+ "text": "With loading and no data yet, a soft silhouette of a chart shimmers where the plot will be. With loading and data already drawn, the chart holds its frame at half strength until the new data lands. With no data, emptyMessage sits in the middle of the plot."
3042
+ },
3043
+ {
3044
+ "id": "motion",
3045
+ "title": "Motion",
3046
+ "text": ""
3047
+ },
3048
+ {
3049
+ "id": "guidelines",
3050
+ "title": "Guidelines",
3051
+ "text": ""
3052
+ },
3053
+ {
3054
+ "id": "accessibility",
3055
+ "title": "Accessibility",
3056
+ "text": ""
3057
+ },
3058
+ {
3059
+ "id": "props",
3060
+ "title": "Props",
3061
+ "text": "Also accepts every native div attribute except children."
3062
+ }
3063
+ ]
3064
+ },
3065
+ {
3066
+ "path": "/components/figure-tabs",
3067
+ "group": "components",
3068
+ "slug": "figure-tabs",
3069
+ "title": "Figure tabs",
3070
+ "category": "figures",
3071
+ "status": "new",
3072
+ "lead": "Headline figures that double as the tabs of the chart beneath them. Each figure is a label, a value and how it moved; the one that is selected wears a teal line, which glides to the next when you pick it. Reach for them above a chart, in place of a row of stat cards.",
3073
+ "importNames": [
3074
+ "FigureTabs"
3075
+ ],
3076
+ "sections": [
3077
+ {
3078
+ "id": "default",
3079
+ "title": "Default",
3080
+ "text": "Figures sit straight on the surface, divided by hairlines, with a hairline under the row. Each has a label, a value in Sora, a change (usually a Delta) and an optional quiet hint. Pick one: the teal line glides to it on a spring."
3081
+ },
3082
+ {
3083
+ "id": "compact",
3084
+ "title": "Compact: the Z-read strip",
3085
+ "text": "variant=\"compact\" sets each figure on one baseline (label, value, change) like the totals on a till's Z-read, 36px apart with no dividers and a smaller 21px figure. It is the strip on the home page of Orbit Commerce's store dashboard. On phones it becomes two columns, with the label and the change on lines of their own."
3086
+ },
3087
+ {
3088
+ "id": "both-themes",
3089
+ "title": "In both themes",
3090
+ "text": "Default above, compact below. The line is Orbit teal with a soft glow in light, and mint in dark."
3091
+ },
3092
+ {
3093
+ "id": "loading",
3094
+ "title": "Loading",
3095
+ "text": "With loading, a shimmering pill stands in for each value and the change is held back, while labels and hints stay put so the row does not jump when the figures land."
3096
+ },
3097
+ {
3098
+ "id": "with-chart",
3099
+ "title": "With a chart: the performance strip",
3100
+ "text": "The pairing the component exists for, as it runs on the home. A Segmented control picks the range, the compact strip shows four figures as Rolling numbers (they roll when the range changes), and the Area chart below follows the selected figure. Change the range, then pick another figure."
3101
+ },
3102
+ {
3103
+ "id": "motion",
3104
+ "title": "Motion",
3105
+ "text": ""
3106
+ },
3107
+ {
3108
+ "id": "guidelines",
3109
+ "title": "Guidelines",
3110
+ "text": ""
3111
+ },
3112
+ {
3113
+ "id": "accessibility",
3114
+ "title": "Accessibility",
3115
+ "text": ""
3116
+ },
3117
+ {
3118
+ "id": "props",
3119
+ "title": "Props",
3120
+ "text": "Also accepts every native div attribute except onChange."
3121
+ }
3122
+ ]
3123
+ }
3124
+ ]
3125
+ }