@contui/ui 0.0.0-stage → 0.1.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.
- package/LICENSE +30 -0
- package/README.md +150 -2
- package/cli/contui.mjs +250 -0
- package/dist/charts/area-chart.d.ts +8 -0
- package/dist/charts/area-chart.js +9 -0
- package/dist/charts/bar-chart.d.ts +9 -0
- package/dist/charts/bar-chart.js +10 -0
- package/dist/charts/bubble-chart.d.ts +60 -0
- package/dist/charts/bubble-chart.js +392 -0
- package/dist/charts/bullet-chart.d.ts +53 -0
- package/dist/charts/bullet-chart.js +123 -0
- package/dist/charts/candlestick-chart.d.ts +77 -0
- package/dist/charts/candlestick-chart.js +558 -0
- package/dist/charts/cartesian.d.ts +121 -0
- package/dist/charts/cartesian.js +625 -0
- package/dist/charts/chart-card.d.ts +80 -0
- package/dist/charts/chart-card.js +114 -0
- package/dist/charts/donut-chart.d.ts +40 -0
- package/dist/charts/donut-chart.js +88 -0
- package/dist/charts/funnel-chart.d.ts +16 -0
- package/dist/charts/funnel-chart.js +164 -0
- package/dist/charts/horizontal-bar-chart.d.ts +67 -0
- package/dist/charts/horizontal-bar-chart.js +481 -0
- package/dist/charts/index.d.ts +21 -0
- package/dist/charts/index.js +32 -0
- package/dist/charts/legend.d.ts +23 -0
- package/dist/charts/legend.js +22 -0
- package/dist/charts/lib/candlestick-window.d.ts +15 -0
- package/dist/charts/lib/candlestick-window.js +23 -0
- package/dist/charts/lib/color.d.ts +39 -0
- package/dist/charts/lib/color.js +83 -0
- package/dist/charts/lib/format.d.ts +11 -0
- package/dist/charts/lib/format.js +33 -0
- package/dist/charts/lib/frame.d.ts +6 -0
- package/dist/charts/lib/frame.js +6 -0
- package/dist/charts/lib/layout.d.ts +11 -0
- package/dist/charts/lib/layout.js +71 -0
- package/dist/charts/lib/path.d.ts +35 -0
- package/dist/charts/lib/path.js +203 -0
- package/dist/charts/lib/scale.d.ts +41 -0
- package/dist/charts/lib/scale.js +80 -0
- package/dist/charts/lib/use-active.d.ts +18 -0
- package/dist/charts/lib/use-active.js +71 -0
- package/dist/charts/lib/use-size.d.ts +9 -0
- package/dist/charts/lib/use-size.js +40 -0
- package/dist/charts/line-chart.d.ts +7 -0
- package/dist/charts/line-chart.js +8 -0
- package/dist/charts/radar-chart.d.ts +27 -0
- package/dist/charts/radar-chart.js +165 -0
- package/dist/charts/rose-chart.d.ts +35 -0
- package/dist/charts/rose-chart.js +242 -0
- package/dist/charts/sparkline.d.ts +35 -0
- package/dist/charts/sparkline.js +110 -0
- package/dist/charts/tooltip.d.ts +35 -0
- package/dist/charts/tooltip.js +22 -0
- package/dist/charts/treemap.d.ts +28 -0
- package/dist/charts/treemap.js +103 -0
- package/dist/charts/uptime-strip.d.ts +40 -0
- package/dist/charts/uptime-strip.js +178 -0
- package/dist/components/accordion.d.ts +31 -0
- package/dist/components/accordion.js +34 -0
- package/dist/components/activity-item.d.ts +12 -0
- package/dist/components/activity-item.js +6 -0
- package/dist/components/alert.d.ts +21 -0
- package/dist/components/alert.js +58 -0
- package/dist/components/assistant-answer.d.ts +52 -0
- package/dist/components/assistant-answer.js +40 -0
- package/dist/components/assistant-prompt.d.ts +63 -0
- package/dist/components/assistant-prompt.js +122 -0
- package/dist/components/avatar.d.ts +28 -0
- package/dist/components/avatar.js +75 -0
- package/dist/components/badge.d.ts +16 -0
- package/dist/components/badge.js +33 -0
- package/dist/components/bar-list.d.ts +65 -0
- package/dist/components/bar-list.js +119 -0
- package/dist/components/block-slider.d.ts +43 -0
- package/dist/components/block-slider.js +63 -0
- package/dist/components/branch-graph.d.ts +87 -0
- package/dist/components/branch-graph.js +231 -0
- package/dist/components/breadcrumb.d.ts +41 -0
- package/dist/components/breadcrumb.js +53 -0
- package/dist/components/button.d.ts +23 -0
- package/dist/components/button.js +108 -0
- package/dist/components/calendar.d.ts +5 -0
- package/dist/components/calendar.js +90 -0
- package/dist/components/card.d.ts +65 -0
- package/dist/components/card.js +104 -0
- package/dist/components/chat-attachment.d.ts +47 -0
- package/dist/components/chat-attachment.js +63 -0
- package/dist/components/chat-event.d.ts +7 -0
- package/dist/components/chat-event.js +7 -0
- package/dist/components/chat-message.d.ts +59 -0
- package/dist/components/chat-message.js +91 -0
- package/dist/components/chat-reference.d.ts +20 -0
- package/dist/components/chat-reference.js +41 -0
- package/dist/components/chat-shared.d.ts +21 -0
- package/dist/components/chat-shared.js +23 -0
- package/dist/components/chat-suggestions.d.ts +59 -0
- package/dist/components/chat-suggestions.js +88 -0
- package/dist/components/chat-thread.d.ts +39 -0
- package/dist/components/chat-thread.js +172 -0
- package/dist/components/chat-typing.d.ts +35 -0
- package/dist/components/chat-typing.js +66 -0
- package/dist/components/checkbox.d.ts +18 -0
- package/dist/components/checkbox.js +33 -0
- package/dist/components/checklist.d.ts +26 -0
- package/dist/components/checklist.js +18 -0
- package/dist/components/chip.d.ts +29 -0
- package/dist/components/chip.js +61 -0
- package/dist/components/code-input.d.ts +40 -0
- package/dist/components/code-input.js +285 -0
- package/dist/components/color-picker.d.ts +38 -0
- package/dist/components/color-picker.js +855 -0
- package/dist/components/combobox.d.ts +75 -0
- package/dist/components/combobox.js +112 -0
- package/dist/components/command-menu.d.ts +58 -0
- package/dist/components/command-menu.js +166 -0
- package/dist/components/copy-button.d.ts +16 -0
- package/dist/components/copy-button.js +31 -0
- package/dist/components/data-grid.d.ts +50 -0
- package/dist/components/data-grid.js +599 -0
- package/dist/components/date-picker.d.ts +109 -0
- package/dist/components/date-picker.js +268 -0
- package/dist/components/description-list.d.ts +12 -0
- package/dist/components/description-list.js +10 -0
- package/dist/components/dialog.d.ts +57 -0
- package/dist/components/dialog.js +140 -0
- package/dist/components/dock.d.ts +45 -0
- package/dist/components/dock.js +79 -0
- package/dist/components/drop-zone.d.ts +46 -0
- package/dist/components/drop-zone.js +101 -0
- package/dist/components/dropdown-menu.d.ts +50 -0
- package/dist/components/dropdown-menu.js +78 -0
- package/dist/components/editable-cell.d.ts +34 -0
- package/dist/components/editable-cell.js +89 -0
- package/dist/components/empty-state.d.ts +17 -0
- package/dist/components/empty-state.js +9 -0
- package/dist/components/field.d.ts +43 -0
- package/dist/components/field.js +75 -0
- package/dist/components/filter-condition.d.ts +188 -0
- package/dist/components/filter-condition.js +113 -0
- package/dist/components/filter-menu.d.ts +57 -0
- package/dist/components/filter-menu.js +46 -0
- package/dist/components/header-bar.d.ts +84 -0
- package/dist/components/header-bar.js +94 -0
- package/dist/components/hold-button.d.ts +15 -0
- package/dist/components/hold-button.js +88 -0
- package/dist/components/icon-tile.d.ts +12 -0
- package/dist/components/icon-tile.js +29 -0
- package/dist/components/info-tip.d.ts +13 -0
- package/dist/components/info-tip.js +26 -0
- package/dist/components/input.d.ts +17 -0
- package/dist/components/input.js +83 -0
- package/dist/components/kbd.d.ts +6 -0
- package/dist/components/kbd.js +7 -0
- package/dist/components/menu-item.d.ts +56 -0
- package/dist/components/menu-item.js +94 -0
- package/dist/components/message-composer.d.ts +75 -0
- package/dist/components/message-composer.js +199 -0
- package/dist/components/nav-rail.d.ts +31 -0
- package/dist/components/nav-rail.js +85 -0
- package/dist/components/notice.d.ts +45 -0
- package/dist/components/notice.js +66 -0
- package/dist/components/optimistic-undo.d.ts +28 -0
- package/dist/components/optimistic-undo.js +43 -0
- package/dist/components/option-row.d.ts +15 -0
- package/dist/components/option-row.js +14 -0
- package/dist/components/page-content.d.ts +11 -0
- package/dist/components/page-content.js +31 -0
- package/dist/components/pagination.d.ts +34 -0
- package/dist/components/pagination.js +41 -0
- package/dist/components/popover.d.ts +27 -0
- package/dist/components/popover.js +25 -0
- package/dist/components/progress.d.ts +33 -0
- package/dist/components/progress.js +75 -0
- package/dist/components/radio-group.d.ts +7 -0
- package/dist/components/radio-group.js +33 -0
- package/dist/components/readonly-field.d.ts +33 -0
- package/dist/components/readonly-field.js +80 -0
- package/dist/components/segmented-control.d.ts +21 -0
- package/dist/components/segmented-control.js +108 -0
- package/dist/components/select.d.ts +42 -0
- package/dist/components/select.js +86 -0
- package/dist/components/separator.d.ts +10 -0
- package/dist/components/separator.js +7 -0
- package/dist/components/setting-row.d.ts +53 -0
- package/dist/components/setting-row.js +93 -0
- package/dist/components/sidebar-switcher.d.ts +47 -0
- package/dist/components/sidebar-switcher.js +20 -0
- package/dist/components/sidebar.d.ts +220 -0
- package/dist/components/sidebar.js +327 -0
- package/dist/components/skeleton.d.ts +18 -0
- package/dist/components/skeleton.js +23 -0
- package/dist/components/slider.d.ts +15 -0
- package/dist/components/slider.js +28 -0
- package/dist/components/spinner.d.ts +14 -0
- package/dist/components/spinner.js +19 -0
- package/dist/components/status-dot.d.ts +24 -0
- package/dist/components/status-dot.js +35 -0
- package/dist/components/stepper.d.ts +60 -0
- package/dist/components/stepper.js +197 -0
- package/dist/components/switch.d.ts +9 -0
- package/dist/components/switch.js +26 -0
- package/dist/components/table-cell.d.ts +38 -0
- package/dist/components/table-cell.js +107 -0
- package/dist/components/table-context.d.ts +48 -0
- package/dist/components/table-context.js +69 -0
- package/dist/components/table-head.d.ts +42 -0
- package/dist/components/table-head.js +188 -0
- package/dist/components/table-tree.d.ts +96 -0
- package/dist/components/table-tree.js +137 -0
- package/dist/components/table.d.ts +78 -0
- package/dist/components/table.js +119 -0
- package/dist/components/tabs.d.ts +27 -0
- package/dist/components/tabs.js +79 -0
- package/dist/components/textarea.d.ts +3 -0
- package/dist/components/textarea.js +20 -0
- package/dist/components/theme.d.ts +41 -0
- package/dist/components/theme.js +60 -0
- package/dist/components/thinking.d.ts +68 -0
- package/dist/components/thinking.js +94 -0
- package/dist/components/toast.d.ts +39 -0
- package/dist/components/toast.js +110 -0
- package/dist/components/toolbar.d.ts +25 -0
- package/dist/components/toolbar.js +92 -0
- package/dist/components/tooltip.d.ts +23 -0
- package/dist/components/tooltip.js +27 -0
- package/dist/components/top-nav.d.ts +129 -0
- package/dist/components/top-nav.js +211 -0
- package/dist/components/truncate.d.ts +29 -0
- package/dist/components/truncate.js +138 -0
- package/dist/deprecated.d.ts +43 -0
- package/dist/deprecated.js +47 -0
- package/dist/index.d.ts +93 -0
- package/dist/index.js +93 -0
- package/dist/lib/cn.d.ts +5 -0
- package/dist/lib/cn.js +14 -0
- package/dist/lib/color.d.ts +136 -0
- package/dist/lib/color.js +307 -0
- package/dist/lib/contrast.d.ts +53 -0
- package/dist/lib/contrast.js +169 -0
- package/dist/lib/create-theme.d.ts +240 -0
- package/dist/lib/create-theme.js +461 -0
- package/dist/lib/harmony.d.ts +102 -0
- package/dist/lib/harmony.js +426 -0
- package/dist/lib/import-theme.d.ts +22 -0
- package/dist/lib/import-theme.js +221 -0
- package/dist/lib/overflow-scroll.d.ts +25 -0
- package/dist/lib/overflow-scroll.js +66 -0
- package/dist/lib/radio-toggle-render.d.ts +3 -0
- package/dist/lib/radio-toggle-render.js +9 -0
- package/dist/lib/reorder.d.ts +38 -0
- package/dist/lib/reorder.js +193 -0
- package/dist/lib/spacing.d.ts +101 -0
- package/dist/lib/spacing.js +118 -0
- package/dist/lib/tailwind-palette.d.ts +5 -0
- package/dist/lib/tailwind-palette.js +351 -0
- package/dist/lib/truncate.d.ts +18 -0
- package/dist/lib/truncate.js +69 -0
- package/dist/lib/use-single-value.d.ts +5 -0
- package/dist/lib/use-single-value.js +17 -0
- package/dist/styles.css +7988 -0
- package/mcp/server.mjs +87590 -0
- package/package.json +58 -5
- package/skills/continuum-fix-padding/SKILL.md +69 -0
- package/skills/continuum-fix-padding/scripts/compute.ts +155 -0
- package/skills/continuum-fix-padding/scripts/spacing.ts +189 -0
- package/skills/continuum-taste/SKILL.md +186 -0
- package/skills/continuum-taste/assets/tokens.css +647 -0
- package/skills/continuum-taste/references/charts.md +375 -0
- package/skills/continuum-taste/references/components.md +1369 -0
- package/skills/continuum-taste/references/foundations.md +539 -0
- package/skills/continuum-taste/references/media/canvas.md +75 -0
- package/skills/continuum-taste/references/media/css.md +61 -0
- package/skills/continuum-taste/references/media/react.md +161 -0
- package/skills/continuum-taste/references/method.md +87 -0
- package/skills/continuum-taste/references/pages.md +391 -0
- package/skills/continuum-taste/references/patterns.md +77 -0
- package/skills/continuum-taste/references/screens/agent.tsx +450 -0
- package/skills/continuum-taste/references/screens/analytics-overview.tsx +377 -0
- package/skills/continuum-taste/references/screens/checkout-funnel.tsx +193 -0
- package/skills/continuum-taste/references/screens/customer.tsx +475 -0
- package/skills/continuum-taste/references/screens/customers.tsx +608 -0
- package/skills/continuum-taste/references/screens/index.tsx +72 -0
- package/skills/continuum-taste/references/screens/invoice-editor.tsx +558 -0
- package/skills/continuum-taste/references/screens/new-customer.tsx +205 -0
- package/skills/continuum-taste/references/screens/overview.tsx +196 -0
- package/skills/continuum-taste/references/screens/report-generator.tsx +329 -0
- package/skills/continuum-taste/references/screens/risk-report.tsx +577 -0
- package/skills/continuum-taste/references/screens/sequence-editor.tsx +455 -0
- package/skills/continuum-taste/references/screens/settings.tsx +288 -0
- package/skills/continuum-taste/references/screens/shared.tsx +204 -0
- package/skills/continuum-taste/references/screens/sign-in.tsx +104 -0
- package/skills/continuum-taste/references/screens/workspace.tsx +596 -0
- package/skills/continuum-taste/references/theming.md +95 -0
- package/src/charts/area-chart.tsx +17 -0
- package/src/charts/bar-chart.tsx +15 -0
- package/src/charts/bubble-chart.tsx +913 -0
- package/src/charts/bullet-chart.tsx +419 -0
- package/src/charts/candlestick-chart.tsx +1242 -0
- package/src/charts/cartesian.tsx +1437 -0
- package/src/charts/chart-card.tsx +394 -0
- package/src/charts/donut-chart.tsx +299 -0
- package/src/charts/funnel-chart.tsx +373 -0
- package/src/charts/horizontal-bar-chart.tsx +991 -0
- package/src/charts/index.ts +76 -0
- package/src/charts/legend.tsx +59 -0
- package/src/charts/lib/candlestick-window.ts +42 -0
- package/src/charts/lib/color.ts +110 -0
- package/src/charts/lib/format.ts +42 -0
- package/src/charts/lib/frame.ts +6 -0
- package/src/charts/lib/layout.ts +78 -0
- package/src/charts/lib/path.ts +225 -0
- package/src/charts/lib/scale.ts +91 -0
- package/src/charts/lib/use-active.ts +87 -0
- package/src/charts/lib/use-size.ts +45 -0
- package/src/charts/line-chart.tsx +16 -0
- package/src/charts/radar-chart.tsx +485 -0
- package/src/charts/rose-chart.tsx +553 -0
- package/src/charts/sparkline.tsx +293 -0
- package/src/charts/tooltip.tsx +105 -0
- package/src/charts/treemap.tsx +271 -0
- package/src/charts/uptime-strip.tsx +469 -0
- package/src/components/accordion.tsx +136 -0
- package/src/components/activity-item.tsx +43 -0
- package/src/components/alert.tsx +135 -0
- package/src/components/assistant-answer.tsx +185 -0
- package/src/components/assistant-prompt.tsx +352 -0
- package/src/components/avatar.tsx +157 -0
- package/src/components/badge.tsx +55 -0
- package/src/components/bar-list.tsx +350 -0
- package/src/components/block-slider.tsx +189 -0
- package/src/components/branch-graph.tsx +580 -0
- package/src/components/breadcrumb.tsx +173 -0
- package/src/components/button.tsx +157 -0
- package/src/components/calendar.tsx +154 -0
- package/src/components/card.tsx +296 -0
- package/src/components/chat-attachment.tsx +255 -0
- package/src/components/chat-event.tsx +34 -0
- package/src/components/chat-message.tsx +332 -0
- package/src/components/chat-reference.tsx +100 -0
- package/src/components/chat-shared.ts +41 -0
- package/src/components/chat-suggestions.tsx +188 -0
- package/src/components/chat-thread.tsx +348 -0
- package/src/components/chat-typing.tsx +155 -0
- package/src/components/checkbox.tsx +83 -0
- package/src/components/checklist.tsx +146 -0
- package/src/components/chip.tsx +152 -0
- package/src/components/code-input.tsx +406 -0
- package/src/components/color-picker.tsx +1385 -0
- package/src/components/combobox.tsx +420 -0
- package/src/components/command-menu.tsx +405 -0
- package/src/components/copy-button.tsx +87 -0
- package/src/components/data-grid.tsx +965 -0
- package/src/components/date-picker.tsx +652 -0
- package/src/components/description-list.tsx +39 -0
- package/src/components/dialog.tsx +367 -0
- package/src/components/dock.tsx +192 -0
- package/src/components/drop-zone.tsx +283 -0
- package/src/components/dropdown-menu.tsx +323 -0
- package/src/components/editable-cell.tsx +219 -0
- package/src/components/empty-state.tsx +50 -0
- package/src/components/field.tsx +148 -0
- package/src/components/filter-condition.tsx +463 -0
- package/src/components/filter-menu.tsx +196 -0
- package/src/components/header-bar.tsx +220 -0
- package/src/components/hold-button.tsx +146 -0
- package/src/components/icon-tile.tsx +43 -0
- package/src/components/info-tip.tsx +87 -0
- package/src/components/input.tsx +136 -0
- package/src/components/kbd.tsx +17 -0
- package/src/components/menu-item.tsx +216 -0
- package/src/components/message-composer.tsx +458 -0
- package/src/components/nav-rail.tsx +235 -0
- package/src/components/notice.tsx +133 -0
- package/src/components/optimistic-undo.ts +68 -0
- package/src/components/option-row.tsx +54 -0
- package/src/components/page-content.tsx +44 -0
- package/src/components/pagination.tsx +182 -0
- package/src/components/popover.tsx +113 -0
- package/src/components/progress.tsx +222 -0
- package/src/components/radio-group.tsx +80 -0
- package/src/components/readonly-field.tsx +251 -0
- package/src/components/segmented-control.tsx +205 -0
- package/src/components/select.tsx +259 -0
- package/src/components/separator.tsx +30 -0
- package/src/components/setting-row.tsx +277 -0
- package/src/components/sidebar-switcher.tsx +134 -0
- package/src/components/sidebar.tsx +804 -0
- package/src/components/skeleton.tsx +57 -0
- package/src/components/slider.tsx +106 -0
- package/src/components/spinner.tsx +43 -0
- package/src/components/status-dot.tsx +100 -0
- package/src/components/stepper.tsx +459 -0
- package/src/components/switch.tsx +54 -0
- package/src/components/table-cell.tsx +239 -0
- package/src/components/table-context.ts +135 -0
- package/src/components/table-head.tsx +393 -0
- package/src/components/table-tree.tsx +357 -0
- package/src/components/table.tsx +295 -0
- package/src/components/tabs.tsx +191 -0
- package/src/components/textarea.tsx +44 -0
- package/src/components/theme.tsx +120 -0
- package/src/components/thinking.tsx +295 -0
- package/src/components/toast.tsx +308 -0
- package/src/components/toolbar.tsx +166 -0
- package/src/components/tooltip.tsx +84 -0
- package/src/components/top-nav.tsx +660 -0
- package/src/components/truncate.tsx +234 -0
- package/src/deprecated.ts +61 -0
- package/src/index.ts +184 -0
- package/src/lib/cn.ts +22 -0
- package/src/lib/color.ts +469 -0
- package/src/lib/contrast.ts +220 -0
- package/src/lib/create-theme.ts +659 -0
- package/src/lib/harmony.ts +609 -0
- package/src/lib/import-theme.ts +272 -0
- package/src/lib/overflow-scroll.tsx +108 -0
- package/src/lib/radio-toggle-render.tsx +15 -0
- package/src/lib/reorder.ts +222 -0
- package/src/lib/spacing.ts +189 -0
- package/src/lib/tailwind-palette.ts +355 -0
- package/src/lib/truncate.ts +79 -0
- package/src/lib/use-single-value.ts +23 -0
- package/src/styles/continuum.css +3 -0
- package/src/styles/theme.css +524 -0
- package/src/styles/tokens.css +647 -0
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
# Pages
|
|
2
|
+
|
|
3
|
+
How a Continuum screen is put together: the shell around it, the column it sits in, and the anatomy of each
|
|
4
|
+
kind of page, top to bottom, in units. A page is one of seven kinds, and the kind decides its width, its parts and
|
|
5
|
+
where its actions go. Values here are the system's; `foundations.md` has the colours, type and spacing they are
|
|
6
|
+
drawn from.
|
|
7
|
+
|
|
8
|
+
## The shell
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
canvas (neutral-100)
|
|
12
|
+
├── sidebar 256 wide, straight on the canvas, no fill, no border; its own 8–12 of inset keeps items off the panel
|
|
13
|
+
└── panel 8 from the canvas at the top, right and bottom, flush with the sidebar · panel corners (20) · hairline · surface
|
|
14
|
+
├── header bar 54 high · hairline below · breadcrumb left (16 in) · at most two actions right (8 in)
|
|
15
|
+
├── the page a centred column (below), starting 64 below the header bar's hairline
|
|
16
|
+
└── floating dock, when the page has views: centred, 24 above the panel's bottom edge
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
**Sidebar.** Header 56 high: the product's mark left (a 26 mark, no name), the collapse toggle right; the
|
|
20
|
+
workspace's name lives in the footer account, over its plan. A product with several workspaces or projects
|
|
21
|
+
puts a **SidebarSwitcher** under the header (the current one's mark, name over a quiet line, a menu of the
|
|
22
|
+
others), or makes the footer account one; the breadcrumb's menu stays for switching siblings deeper in the
|
|
23
|
+
trail. Then the main places as sidebar items (`SidebarItem`):
|
|
24
|
+
34 high, 10 side padding, 8 between icon (14) and label, `item` corners (10), 13 regular `neutral-950`, 2 apart;
|
|
25
|
+
the current one takes the selected wash (7%); at the right, a trailing `Kbd` only when the place has a shortcut,
|
|
26
|
+
a count badge only when things wait for the reader there (a review queue); a count on a group label or a folding section is the same badge. Groups are 24
|
|
27
|
+
apart, each under a label of 13 regular `neutral-600` with 10 side and 4 vertical padding; a labelled group's
|
|
28
|
+
items are plain sidebar items at 13 with their icons. A **project or collection** (a SidebarSection row, 14
|
|
29
|
+
`neutral-700`) folds open to its pages as `inset` items (the label 32 in, no icon, 14 `neutral-700`,
|
|
30
|
+
`neutral-950` when current); the 14 and the indent belong to that pair only. A place with a long index of its
|
|
31
|
+
own (a docs site's components, a settings tree) drills down into a level of its own, under a back row with its
|
|
32
|
+
name, rather than lengthening the top level. The footer holds the account
|
|
33
|
+
(avatar, name over plan) at the very bottom with 16 above, 24 below. **The sidebar holds places, not a create
|
|
34
|
+
button**: the page that creates owns its create action.
|
|
35
|
+
|
|
36
|
+
The sidebar is the shell unless one of the two below fits better.
|
|
37
|
+
|
|
38
|
+
**Top nav**, instead of a sidebar **when the app's sections fit along one bar and none needs a long index of
|
|
39
|
+
its own**, so the page keeps the full width: the top of the page, not a bar over a panel. A 56 bar across the
|
|
40
|
+
shell on the surface, a hairline under it, the page straight under it on the same surface (no canvas, no inset
|
|
41
|
+
panel). The bar's row keeps to the page's column, so the brand (14 medium) starts over the page's title; then a
|
|
42
|
+
workspace switcher if there is one, links 34 high with 12 side padding, 13 `neutral-600` (`neutral-950` when
|
|
43
|
+
current), and the account at the right end. It holds what a sidebar holds: a place's count
|
|
44
|
+
sits after its label, a section with pages of its own opens a menu of them (its groups headed inside it), and
|
|
45
|
+
the section that holds the page takes the current look. Links that overflow scroll, with chevrons.
|
|
46
|
+
|
|
47
|
+
**NavRail**, **when the app wants the navigation out of the way and its places need not be read at a glance**: a
|
|
48
|
+
floating pill 52 wide (208 expanded), 8 padding, icon-only items of 34 named in tooltips; the current item sits
|
|
49
|
+
on one action-coloured pill that slides between items. Not for an app that must work on a phone.
|
|
50
|
+
|
|
51
|
+
**Header bar.** 54 high, hairline below, the breadcrumb at the left (home icon › … › the page, 13, the page in
|
|
52
|
+
`neutral-950`, the rest `neutral-600`), and at the right, **only when an action belongs to the page as a
|
|
53
|
+
whole** (a history toggle, a notice), one or two of them at most; otherwise the right stays empty. **Every page
|
|
54
|
+
has its breadcrumb**, from home down to itself. A back and
|
|
55
|
+
forward pair, when there is no router, sits at the far left, ruled off full height.
|
|
56
|
+
|
|
57
|
+
**The floating dock**, **only when the page has views to switch** (a list's views, an editor's facets, sibling
|
|
58
|
+
settings pages); a page with nothing to switch has no dock, and its primary stays in the title row. Centred
|
|
59
|
+
over the page's foot, 24 above the panel's bottom edge: 38 high outside, a
|
|
60
|
+
hairline, the surface colour, `dock` corners (a pill), the `float` shadow. Inside, items of 32 high sitting 3
|
|
61
|
+
from the outer edge (the hairline plus 2), 12 side padding, 13 medium `neutral-600`, 2 apart; the selected one
|
|
62
|
+
is filled with the action colour and `on-action` text. A count
|
|
63
|
+
trails a label only when the view is a set of things to count (a list's Drafts, not a Settings facet), in the
|
|
64
|
+
same size, `neutral-600` (`on-action` at 70% on the selected item). Beside the dock, **when the page has a
|
|
65
|
+
primary action**, that action as a **dock action**: a 38 pill in the action colour; a page without one (sibling
|
|
66
|
+
settings pages) has the dock alone. The page's column gets 96 of bottom
|
|
67
|
+
padding so the last row scrolls clear of the dock. When rows are selected, a floating toolbar of the bulk actions
|
|
68
|
+
takes the dock's place.
|
|
69
|
+
|
|
70
|
+
## The column
|
|
71
|
+
|
|
72
|
+
Content sits in a centred column and never runs to the panel's edges. Width follows density, not the screen;
|
|
73
|
+
pick the narrowest that fits:
|
|
74
|
+
|
|
75
|
+
| Kind of page | Width |
|
|
76
|
+
| --------------------------------------------------------------- | --------- |
|
|
77
|
+
| Create or edit one object, its fields stacked; settings | `narrow` 640 |
|
|
78
|
+
| Overview, detail, document | `default` 896 |
|
|
79
|
+
| An index: a list or table with several columns | `wide` 1080 |
|
|
80
|
+
| A very dense table | `dense` 1280 |
|
|
81
|
+
| Several dense tables side by side (`inset`: the panel less 64 a side, 128 on a large screen) | `inset` |
|
|
82
|
+
| Only when explicitly asked for: the panel edge to edge | `full` |
|
|
83
|
+
|
|
84
|
+
Below its width the column takes the panel less 16 a side (24 from a 640 screen; 16 again in a compact shell). A
|
|
85
|
+
form is never wider than 640 whatever the screen; an overview with cards and charts is not dense and stays 896.
|
|
86
|
+
|
|
87
|
+
## The page head
|
|
88
|
+
|
|
89
|
+
The title row every page starts with:
|
|
90
|
+
|
|
91
|
+
- **Title** 24 medium `neutral-950`; under it one **description line** 14 regular `neutral-600`, 6 below.
|
|
92
|
+
- At the right, **only what acts on the whole page**, bottom-aligned with the description, 8 apart: on an
|
|
93
|
+
index a secondary the list has (Export) and the primary (when there are no views; otherwise the primary is
|
|
94
|
+
in the dock); on an overview a period picker or filter that changes everything below; on a detail the
|
|
95
|
+
actions the object has. A page with none has a title and a line, and that is the head.
|
|
96
|
+
- Between the head and what follows, the **block gap** of the spacing formula (`foundations.md`, worked out by
|
|
97
|
+
`/continuum-fix-padding` or `get_spacing`): each side claims room by what it holds and the gap is the sum,
|
|
98
|
+
so a bare title over a short settings card gets about 32, a head with its line over a settings card about
|
|
99
|
+
48, and a head with its line over a dense table about 64. Never a fixed number.
|
|
100
|
+
|
|
101
|
+
## A section
|
|
102
|
+
|
|
103
|
+
- **Title** 16 medium `neutral-950`; under it, **only when it says something the title does not**, one or two
|
|
104
|
+
sentences 13 regular `neutral-600`, no wider than 500, 4 below the title.
|
|
105
|
+
- At the right of the title block, **only when the section has an action of its own**: a secondary button
|
|
106
|
+
when it does something to the section ("Add seats"), a ghost link when it leads to the rest of it ("Full
|
|
107
|
+
history").
|
|
108
|
+
- **20** between the section head and its content.
|
|
109
|
+
- Sections are apart by the **block gap** (each claims room by what it holds, about 32 to 64) and never
|
|
110
|
+
divided by a line. A long document's sections are 64 apart.
|
|
111
|
+
- **One way per page.** Every section on a page puts its title the same way: all as a section head over its
|
|
112
|
+
content, or all as the title inside their card. Never a section title over one block beside a card that
|
|
113
|
+
carries its own.
|
|
114
|
+
|
|
115
|
+
## The side panel
|
|
116
|
+
|
|
117
|
+
**Only for what stays in view while the main column is worked or changes**: the settings of what is selected
|
|
118
|
+
in an editor, the summary and steps of a flow that hold through each of its steps (what it costs, where it is),
|
|
119
|
+
a record's details while its tabs change, a queue waiting on the reader. A static panel at the panel's right
|
|
120
|
+
edge, never a second column of cards inside the page's column. What is read once, in order, stays in the
|
|
121
|
+
column. Most pages have none; no page has two.
|
|
122
|
+
|
|
123
|
+
- Fixed at **360** wide, the full height under the header bar, apart from the main area by a **full-height
|
|
124
|
+
hairline**; it scrolls on its own and the page's column stays centred in what is left.
|
|
125
|
+
- Inside, its sections are stacked and **split by full-width hairlines**, no cards: each 20 padding, a title 13
|
|
126
|
+
medium `neutral-950` with its count 13 `neutral-600` after it, its rows 12 below and 12 apart.
|
|
127
|
+
- Below 1280 it leaves the right edge and its sections come under the main column, in the same order.
|
|
128
|
+
|
|
129
|
+
## The page kinds
|
|
130
|
+
|
|
131
|
+
A kind's parts are listed in the order they sit, top to bottom. **An anatomy is what the page may hold, not a
|
|
132
|
+
list to fill.** A part marked *always* is what makes the page that kind; every other part says **when** it
|
|
133
|
+
earns its place. When that is not the case on this page, leave the part out and close the gap: a page with
|
|
134
|
+
fewer parts, each doing something, is the better page.
|
|
135
|
+
|
|
136
|
+
Before placing a part, say what the reader does with it here. A control must change something the reader can
|
|
137
|
+
see. A number must be one the reader came for. A part whose only reason is "the anatomy has one" does not
|
|
138
|
+
belong, and neither does one copied from a reference screen whose product needed it.
|
|
139
|
+
|
|
140
|
+
### Overview (`default`, 896)
|
|
141
|
+
|
|
142
|
+
Reads how things are going over one period; it holds no create action.
|
|
143
|
+
|
|
144
|
+
1. **The page head**, always: the title and a line. At its right, a control only **when it changes everything
|
|
145
|
+
below it**: the period picker (a 34 select or date-range picker) when the reader can pick the period the
|
|
146
|
+
figures are measured over, a filter when the whole page can be narrowed. A page on one fixed period says so
|
|
147
|
+
in its line ("The last 30 days") and has no picker.
|
|
148
|
+
2. **Stat cards**, **when the page has figures the reader comes for besides the leading one**, two to four of
|
|
149
|
+
them, first, the block gap under the head, built as Key figures (`patterns.md`). Read first because they
|
|
150
|
+
answer "how are we doing" at a glance. Never added to fill the row: three that matter beat four.
|
|
151
|
+
3. **The figure that leads**, always, as a chart card full width under the stat cards (its anatomy in
|
|
152
|
+
`charts.md`): the measure the page is about over the period, its figure and change in the card's head,
|
|
153
|
+
the chart under it. With no stat cards it follows the head.
|
|
154
|
+
4. **Breakdowns**, **when the reader's next question is "from where" or "what moved"**: what answers it (a
|
|
155
|
+
ranked bar list, a short table, an activity list), each a section of its own. A page whose leading figure
|
|
156
|
+
has no parts to break into ends at the chart.
|
|
157
|
+
|
|
158
|
+
### Index (`wide`, 1080; `dense` only for a very dense table)
|
|
159
|
+
|
|
160
|
+
Finds one thing among many and opens it. **A row opens the item's own page**, with the breadcrumb back; never
|
|
161
|
+
a pane beside the list, and never the item's editor in a sheet.
|
|
162
|
+
|
|
163
|
+
1. **The page head**, always: the title and a line on what the list holds ("The companies on a plan or a trial,
|
|
164
|
+
and the ones that have left"). At its right, only what acts on
|
|
165
|
+
the whole list: a secondary action **when the list has one** (Export), and the primary (New customer)
|
|
166
|
+
**when items are made here and the list has no views**; with views it is the dock action. A list nobody
|
|
167
|
+
adds to by hand has no primary.
|
|
168
|
+
2. **The toolbar**, **when the list is too long to read whole**: the table's own top bar, inside its frame
|
|
169
|
+
(`TableToolbar`), holding only what the reader finds and narrows by, 12 apart. It never moves as filters
|
|
170
|
+
change. A list that fits on a screen has
|
|
171
|
+
no toolbar.
|
|
172
|
+
- **Search** (a 34 input, 256 wide, a leading search icon), always in a toolbar: readers type a name, a
|
|
173
|
+
number or a word they remember. Left out only when the items have nothing to type (a list of dates, of
|
|
174
|
+
colours).
|
|
175
|
+
- **A filter per attribute the reader narrows by**, and none for a column that is only there to be read:
|
|
176
|
+
a segmented control for one of a few values that should stay visible; a 34 select for the one or two
|
|
177
|
+
attributes of many values that are always at hand; a **Filter** button (secondary, 34, a filter icon, a
|
|
178
|
+
count once filters apply) for several groups of values, opening them as grouped checkbox values with
|
|
179
|
+
"Clear all" at its foot.
|
|
180
|
+
3. **Applied filters**, only when there are any, in a row under the toolbar, still inside the table's frame: one soft chip per group (24 high, 8 side,
|
|
181
|
+
13, `pill` corners, the `neutral-100` fill and no border, `neutral-600` text, a 12 × at its end: "Channel is
|
|
182
|
+
Online store or Wholesale"), wrapping to more lines if needed, and a ghost "Clear all" at the end.
|
|
183
|
+
4. **The table**, always, the block gap below the head: ruled, in its frame (`control` corners, the hairline,
|
|
184
|
+
the surface). Head 41
|
|
185
|
+
high, `neutral-100` fill, 13 regular `neutral-600`, 12 padding. Rows 41 high, 12 padding, a hairline
|
|
186
|
+
between rows, the first column (the name) 13 medium `neutral-900`, meta columns `neutral-700`, numbers
|
|
187
|
+
tabular and right-aligned, status as a badge, people as a 24 avatar with the name. Hover 3% wash; a
|
|
188
|
+
selected row the 7% wash. A row with a second line of meta (an address, a domain) is 54 high. Its columns
|
|
189
|
+
are the product's; two more are choices:
|
|
190
|
+
- **a last column** (44 wide) with a ghost ellipsis button that opens the row's menu, only when a row has
|
|
191
|
+
actions of its own;
|
|
192
|
+
- **a checkbox column** (20 boxes), only when rows can be acted on together: a selection needs its bulk
|
|
193
|
+
actions.
|
|
194
|
+
5. **Pagination**, **when the list runs past one page**, 16 below the table: "Showing 1–10 of 48" (13/500
|
|
195
|
+
`neutral-800`) left, the pages centred (previous, numbers with an ellipsis, next: 34 × 34 hairline buttons,
|
|
196
|
+
8 apart, the row never changing width), an optional slot right. A list on one page has none.
|
|
197
|
+
6. **The views**, **when the same list is cut into a few standing sets the reader moves between** (All ·
|
|
198
|
+
Active · Trial · Past due, with counts): in the **floating dock**, beside the page's one primary action as
|
|
199
|
+
a dock action. Views in the dock, not above the table as tabs. A list with one view has no dock, and its
|
|
200
|
+
primary stays in the head.
|
|
201
|
+
7. **Empty**, in the table's place: a left-aligned dashed panel with what goes here, one sentence and one
|
|
202
|
+
secondary button; a filter that matched nothing offers to clear it.
|
|
203
|
+
|
|
204
|
+
### Detail (`default`, 896)
|
|
205
|
+
|
|
206
|
+
Everything about one record (a customer, an invoice, a project, a run in progress), stacked in the order the
|
|
207
|
+
reader asks for it; history and comments go in a sheet. When the record has facets and its details are wanted
|
|
208
|
+
whichever one is open, the details move to the side panel and stay there while the facets change.
|
|
209
|
+
|
|
210
|
+
1. **Title row**, always: the object's avatar or icon tile (36) left, 16 from the text; the name 24 medium with
|
|
211
|
+
its status badge beside it (8 apart); a meta line 14 `neutral-600` 4 below ("northwind.com · A customer
|
|
212
|
+
since March 2023"). At the right, top-aligned, 8 apart: the actions the object has, a secondary, the
|
|
213
|
+
primary, and a ghost icon button (ellipsis) with the rest; none where the object has none.
|
|
214
|
+
2. **Facets**, **when the object has two or more views of itself, each with content of its own** (Overview ·
|
|
215
|
+
Invoices · Contacts); an object with one view has none. Where they sit follows how the page is used:
|
|
216
|
+
- **line tabs**, 40 below the title row, on their own hairline, the active one underlined (the spec is in
|
|
217
|
+
`components.md`; a count may trail a label), when the page is short enough that they stay in sight;
|
|
218
|
+
- **the floating dock**, when the page is long or is worked in like an editor, so the facets stay within
|
|
219
|
+
reach while it scrolls. The object's primary action then sits beside them as the dock action, and not
|
|
220
|
+
also in the title row.
|
|
221
|
+
|
|
222
|
+
Pill tabs are for a tight spot inside a card or a dialog.
|
|
223
|
+
3. **Numbers**, **when the object's figures are what the reader opens it for** (an account's revenue, a
|
|
224
|
+
cycle's progress, how long a run has taken): up to three stat cards, built as Key figures (`patterns.md`),
|
|
225
|
+
and under them, when one of those figures is read over time, its chart card. A fact that happens to be a
|
|
226
|
+
number (a seat count, a plan's price) goes with the facts instead.
|
|
227
|
+
4. **Facts**, when the object has attributes to look up: label and value rows (Key–value facts, `patterns.md`)
|
|
228
|
+
in one list card titled "Details" (13 regular `neutral-600`), or in the side panel when the page has one.
|
|
229
|
+
Several groups of facts (billing, the contract, the account owner) are titled groups of that one list, never a card each
|
|
230
|
+
built alike.
|
|
231
|
+
5. The rest, each a list card or a section, each only when the object has it: usage meters, the people or
|
|
232
|
+
things that are part of it, recent activity (with "Full history" opening the sheet), related tables.
|
|
233
|
+
|
|
234
|
+
### Create or edit one object (`narrow`, 640)
|
|
235
|
+
|
|
236
|
+
Makes or changes one thing, its fields stacked. A form of two or three fields is not a page: it is a 480
|
|
237
|
+
dialog over the page it came from.
|
|
238
|
+
|
|
239
|
+
1. **The page head**, always: "New customer", one line on what gets made.
|
|
240
|
+
2. **Sections**, **when the fields fall into more than one group**: 40 apart, each a section head (title;
|
|
241
|
+
description only when it helps) with its fields 20 below. One group of fields needs no section head: the
|
|
242
|
+
page head names it.
|
|
243
|
+
3. **Fields**, always, one per row, 20 apart: a label 13 medium `neutral-900`, the control 8 below (the one
|
|
244
|
+
that fits the value, by `components.md`: a medium input or select, 38 high; a textarea; a date picker), a
|
|
245
|
+
helper line 13 `neutral-600` 8 below when the field needs one. Two short fields that belong together (city
|
|
246
|
+
and postcode) may share a row, 12 apart; otherwise one per row.
|
|
247
|
+
4. **Actions**, always, at the end, right-aligned, 8 apart: a secondary "Cancel" and the one primary, verb
|
|
248
|
+
plus object ("Create customer"). While editing an existing object, the commit action moves up: into the
|
|
249
|
+
floating dock as a dock action when the editor has facets to switch (they are views in the dock),
|
|
250
|
+
otherwise into the title row. Either way the save state shows as a notice in the header bar.
|
|
251
|
+
5. **A stepper**, **only when the form is long**: over its sections (horizontal above, or vertical beside a
|
|
252
|
+
long one), Back and Continue at the end. A form that fits one page of sections has none.
|
|
253
|
+
|
|
254
|
+
### Settings (`narrow`, 640): as small as it goes
|
|
255
|
+
|
|
256
|
+
1. **The page head**, always: the area's name ("Workspace", "Notifications"), one line.
|
|
257
|
+
2. **One list card per group**, always, the cards stacked 24 apart: 20 padding, a quiet group title (13 regular
|
|
258
|
+
`neutral-600`) 12 above the settings. Inside, the settings take one of two layouts, by what the group holds
|
|
259
|
+
(once the content is grouped, step 4 of building):
|
|
260
|
+
- **Ruled**, the default, for a group of plain settings: the settings **24, a hairline and 24 apart** at the
|
|
261
|
+
card's content width (the one place on a page where rows are ruled: the card is a bordered list).
|
|
262
|
+
- **Boxed**, when the group's settings carry dependents that must hold together with them: each setting
|
|
263
|
+
with its dependents a **bordered box** of its own (16 padding, `control` corners, the hairline), the
|
|
264
|
+
boxes **8 apart** and no hairlines between them. The one container allowed inside a card besides the plan
|
|
265
|
+
in force: it is what makes a setting with several dependents read as one.
|
|
266
|
+
When a group falls into two or more kinds of settings (updates and exceptions, levels and reports), each
|
|
267
|
+
kind goes under a **sub-category title** (14 medium `neutral-950`, 12 above its settings), the kinds 32
|
|
268
|
+
and a hairline apart when ruled, 24 apart when boxed. A group too long for one card **splits**: the group
|
|
269
|
+
becomes a section (16 medium title, 20 above its cards), each kind a card of its own; sections 48 apart.
|
|
270
|
+
3. **A setting row**, for each thing that is switched, picked or done: the title 13 medium `neutral-950` over
|
|
271
|
+
its description 13 regular `neutral-600` (2 between), the control at the right, the row at least 38 high.
|
|
272
|
+
**One control per setting**, chosen by what the setting is: a **switch** when it turns a thing on; a
|
|
273
|
+
**picker** (a 34 select with the value and a right chevron: "Select ›", "After a day ›") when it sets a
|
|
274
|
+
value; a **secondary button** when it does a thing ("Add seats").
|
|
275
|
+
4. **A dependent setting**, one that only means something while another is on, sits with the setting it
|
|
276
|
+
depends on and is dimmed (50%) while that one is off. **Ruled**: between the same two hairlines, **12 below
|
|
277
|
+
it** (against 24 and a hairline between settings), **stepped in behind a 1px `neutral-200` guide line** (4
|
|
278
|
+
from the content's edge, its text 16 past the line). **Boxed**: a plain row in the setting's box, the box
|
|
279
|
+
already holding them together: the dependents **20 under the setting and 12 apart**, a group of their own.
|
|
280
|
+
When a parent has several dependents, a small eyebrow over them (13 regular `neutral-600`) names what they
|
|
281
|
+
belong to.
|
|
282
|
+
5. **Plain values** (a name, an address, a language), when the group holds things typed in rather than
|
|
283
|
+
switched: fields stacked in the card, as in a form.
|
|
284
|
+
6. **The settings areas**, **when there is more than one** (General · Members · Notifications · Billing ·
|
|
285
|
+
Integrations): **views in the floating dock**, not tabs over the page; the breadcrumb reads Settings ›
|
|
286
|
+
Notifications. A product with one page of settings has no dock.
|
|
287
|
+
7. Toggles and pickers save as they change; there is no save button unless the card is a form (then its
|
|
288
|
+
primary sits at the card's foot, right-aligned).
|
|
289
|
+
8. **A plan in force**, when the product is paid for by plan, inside the billing group: a card inside the
|
|
290
|
+
group card (16 padding) with the plan's name 14 medium and a status badge, its terms 13 `neutral-600`
|
|
291
|
+
below, and "Change plan" secondary at the right; a meter only when the plan has an allowance that gets
|
|
292
|
+
used (seats, credits); a row for buying more only when more can be bought.
|
|
293
|
+
|
|
294
|
+
### Assistant (`conversation`, 720)
|
|
295
|
+
|
|
296
|
+
Asks the product a question. The prompt, the thread and the chat as the trail's last crumb are what make it
|
|
297
|
+
this kind, always.
|
|
298
|
+
|
|
299
|
+
- **Empty**, the page is the **prompt**, large (104), 160 below the header bar's hairline; no title, no
|
|
300
|
+
illustration. Under it, 24 below, **only when the reader has chats to return to**, the recent ones as a
|
|
301
|
+
plain list at its width.
|
|
302
|
+
- **Once asked**, the page is the conversation: the thread in the same centred column, 40 from the top, and
|
|
303
|
+
the prompt docked at the panel's foot (72, 16 from the edges).
|
|
304
|
+
- The chat is the trail's last crumb ("Agent › New chat ⌄"), a breadcrumb menu with "New chat" and the recent
|
|
305
|
+
ones.
|
|
306
|
+
- In the prompt's foot, a menu at the left only when the product has a mode or a model to pick.
|
|
307
|
+
|
|
308
|
+
### Sign in
|
|
309
|
+
|
|
310
|
+
Not in the shell. The canvas colour fills the screen; a card of 400 wide sits centred, 32 padding, 24 between
|
|
311
|
+
its parts. Always: the logo mark, then the title 20 medium with a line 14 `neutral-600` 6 below; the fields the
|
|
312
|
+
product signs in with, 20 apart; a full-width large (38) primary "Sign in". Then, **only when the product has
|
|
313
|
+
another way in**, "or" between hairlines and a full-width secondary alternative ("Continue with Google"); and,
|
|
314
|
+
**only when there is somewhere else to send the reader** (no account yet, a lost password), a 13 `neutral-600`
|
|
315
|
+
line with a link under the card. A one-time code is a code input, large when it is the page's only task.
|
|
316
|
+
|
|
317
|
+
## On a narrow screen
|
|
318
|
+
|
|
319
|
+
The same pages, narrowed by the shell's own width (the two widths, and scroll, hide or stack, are in
|
|
320
|
+
`foundations.md` under Narrow screens). At 1024 and up nothing on this page changes.
|
|
321
|
+
|
|
322
|
+
**Below 1024: a top bar and a drawer.** The sidebar leaves the canvas and the panel takes the shell's width, 8
|
|
323
|
+
in on every side. At the header bar's far left, in the place of back and forward, a sidebar toggle (a ghost
|
|
324
|
+
square with the panel icon) opens the sidebar as a **drawer**: the same anatomy, 256 wide (never more than the
|
|
325
|
+
shell less 48), on the canvas colour, sliding in from the left over the panel in 200ms, the `sheet` shadow, a
|
|
326
|
+
40% black scrim over the rest. Esc, the scrim, the toggle in the drawer's header or choosing a place closes it,
|
|
327
|
+
and focus goes back to the toggle. The header bar keeps the breadcrumb; its back and forward and its actions
|
|
328
|
+
hide, and a notice still hangs from it. A **top nav** keeps its sections here, scrolling along the bar, since
|
|
329
|
+
they take no width from the panel; it turns into the drawer only below 640 (below). **No rail**: the rail
|
|
330
|
+
is a choice for a wide screen, and an app that must work on a phone takes the sidebar or the top nav.
|
|
331
|
+
|
|
332
|
+
**Below 640: compact.** The panel stays the panel, 8 from the canvas on every side with its corners and
|
|
333
|
+
hairline, so a phone shows the same shell as a desktop. The column starts 40 below the header bar, 16 in from each side. The breadcrumb
|
|
334
|
+
shortens to its last two crumbs, parent › page. The floating dock keeps its place but is never wider than the
|
|
335
|
+
panel less 32: its views scroll, their counts hide, and the dock action shows its icon only.
|
|
336
|
+
|
|
337
|
+
**The page head stacks**: the title, its line, then the actions under them, left-aligned. A page's secondary
|
|
338
|
+
actions hide; its primary stays.
|
|
339
|
+
|
|
340
|
+
Each line below narrows a part the page has; it never adds one.
|
|
341
|
+
|
|
342
|
+
| Kind | Narrow |
|
|
343
|
+
| ------------------- | ------------------------------------------------------------------------------------------------ |
|
|
344
|
+
| Overview | The head's control, when it has one, under the title; stat cards two across; the chart card full width. |
|
|
345
|
+
| Index | The search takes the toolbar's row; the selects fold into the one Filter button (the page decides, not the table); a table's optional columns hide and the rest scroll sideways, each cell on one line; pagination becomes ‹ 3 of 25 ›; the dock scrolls and its action is its icon. |
|
|
346
|
+
| Detail | The title row stacks: the avatar and name, the meta line, then the actions; the tabs scroll; the numbers one column; the side panel's sections come under the column. |
|
|
347
|
+
| Create or edit, settings, assistant | Unchanged: they are one column already. A segmented control of more than four options becomes a select. |
|
|
348
|
+
| Sign in | The card takes the screen less 16 a side. |
|
|
349
|
+
|
|
350
|
+
## Secondary surfaces
|
|
351
|
+
|
|
352
|
+
Which surface follows what the reader does there: reads beside the page (sheet), answers before going on
|
|
353
|
+
(dialog), sets one thing where it is shown (popover), picks an action (menu), or is told what happened (toast,
|
|
354
|
+
notice).
|
|
355
|
+
|
|
356
|
+
| Surface | Size and place | When |
|
|
357
|
+
| ------------------ | -------------------------------------------------------------- | --------------------------------------------------------------- |
|
|
358
|
+
| **Sheet** | 512 wide at the right, 16 from the top, right and bottom edges, `panel` corners, the `sheet` shadow, non-modal; header 52 (title 14 medium, an icon, a close button), sections split by full-width hairlines | history, details, comments: things read beside the page, which stays usable. Never an item's editor, never a form that commits |
|
|
359
|
+
| **Dialog** | 480 wide, centred, `card` corners, the `sheet` shadow, a 40% black scrim; header 52 (title 14 medium, description 13 `neutral-600`), body 20 padding, footer 52 with a secondary and the primary right-aligned, 8 apart | a confirmation, only for what cannot be undone (what can is done at once and offers Undo in a toast); a short form of two or three fields (more is a page). A destructive confirm is a primary button labelled with the verb ("Delete page") |
|
|
360
|
+
| **Popover** | anchored to its trigger, the surface, a hairline, `float` shadow, `card` corners | a small form or detail that belongs to the control that opens it: a date, a share setting, a filter's values. Not a list of actions (menu), not a name for an icon (tooltip) |
|
|
361
|
+
| **Dropdown menu** | anchored, `item` corners, 4 padding, rows 36 high with 12 side, 13; destructive items last after a full-width hairline, in `error-600` | a row's actions, and the actions of an object past its secondary and primary, behind a ghost ellipsis; none where there are none |
|
|
362
|
+
| **Floating toolbar** | 38 high, `control` corners (12), centred at the foot | bulk actions on a selection; formatting over a focused block |
|
|
363
|
+
| **Toast** | a 360 card at the bottom right, 24 from the edges, with Undo for anything reversible (the spec is in `components.md`) | feedback after an action, with Undo when it can be reversed; a small action with nothing to undo gets a notice, and a message that must stay is an alert in the page |
|
|
364
|
+
| **Notice** | a tab that slides out from under the header bar and leaves by itself | a small action's state, with nothing to undo or act on: "Saving…", "Saved", "Link copied" |
|
|
365
|
+
|
|
366
|
+
## Standing decisions
|
|
367
|
+
|
|
368
|
+
- **One primary action per view**, in the action colour; everything else is secondary or ghost.
|
|
369
|
+
- **An item opens on its own page**, never in a pane beside its list.
|
|
370
|
+
- **The sidebar holds places**; the page that creates owns the create action.
|
|
371
|
+
- **Every page has a breadcrumb.**
|
|
372
|
+
- **Views go in the dock.** The views of a list, the facets of an editor that has a commit action, and sibling
|
|
373
|
+
settings pages all live in the floating dock. Tabs only for the facets of one object on a detail page short
|
|
374
|
+
enough to keep them in sight; a long one, or one worked in like an editor, takes the dock too.
|
|
375
|
+
- **A part earns its place.** An anatomy says what a page may hold and when; a control that changes nothing
|
|
376
|
+
the reader sees, or a card for a number nobody came for, is left out.
|
|
377
|
+
- **One column**, in reading order. A form and a settings page never split into two columns. Cards may share
|
|
378
|
+
one row, read across and ending level (stat cards; two sections of one weight read together, each a card),
|
|
379
|
+
but the page never becomes columns: never a stack of cards beside another stack. What stays in view beside
|
|
380
|
+
the work goes in the side panel.
|
|
381
|
+
- **Space, not lines**, between sections and groups; a container only for a self-contained unit or a divided
|
|
382
|
+
list.
|
|
383
|
+
- **A group is marked, never implied**: a hairline, a container (never inside another), or an eyebrow. Not a
|
|
384
|
+
tighter gap.
|
|
385
|
+
- **Nothing repeats**: a chart's headline is not also a stat card; a count in the dock is not also in the title.
|
|
386
|
+
- **Titles, empty states and forms align left**; nothing is centred except the column itself and the sign-in
|
|
387
|
+
card.
|
|
388
|
+
- **Narrow, a row scrolls, hides or stacks**, never wraps; actions hide rather than fold into a "⋯" menu; the
|
|
389
|
+
navigation becomes a top bar and a drawer, never a rail.
|
|
390
|
+
- **Design at 1920 × 1080, then check it holds at 1440 × 900 and at 390, in light and dark**, and in an accent
|
|
391
|
+
theme when the product has one.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Patterns
|
|
2
|
+
|
|
3
|
+
A common need, and the parts it is built from and how they sit. Each row starts, in bold, with **when** the
|
|
4
|
+
recipe is the answer, and says where a simpler thing does the job instead; then the simpler thing wins. A
|
|
5
|
+
recipe answers a need the content has: none is added because a page of that kind usually shows one. Each row
|
|
6
|
+
names the parts (`components.md`), the placement (`pages.md`) and the values that matter; the medium files say
|
|
7
|
+
how to write them. Where a need is not here, build it by the recipe in `method.md` from the nearest row.
|
|
8
|
+
|
|
9
|
+
| Need | When, and build it as |
|
|
10
|
+
| -------------------------- | ------------------------------------------------------------------------------------------------------------- |
|
|
11
|
+
| **List of objects** | **When many things of one kind are looked through and opened**: a ruled table in its frame: head 41 on the `neutral-100` fill, rows 41 with a hairline between, 12 padding; the first column the name (13 medium `neutral-900`), meta columns `neutral-700`, numbers tabular right, status a badge, people a 24 avatar and name, the last column (44) a ghost ellipsis for the row's menu when a row has actions of its own. Group rows (34, muted, full width) only when the list falls into sections. A row opens the object's own page. Key–value facts are label and value rows and settings a settings list, not a table. |
|
|
12
|
+
| **Views of a list** | **When the same list is cut into a few standing sets the reader moves between**: status views (All · Drafts · Published) with their counts in the dock at the panel's foot, beside the dock action for the page's primary. A list with one view has no dock; an attribute to narrow by is a filter; how the list is shown (List · Grid) is a view switch. |
|
|
13
|
+
| **Filters** | **When a list is too long to read whole**, one filter per attribute the reader narrows by and none for the rest. Row 1, the toolbar, never moving, as the table's own top bar inside its frame (`TableToolbar`): search (34, 256 wide), always, unless the items have nothing to type, then a segmented control for one-of-few that should stay visible, a 34 select per value for the one or two always at hand, or a Filter button (secondary, a filter icon, a count once applied) for several groups of values, opening grouped checkbox values with "Clear all" at its foot. Row 2, only when filters apply, under it, still inside the frame: a soft chip per group (24 high, pill, the `neutral-100` fill, no border, 13 `neutral-600`, a 12 × at the end: "Status is Paid or Overdue"), wrapping, then a ghost "Clear all". A table whose filtering is the work takes filter conditions (`components.md`). |
|
|
14
|
+
| **Selection of rows** | **Only when rows can be acted on together** (a selection needs its bulk actions): a checkbox column (20 boxes; the head's box mixed when some are selected); selected rows on the 7% wash; a floating toolbar (38, `control` corners) at the foot with the count and the bulk actions, taking the dock's place while anything is selected. |
|
|
15
|
+
| **Inline add** | **When lines are added to a table in place, one after another** (an invoice's lines): a last table row holding a ghost button with a plus ("Add line"), its padding pulled so the label aligns with the first column's text. An object with a page of its own is added by the page's primary action instead. |
|
|
16
|
+
| **Totals under lines** | **When a table's amounts add up to sums the reader needs** (an invoice, an order): a footer in the same table, each sum in the column of the amounts it totals: a slim head row (the `neutral-100` fill, 8 vertical padding) naming those columns, then a row per sum on the surface with no rules between (the label in `neutral-700`, 16 in from the edge), the total last with a hairline above it and 12 / 16 padding. |
|
|
17
|
+
| **Editable cells** | **When the table is where its values are worked on** (an invoice's lines); a list whose rows open their own page is edited there, not in place. The table reads as values; a cell becomes editable on click: the value in a borderless 13 input on the tint wash, the text where it was, a select for a value from a set (a VAT rate: the value and a small chevron, its list under the cell). Under the pointer or on focus an editable cell shows a 14 mark at its end, a pencil for a typed value and a chevron for a pick: the one hint it can change, with the pointer cursor (a click starts the edit). The open cell is ringed inside its edges in the accent (2) and ends in a 20 check that saves; Enter or a click away saves too, Escape puts the value back, and focus returns to the cell; a figure that does not read as one is not taken. Only the values the reader sets are editable: a sum the table works out (an amount, a total) stays a plain cell and follows the edit. The row keeps its height. |
|
|
18
|
+
| **Order set by hand** | **When the order of a list is itself information** (a backlog ranked by priority, an invoice's lines as they print, the steps of a sequence): a grip column first in the table (`TableDragCell`), the row dragged to its place or moved with ↑ ↓; a rank column, when shown, follows the drop. An order that follows a value (a date, an amount) is sorting, never dragged. |
|
|
19
|
+
| **Columns the reader arranges** | **When a table is worked in for long and its columns hold values of very different lengths, or readers need different columns first**: resizable edges on the heads, and movable heads for the data columns (`components.md`, TableHead). A table read in passing keeps its own widths and order. |
|
|
20
|
+
| **Spreadsheet / a grid of values** | **When the values themselves are the work, cell by cell** (a budget, a forecast, a price list), and the reader selects blocks of them, pastes them in, fills them down and wants their sum: a DataGrid (`components.md`), lettered or named columns, numbered rows, the selection's sum in its footer. A list of objects is a table; a few values of a list worked on where they sit are editable cells. |
|
|
21
|
+
| **Problems to act on** | **When problems are what the reader came to see and work through** (failing checks, open incidents, errors on a system): rows in a list in one container, the worst first, each row a status icon in its tone, the problem as its title, what it is on and since when as meta, and its one action at the right as a ghost; once the action is done the row shows its result instead ("View diagnosis"), never the action beside a badge saying it was done. The list takes the head every section has, its count in it. An Alert is a notice about the page, never these rows. |
|
|
22
|
+
| **Status / workflow** | **When an object is in one of a few named states**: a soft badge (`components.md`) in the tone of what the state is (`foundations.md`, Status colour). Never a coloured row. |
|
|
23
|
+
| **Key figures (KPIs)** | **When the reader needs several figures at a glance**, two to four, first under the head (before a chart): stat cards (`components.md`) in a row, 16 apart, each holding the same lines (a label, a value and the same kind of line under it), so the row ends level. One figure is a line of text or the head of its chart card, not a card; a fact that happens to be a number goes with the facts. |
|
|
24
|
+
| **A chart** | **When the shape is what the reader needs** (a measure over time, a comparison, shares of a whole), not one figure: the chart for the need, by the table at the head of `charts.md`, in its card. One figure and its change is a stat card; a ranked list of names is a bar list. |
|
|
25
|
+
| **Ranked breakdown** | **When the reader's next question is "from where", and the names are the point** (top pages, sources, countries): a bar list, its anatomy as in `components.md`, its bars neutral; it collapses to "Show N more" when it runs long; rows are filter toggles only when picking one narrows the page. A comparison across categories is a chart. |
|
|
26
|
+
| **Key–value facts** | **When an object has attributes to look up**: label and value rows, the label at the left, the value beside it (a DescriptionList in the column; in the side panel the same rows without its box), several groups of facts as titled groups of one list, never a card each built alike. A grid of label-over-value pairs only for two or three headline facts in a tight spot (a sheet's head). Icon-led facts (location, device) as a wrapping row of 16 icons with text. A read-only value the reader copies (an ID, an API key) as a read-only field with a copy action. |
|
|
27
|
+
| **A list that can grow, on a page about something else** | **When a section of a detail or an overview lists items that can run to dozens or hundreds** (an account's deals, a project's tasks, a customer's invoices): the section shows the latest or most urgent few, about 10, in the layout the whole list has (rows, or tiles in a grid), its count in the head ("Deals 140"), and a ghost "View all" at its right opening the whole list where it can be searched and paged: the page that lists them when there is one, the object's own facet (a tab or a view in the dock) when it is one of the object's views, otherwise a sheet. The few are never paged or slid in place (no carousel, no arrows): "View all" is the one way to the rest. |
|
|
28
|
+
| **Timeline / history** | **When the reader asks what happened to an object**: an activity list in a sheet, read beside the page, its anatomy as in `components.md`: an icon tile per item, the title over its time. The latest few may close a detail page, with "Full history" opening the sheet. |
|
|
29
|
+
| **Steps of a run / a log** | **When a run is read step by step, each with its result and duration**: a bordered list (card corners) of rows 41 or more, divided by hairlines, each with the same lanes left to right: a step number (13 `neutral-600`, 24 wide), an icon tile (32), the text (what happened, 13 medium, with the tool or object as a mono chip, and one line of result in `neutral-600`), the duration right in `neutral-600`, a badge only when the step is exceptional (retried, approved, failed), a chevron to open it. An open row takes the 3% wash and shows its detail below the text: attempts as a small list with times, input and output as code blocks (11 mono on the `neutral-100` fill, chip corners, 12 padding), side by side at 896. Normal steps carry no badge. |
|
|
30
|
+
| **Schedule / planner grid** | **When work is planned per resource and per day**: a bordered grid (card corners): the first column the resource (name 13 medium over a meta line, 56 rows when two lines), then a column per day with the day as a 41 head on the `neutral-100` fill, today's column on the 3% wash; hairlines between rows and columns (the one grid that divides both ways). Items in a cell are small blocks (item corners, the surface, a hairline, 8 padding): a 6 status dot, the task 13 medium, the time and person 11 `neutral-600`. A footer row of meters only when the resources have a capacity to fill. |
|
|
31
|
+
| **Empty state** | **Where a list or section has nothing yet**, in its place: a left-aligned dashed panel (`panel` corners, 20; a dashed hairline): an optional icon tile, what goes here (13 medium), one sentence (13 `neutral-600`), one secondary button. No illustrations. A filter that matched nothing offers to clear it. |
|
|
32
|
+
| **Loading** | **While content loads**: skeleton blocks and lines at the real element's size, the region marked busy. No spinner over a page; a spinner only inside the button that is busy. |
|
|
33
|
+
| **Search** | **When the reader looks things up by name**: a small input (34) with a leading search icon, level with the buttons beside it; a trailing kbd (⌘K) only when that shortcut opens it. |
|
|
34
|
+
| **Command palette** | **When the product offers search-and-run from the keyboard** (⌘K): a dialog pinned near the top with a borderless search, groups of 36 rows that hide when they do not match, the recent records first, then places, then actions, each with its kbd or a quiet hint. The search of one list is the search input on that list. |
|
|
35
|
+
| **Create or edit** | **When one object is made or changed**: the create or edit page kind: fields stacked at 640, sections 40 apart when the fields fall into groups, the primary at the end. A short form (two or three fields) is a 480 dialog instead. |
|
|
36
|
+
| **Long form / wizard** | **Only when the form is long**: a stepper over the form (horizontal above, or vertical beside a long one), the current step's fields under it, Back and Continue at the end; done steps can be returned to; a step with errors is marked and says what is missing. A form that fits one page of sections has no stepper. |
|
|
37
|
+
| **Settings** | **For the standing choices of a product or an account**: the settings page kind: one card per group, rows divided by hairlines, one switch or picker per setting, a dependent setting sharing its parent's space between hairlines (or under an eyebrow), the areas in the dock when there is more than one. One object's own properties are a facet of that object (below). |
|
|
38
|
+
| **Choice with explanation** | **When each option needs a sentence to be chosen well** (a plan, a mode, a permission): an option list: rows with a label over a description and a radio or checkbox in the trailing slot, 16 apart, each a hairline row when there are more than three. Options that are clear from their labels are plain radios, or a select from five up. |
|
|
39
|
+
| **A single toggle with consequences** | A setting row with a switch, its description saying what turns on; a confirmation dialog only when it cannot be undone. |
|
|
40
|
+
| **Save state** | **When changes save as they are made**: a notice in the header bar: "Saving…" with a small spinner, then "Saved", sliding out from under the bar and leaving by itself. The same for small actions without undo ("Link copied"). |
|
|
41
|
+
| **Feedback after an action** | **After an action, with Undo for anything reversible**: a toast (`components.md`). A small action with nothing to undo gets a notice instead (Save state). A message that must stay is an alert in the page (a bordered row with an icon, 13, in the status tone). |
|
|
42
|
+
| **Destructive action** | **When an action removes something for good**: last in the row's menu, in `error-600`; confirmed in a dialog whose primary is labelled with the verb ("Delete page"). One that can be undone asks nothing first and offers Undo in a toast after. |
|
|
43
|
+
| **Explaining a heading** | **Only when a title needs explaining**: an info tip (a 16 icon that opens a short popover) beside the title; never a paragraph of help text under it. |
|
|
44
|
+
| **Onboarding** | **While a new workspace has set-up steps left**: a checklist card on the overview: the count and a bar, done steps ticked, the next one open with its action and a ghost Skip. |
|
|
45
|
+
| **An object's properties** | **When an object has settings of its own**: a facet of its own: the Settings view in the object's dock or tabs, its fields stacked at 640. |
|
|
46
|
+
| **The people or things that belong to an object: members, a team, services** | **When the reader needs who or what belongs to an object, and how each stands** (a project's members, a release's services, an order's shipments): a list card titled with the count (the count 13 `neutral-600` after the title), rows 12 apart, each row one line of lanes: a 24 avatar for a person or a 16 icon in `neutral-600` for a thing, 12 to the name 13 medium `neutral-950` over one line of what it is 13 `neutral-600` (2 between), and at the right how it stands now, as a badge or a status dot with the word. When states differ, the one that needs the eye first. |
|
|
47
|
+
| **Live state** | **Only when the thing is live now** (people online, a sync running): a status dot (pulsing when live) beside the thing it describes, in that thing's card and not the page head; a live count as a figure with a dot ("129 Active now"). |
|
|
48
|
+
| **A value against its range** | **When a reading is judged by the range it should sit in** (a test result, a temperature, a stock level, a response time): the range drawn as a band on a track with the reading's place marked on it, the band in the success wash, the reading status-coloured only when it is outside; the value right-aligned beside the track with its unit, its change since the last reading after it as a delta. Several readings start with how many are outside, and the outside ones lead. A target and graded ranges rather than one band: BulletChart (`charts.md`). |
|
|
49
|
+
| **Usage / credits** | **When an amount is used out of a known allowance**: a meter with a label and a caption ("4 of 5", "Resets in 10 days"); progress only for a task that finishes. A tone only when the amount warrants it (near the limit `warning`, over it `error`). |
|
|
50
|
+
| **Date / date range** | A date picker in a form (38, a calendar icon); a date-range picker with its presets (Last 7 days, Last 90 days) for filtering a report or overview, when the reader can change the period; a calendar inline only when the month itself is the content. |
|
|
51
|
+
| **Sign-in code** | **When signing in asks for a one-time code**: a code input (large when it is the page's only task), a resend ghost button, the error in the field's helper line. |
|
|
52
|
+
| **Drop zone / upload** | **When the reader adds files**: a dashed well (item corners) with a line on what goes here and a secondary "Choose files"; on drag-over the dash darkens and the 3% wash fills it; the files follow as rows with a bar while uploading. |
|
|
53
|
+
| **Media grid** | **When things are told apart by how they look** (images, files with a preview); things told apart by name are a table. Tiles four across, 12 apart: item corners, a hairline, a 4:3 thumbnail on the 4% wash, then the name 13 medium and the meta 11 `neutral-600` in 10 padding. Selected: the 2px action outline, 2 outside. |
|
|
54
|
+
| **Board / kanban** | **When things move through a few stages and are moved by hand**; a status that is only read is a badge in a table. Columns on the `neutral-100` fill (card corners, 8 padding, 8 between cards) with a header (title and count badge); cards the surface with item corners, a hairline, 12 padding; the `float` shadow only while dragging. |
|
|
55
|
+
| **Document / rich text** | **When the content is writing**: no box around it: the text sits on the panel at 14–16 with relaxed leading in `neutral-900`, 680 wide; headings medium at 24 / 18 / 16; a floating toolbar over the selection; blocks get a ghost grip handle on hover in the left margin. |
|
|
56
|
+
| **Chat / support: a thread, who is typing, attaching a file, a failed or unread message, a reference by #** | **When people talk in turns** (support, comments); a history is an activity list and a run a log. A thread of messages with the composer at its foot, by the chat parts in `components.md`: the thread (its loading, unread and jump-to-latest states are its own), the message (own and others', pending and failed), the typing row in the composer's slot, the composer with what is attached waiting above its box, and a record or person referenced by "#" or "@" as a neutral token. |
|
|
57
|
+
| **Ask an AI / an agent page** | **When the product has an assistant the reader asks**: the assistant page kind (`pages.md`), its prompt and thread by the chat parts in `components.md`; the recent chats under the empty prompt as rows of 32, title left, age right in `neutral-600`, a primary dot when unread, no rules. |
|
|
58
|
+
| **Tree / hierarchy** | **When places nest** (a collection and its pages): nav groups with inset items; each deeper level indents another 32. A place with a long index of its own drills down into a level instead. |
|
|
59
|
+
| **Workspace / project switch** | **Only when the product has several workspaces or projects**: a sidebar switcher under the sidebar's header (or the footer account made one): the current one's 28 mark, name over a quiet line, a menu of the others with a check on the current, then "All …" and "New …". A breadcrumb menu only for siblings deeper in the trail. With one workspace, the footer account names it. |
|
|
60
|
+
| **View switch** | **When the same content can be shown more than one way** (List · Grid, Draft · Preview): a segmented control (34 track, 29 items); tabs only for the facets of one object on its detail page. |
|
|
61
|
+
| **A page on a phone** | The same page, narrowed by the shell, never a second design: the shell and each page kind in `pages.md` (On a narrow screen), what a row of controls does in `foundations.md` (Narrow screens). |
|
|
62
|
+
|
|
63
|
+
## Behaviour
|
|
64
|
+
|
|
65
|
+
How things answer the pointer, the keyboard and time, rather than how they look. Most of these the library
|
|
66
|
+
already does (Base UI underneath), and a row says so; it also says what to keep when the same thing is built by
|
|
67
|
+
hand. Each row starts with **when** it applies; none is added where its when is not met.
|
|
68
|
+
|
|
69
|
+
| Need | When, and build it as |
|
|
70
|
+
| -------------------------- | ------------------------------------------------------------------------------------------------------------- |
|
|
71
|
+
| **Submenu reached diagonally (safe triangle)** | **Whenever something opens on hover beside what opened it** (a submenu, a hover-opened popover, a flyout from a rail): from the point where the pointer leaves the trigger, a triangle to the near corners of the opened panel, and the strip between the two, keep the panel open, and the rows the triangle crosses take no hover while the pointer is in it. It lets go as soon as the pointer leaves the area, slows below 0.1 px per ms, or rests in it 40 ms short of the panel, so it never holds a panel the reader has given up on. The library's submenus, hover-opened menus and popovers (the info tip) and tooltips have it; a panel opened on hover by hand gets the same, or opens on click instead. A panel opened by click or keyboard needs none: it stays until dismissed. |
|
|
72
|
+
| **Hover intent** | **Whenever hover opens something**, so a pointer passing on its way elsewhere opens nothing: a tooltip opens after 300 ms at rest and closes at once; tooltips along one row (a rail, a toolbar, a row of icon buttons) are grouped, so once one shows, the next opens at once while one is open or within 400 ms of its closing; a submenu opens after 100 ms, since its chevron already says it is there, and closes at 0, the safe triangle doing the forgiving; a hover-opened popover (the info tip) after 300 ms. A close grace of 150 to 300 ms only for a hover-opened panel the reader moves into with no safe triangle to carry them (one not beside its trigger). Never a delay on click, focus or a shortcut: those open at once. Touch has no hover: what hover opens also opens on tap (the info tip), or only names what a tap already does (a tooltip on an icon button). |
|
|
73
|
+
| **Focus kept in a dialog, returned on close** | **For every surface that takes over the keyboard** (dialog, sheet, an open menu or popover): on opening, focus moves to the first control inside (the panel itself when opened by touch, so no keyboard springs up); Tab and Shift+Tab cycle inside; Escape closes; on closing, focus returns to what opened it. The library's dialog, sheet, menu and popover do all of this. Two cases change it: when the opener is gone (the row just deleted), focus goes to the row that took its place, or the list's first row, never the top of the page; a tip that only explains (the info tip) leaves focus where it was. |
|
|
74
|
+
| **Scroll position kept** | **When the reader opens an item from a long list and comes back** (an index to a detail page, then Back): the list returns at the scroll position it was left at, the opened row in view and focused; a list reached afresh (from the sidebar, or under other filters) starts at the top. A list whose item opens beside it (a sheet) never moves. |
|
|
75
|
+
| **Optimistic update with Undo** | **When an action is reversible and almost always succeeds** (archive, move, mark as read, delete to a bin): the change shows at once, as though done, and a toast says what happened with Undo for its 5 s; Undo puts the thing back exactly where it was, in its place in the list. The request goes as the change shows, and Undo sends its reverse; if the request fails, the thing comes back and an `error` toast says so. An action that cannot be reversed is confirmed first (Destructive action) rather than undone after; one that takes long is a run with progress. |
|
|
76
|
+
| **Typeahead in a list** | **When a list of named options has keyboard focus** (a menu, a select's options): a letter moves to the next option starting with it; letters typed within 750 ms of each other spell one prefix ("ma" finds "Maya"). The library's menu and select do this. A list the reader narrows by typing (a combobox, the command menu, a long menu with its search) filters instead; the sidebar and a table take neither, the command menu and the table's search do that work. |
|
|
77
|
+
| **Press and hold to confirm** | **When a destructive action is repeated in place and a dialog each time would be clicked through** (removing members one by one, cancelling queued runs): a hold button: its label says to hold ("Hold to remove"), holding fills it from the start edge over 1000 ms in the error tone and the action runs when it is full; letting go sooner drains it back in 200 ms and nothing happens. Space or Enter held does the same from the keyboard. A rare, grave action (deleting a workspace) keeps the confirmation dialog; one that can be undone needs neither (Optimistic update with Undo). |
|