@vokality/design-system 0.0.0-stage → 1.2.2
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/CHANGELOG.md +92 -0
- package/README.md +134 -2
- package/dist/charts/chart.d.ts +52 -0
- package/dist/charts/chart.js +108 -0
- package/dist/components/Accordion/Accordion.d.ts +15 -0
- package/dist/components/Accordion/Accordion.js +16 -0
- package/dist/components/Alert/Alert.d.ts +14 -0
- package/dist/components/Alert/Alert.js +12 -0
- package/dist/components/AppShell/AppShell.d.ts +21 -0
- package/dist/components/AppShell/AppShell.js +48 -0
- package/dist/components/Avatar/Avatar.d.ts +11 -0
- package/dist/components/Avatar/Avatar.js +19 -0
- package/dist/components/AvatarGroup/AvatarGroup.d.ts +11 -0
- package/dist/components/AvatarGroup/AvatarGroup.js +13 -0
- package/dist/components/Badge/Badge.d.ts +9 -0
- package/dist/components/Badge/Badge.js +6 -0
- package/dist/components/BarChart/BarChart.d.ts +7 -0
- package/dist/components/BarChart/BarChart.js +45 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +11 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.js +11 -0
- package/dist/components/Button/Button.d.ts +17 -0
- package/dist/components/Button/Button.js +23 -0
- package/dist/components/Calendar/Calendar.d.ts +21 -0
- package/dist/components/Calendar/Calendar.js +144 -0
- package/dist/components/Card/Card.d.ts +16 -0
- package/dist/components/Card/Card.js +11 -0
- package/dist/components/Checkbox/Checkbox.d.ts +12 -0
- package/dist/components/Checkbox/Checkbox.js +24 -0
- package/dist/components/Code/Code.d.ts +7 -0
- package/dist/components/Code/Code.js +6 -0
- package/dist/components/CodeBlock/CodeBlock.d.ts +10 -0
- package/dist/components/CodeBlock/CodeBlock.js +43 -0
- package/dist/components/Combobox/Combobox.d.ts +23 -0
- package/dist/components/Combobox/Combobox.js +188 -0
- package/dist/components/Combobox/ListPanel.d.ts +16 -0
- package/dist/components/Combobox/ListPanel.js +75 -0
- package/dist/components/CommandPalette/CommandPalette.d.ts +23 -0
- package/dist/components/CommandPalette/CommandPalette.js +86 -0
- package/dist/components/Container/Container.d.ts +10 -0
- package/dist/components/Container/Container.js +7 -0
- package/dist/components/ContextMenu/ContextMenu.d.ts +11 -0
- package/dist/components/ContextMenu/ContextMenu.js +56 -0
- package/dist/components/DatePicker/DatePicker.d.ts +25 -0
- package/dist/components/DatePicker/DatePicker.js +198 -0
- package/dist/components/DescriptionList/DescriptionList.d.ts +12 -0
- package/dist/components/DescriptionList/DescriptionList.js +6 -0
- package/dist/components/Dialog/Dialog.d.ts +23 -0
- package/dist/components/Dialog/Dialog.js +53 -0
- package/dist/components/Divider/Divider.d.ts +6 -0
- package/dist/components/Divider/Divider.js +10 -0
- package/dist/components/Drawer/Drawer.d.ts +6 -0
- package/dist/components/Drawer/Drawer.js +6 -0
- package/dist/components/EmptyState/EmptyState.d.ts +11 -0
- package/dist/components/EmptyState/EmptyState.js +10 -0
- package/dist/components/ErrorSummary/ErrorSummary.d.ts +10 -0
- package/dist/components/ErrorSummary/ErrorSummary.js +28 -0
- package/dist/components/FaqList/FaqList.d.ts +10 -0
- package/dist/components/FaqList/FaqList.js +6 -0
- package/dist/components/Field/Field.d.ts +12 -0
- package/dist/components/Field/Field.js +25 -0
- package/dist/components/Figure/Figure.d.ts +11 -0
- package/dist/components/Figure/Figure.js +6 -0
- package/dist/components/FileUpload/FileUpload.d.ts +25 -0
- package/dist/components/FileUpload/FileUpload.js +47 -0
- package/dist/components/Grid/Grid.d.ts +12 -0
- package/dist/components/Grid/Grid.js +10 -0
- package/dist/components/HatchDivider/HatchDivider.d.ts +2 -0
- package/dist/components/HatchDivider/HatchDivider.js +5 -0
- package/dist/components/Heading/Heading.d.ts +12 -0
- package/dist/components/Heading/Heading.js +11 -0
- package/dist/components/Icon/Icon.d.ts +8 -0
- package/dist/components/Icon/Icon.js +17 -0
- package/dist/components/IconButton/IconButton.d.ts +11 -0
- package/dist/components/IconButton/IconButton.js +16 -0
- package/dist/components/Inline/Inline.d.ts +13 -0
- package/dist/components/Inline/Inline.js +8 -0
- package/dist/components/Input/Input.d.ts +10 -0
- package/dist/components/Input/Input.js +25 -0
- package/dist/components/Kbd/Kbd.d.ts +7 -0
- package/dist/components/Kbd/Kbd.js +6 -0
- package/dist/components/LineChart/LineChart.d.ts +7 -0
- package/dist/components/LineChart/LineChart.js +53 -0
- package/dist/components/Link/Link.d.ts +7 -0
- package/dist/components/Link/Link.js +12 -0
- package/dist/components/LinkProvider/LinkProvider.d.ts +22 -0
- package/dist/components/LinkProvider/LinkProvider.js +21 -0
- package/dist/components/List/List.d.ts +24 -0
- package/dist/components/List/List.js +24 -0
- package/dist/components/MediaCard/MediaCard.d.ts +19 -0
- package/dist/components/MediaCard/MediaCard.js +25 -0
- package/dist/components/Menu/Menu.d.ts +14 -0
- package/dist/components/Menu/Menu.js +53 -0
- package/dist/components/Menu/entries.d.ts +40 -0
- package/dist/components/Menu/entries.js +146 -0
- package/dist/components/MultiSelect/MultiSelect.d.ts +24 -0
- package/dist/components/MultiSelect/MultiSelect.js +166 -0
- package/dist/components/NavList/NavList.d.ts +19 -0
- package/dist/components/NavList/NavList.js +10 -0
- package/dist/components/NumberInput/NumberInput.d.ts +13 -0
- package/dist/components/NumberInput/NumberInput.js +90 -0
- package/dist/components/OtpInput/OtpInput.d.ts +19 -0
- package/dist/components/OtpInput/OtpInput.js +75 -0
- package/dist/components/PageHeader/PageHeader.d.ts +18 -0
- package/dist/components/PageHeader/PageHeader.js +11 -0
- package/dist/components/Pagination/Pagination.d.ts +15 -0
- package/dist/components/Pagination/Pagination.js +22 -0
- package/dist/components/PasswordInput/PasswordInput.d.ts +7 -0
- package/dist/components/PasswordInput/PasswordInput.js +11 -0
- package/dist/components/Popover/Popover.d.ts +18 -0
- package/dist/components/Popover/Popover.js +26 -0
- package/dist/components/Progress/Progress.d.ts +13 -0
- package/dist/components/Progress/Progress.js +24 -0
- package/dist/components/Prose/Prose.d.ts +8 -0
- package/dist/components/Prose/Prose.js +7 -0
- package/dist/components/Quote/Quote.d.ts +10 -0
- package/dist/components/Quote/Quote.js +7 -0
- package/dist/components/Radio/Radio.d.ts +7 -0
- package/dist/components/Radio/Radio.js +9 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +21 -0
- package/dist/components/RadioGroup/RadioGroup.js +41 -0
- package/dist/components/SearchInput/SearchInput.d.ts +10 -0
- package/dist/components/SearchInput/SearchInput.js +39 -0
- package/dist/components/SectionHeader/SectionHeader.d.ts +10 -0
- package/dist/components/SectionHeader/SectionHeader.js +9 -0
- package/dist/components/SegmentedControl/SegmentedControl.d.ts +19 -0
- package/dist/components/SegmentedControl/SegmentedControl.js +21 -0
- package/dist/components/Select/Select.d.ts +26 -0
- package/dist/components/Select/Select.js +262 -0
- package/dist/components/Skeleton/Skeleton.d.ts +8 -0
- package/dist/components/Skeleton/Skeleton.js +13 -0
- package/dist/components/Slider/Slider.d.ts +21 -0
- package/dist/components/Slider/Slider.js +43 -0
- package/dist/components/Sparkline/Sparkline.d.ts +11 -0
- package/dist/components/Sparkline/Sparkline.js +15 -0
- package/dist/components/Spinner/Spinner.d.ts +8 -0
- package/dist/components/Spinner/Spinner.js +8 -0
- package/dist/components/SquareGlyph/SquareGlyph.d.ts +7 -0
- package/dist/components/SquareGlyph/SquareGlyph.js +6 -0
- package/dist/components/Stack/Stack.d.ts +11 -0
- package/dist/components/Stack/Stack.js +8 -0
- package/dist/components/Stat/Stat.d.ts +13 -0
- package/dist/components/Stat/Stat.js +22 -0
- package/dist/components/Steps/Steps.d.ts +13 -0
- package/dist/components/Steps/Steps.js +13 -0
- package/dist/components/Switch/Switch.d.ts +7 -0
- package/dist/components/Switch/Switch.js +16 -0
- package/dist/components/Table/Table.d.ts +48 -0
- package/dist/components/Table/Table.js +144 -0
- package/dist/components/Tabs/Tabs.d.ts +19 -0
- package/dist/components/Tabs/Tabs.js +29 -0
- package/dist/components/Tag/Tag.d.ts +12 -0
- package/dist/components/Tag/Tag.js +8 -0
- package/dist/components/Text/Text.d.ts +10 -0
- package/dist/components/Text/Text.js +7 -0
- package/dist/components/Textarea/Textarea.d.ts +6 -0
- package/dist/components/Textarea/Textarea.js +17 -0
- package/dist/components/ThemeScript/ThemeScript.d.ts +7 -0
- package/dist/components/ThemeScript/ThemeScript.js +9 -0
- package/dist/components/TileGrid/TileGrid.d.ts +13 -0
- package/dist/components/TileGrid/TileGrid.js +8 -0
- package/dist/components/TimePicker/TimePicker.d.ts +28 -0
- package/dist/components/TimePicker/TimePicker.js +192 -0
- package/dist/components/Timeline/Timeline.d.ts +16 -0
- package/dist/components/Timeline/Timeline.js +10 -0
- package/dist/components/Toaster/Toaster.d.ts +50 -0
- package/dist/components/Toaster/Toaster.js +63 -0
- package/dist/components/Tooltip/Tooltip.d.ts +11 -0
- package/dist/components/Tooltip/Tooltip.js +21 -0
- package/dist/components/TreeView/TreeView.d.ts +30 -0
- package/dist/components/TreeView/TreeView.js +127 -0
- package/dist/components.css +1798 -0
- package/dist/fonts/FONT-NOTICES.txt +20 -0
- package/dist/fonts/IBMPlexSans-Latin.woff2 +0 -0
- package/dist/fonts/IBMPlexSans-OFL.txt +93 -0
- package/dist/fonts/Manrope-Latin.woff2 +0 -0
- package/dist/fonts/Manrope-OFL.txt +93 -0
- package/dist/fonts/SpaceGrotesk-Latin.woff2 +0 -0
- package/dist/fonts/SpaceGrotesk-OFL.txt +93 -0
- package/dist/fonts.css +23 -0
- package/dist/hooks/useTheme.d.ts +16 -0
- package/dist/hooks/useTheme.js +82 -0
- package/dist/icons/arrow-down.svg +1 -0
- package/dist/icons/arrow-up-right.svg +1 -0
- package/dist/icons/arrow-up.svg +1 -0
- package/dist/icons/calendar.svg +1 -0
- package/dist/icons/chart.svg +1 -0
- package/dist/icons/check.svg +1 -0
- package/dist/icons/chevron-down.svg +1 -0
- package/dist/icons/chevron-left.svg +1 -0
- package/dist/icons/chevron-right.svg +1 -0
- package/dist/icons/chevrons-up-down.svg +1 -0
- package/dist/icons/circle-alert.svg +1 -0
- package/dist/icons/circle-check.svg +1 -0
- package/dist/icons/clock.svg +1 -0
- package/dist/icons/copy.svg +1 -0
- package/dist/icons/ellipsis.svg +1 -0
- package/dist/icons/file.svg +1 -0
- package/dist/icons/folder.svg +1 -0
- package/dist/icons/home.svg +1 -0
- package/dist/icons/info.svg +1 -0
- package/dist/icons/map-pin.svg +1 -0
- package/dist/icons/menu.svg +1 -0
- package/dist/icons/minus.svg +1 -0
- package/dist/icons/pencil.svg +1 -0
- package/dist/icons/phone.svg +1 -0
- package/dist/icons/plus.svg +1 -0
- package/dist/icons/quote.svg +1 -0
- package/dist/icons/search.svg +1 -0
- package/dist/icons/sidebar.svg +1 -0
- package/dist/icons/trash.svg +1 -0
- package/dist/icons/triangle-alert.svg +1 -0
- package/dist/icons/upload.svg +1 -0
- package/dist/icons/users.svg +1 -0
- package/dist/icons/x.svg +1 -0
- package/dist/index.d.ts +178 -0
- package/dist/index.js +93 -0
- package/dist/internal/CharCount.d.ts +17 -0
- package/dist/internal/CharCount.js +23 -0
- package/dist/internal/choice.d.ts +65 -0
- package/dist/internal/choice.js +111 -0
- package/dist/internal/focusables.d.ts +3 -0
- package/dist/internal/focusables.js +8 -0
- package/dist/internal/options.d.ts +15 -0
- package/dist/internal/options.js +30 -0
- package/dist/internal/status.d.ts +6 -0
- package/dist/internal/status.js +5 -0
- package/dist/internal/useIsoLayoutEffect.d.ts +3 -0
- package/dist/internal/useIsoLayoutEffect.js +4 -0
- package/dist/internal/useScrollActive.d.ts +3 -0
- package/dist/internal/useScrollActive.js +12 -0
- package/dist/internal/useUid.d.ts +2 -0
- package/dist/internal/useUid.js +6 -0
- package/dist/lib/cx.d.ts +2 -0
- package/dist/lib/cx.js +4 -0
- package/dist/lib/dates.d.ts +10 -0
- package/dist/lib/dates.js +107 -0
- package/dist/lib/format.d.ts +15 -0
- package/dist/lib/format.js +50 -0
- package/dist/lib/icons.d.ts +220 -0
- package/dist/lib/icons.js +54 -0
- package/dist/lib/intl.d.ts +4 -0
- package/dist/lib/intl.js +19 -0
- package/dist/lib/math.d.ts +5 -0
- package/dist/lib/math.js +36 -0
- package/dist/lib/omit.d.ts +2 -0
- package/dist/lib/omit.js +10 -0
- package/dist/lib/space.d.ts +4 -0
- package/dist/lib/space.js +9 -0
- package/dist/lib/text.d.ts +8 -0
- package/dist/lib/text.js +12 -0
- package/dist/lib/theme.d.ts +16 -0
- package/dist/lib/theme.js +14 -0
- package/dist/lib/utils.d.ts +17 -0
- package/dist/lib/utils.js +5 -0
- package/dist/tailwind.css +110 -0
- package/dist/tokens.css +316 -0
- package/dist/tokens.dtcg.json +1606 -0
- package/dist/tokens.json +1217 -0
- package/dist/types.d.ts +67 -0
- package/dist/types.js +1 -0
- package/dist/vokality.css +2139 -0
- package/dist/vokality.iife.js +19408 -0
- package/docs/brand.md +163 -0
- package/docs/components/Accordion/README.md +24 -0
- package/docs/components/Alert/README.md +31 -0
- package/docs/components/AppShell/README.md +20 -0
- package/docs/components/Avatar/README.md +17 -0
- package/docs/components/AvatarGroup/README.md +12 -0
- package/docs/components/Badge/README.md +24 -0
- package/docs/components/BarChart/README.md +30 -0
- package/docs/components/Breadcrumbs/README.md +16 -0
- package/docs/components/Button/README.md +43 -0
- package/docs/components/Calendar/README.md +43 -0
- package/docs/components/Card/README.md +16 -0
- package/docs/components/Checkbox/README.md +30 -0
- package/docs/components/Code/README.md +9 -0
- package/docs/components/CodeBlock/README.md +15 -0
- package/docs/components/Combobox/README.md +43 -0
- package/docs/components/CommandPalette/README.md +20 -0
- package/docs/components/Container/README.md +10 -0
- package/docs/components/ContextMenu/README.md +13 -0
- package/docs/components/Dashboard/README.md +12 -0
- package/docs/components/DatePicker/README.md +34 -0
- package/docs/components/DescriptionList/README.md +18 -0
- package/docs/components/Dialog/README.md +28 -0
- package/docs/components/Divider/README.md +15 -0
- package/docs/components/Drawer/README.md +16 -0
- package/docs/components/EmptyState/README.md +17 -0
- package/docs/components/ErrorPage/README.md +11 -0
- package/docs/components/ErrorSummary/README.md +16 -0
- package/docs/components/FaqList/README.md +11 -0
- package/docs/components/Field/README.md +27 -0
- package/docs/components/Figure/README.md +9 -0
- package/docs/components/FileUpload/README.md +20 -0
- package/docs/components/FormPage/README.md +11 -0
- package/docs/components/Grid/README.md +11 -0
- package/docs/components/HatchDivider/README.md +10 -0
- package/docs/components/Heading/README.md +10 -0
- package/docs/components/Icon/README.md +23 -0
- package/docs/components/IconButton/README.md +28 -0
- package/docs/components/Inline/README.md +9 -0
- package/docs/components/Input/README.md +31 -0
- package/docs/components/Kbd/README.md +13 -0
- package/docs/components/LineChart/README.md +27 -0
- package/docs/components/Link/README.md +31 -0
- package/docs/components/List/README.md +21 -0
- package/docs/components/ListDetail/README.md +11 -0
- package/docs/components/MediaCard/README.md +16 -0
- package/docs/components/Menu/README.md +45 -0
- package/docs/components/MultiSelect/README.md +41 -0
- package/docs/components/NavList/README.md +21 -0
- package/docs/components/NumberInput/README.md +19 -0
- package/docs/components/OtpInput/README.md +17 -0
- package/docs/components/PageHeader/README.md +17 -0
- package/docs/components/Pagination/README.md +22 -0
- package/docs/components/PasswordInput/README.md +13 -0
- package/docs/components/Popover/README.md +23 -0
- package/docs/components/Progress/README.md +19 -0
- package/docs/components/Prose/README.md +12 -0
- package/docs/components/Quote/README.md +13 -0
- package/docs/components/Radio/README.md +25 -0
- package/docs/components/RadioGroup/README.md +23 -0
- package/docs/components/SearchInput/README.md +23 -0
- package/docs/components/SectionHeader/README.md +14 -0
- package/docs/components/SegmentedControl/README.md +19 -0
- package/docs/components/Select/README.md +52 -0
- package/docs/components/SettingsPage/README.md +11 -0
- package/docs/components/SignIn/README.md +11 -0
- package/docs/components/Skeleton/README.md +16 -0
- package/docs/components/Slider/README.md +22 -0
- package/docs/components/Sparkline/README.md +13 -0
- package/docs/components/Spinner/README.md +16 -0
- package/docs/components/SquareGlyph/README.md +18 -0
- package/docs/components/Stack/README.md +11 -0
- package/docs/components/Stat/README.md +20 -0
- package/docs/components/Steps/README.md +22 -0
- package/docs/components/Switch/README.md +27 -0
- package/docs/components/Table/README.md +35 -0
- package/docs/components/Tabs/README.md +26 -0
- package/docs/components/Tag/README.md +21 -0
- package/docs/components/Text/README.md +11 -0
- package/docs/components/Textarea/README.md +20 -0
- package/docs/components/ThemeScript/README.md +47 -0
- package/docs/components/TileGrid/README.md +12 -0
- package/docs/components/TimePicker/README.md +19 -0
- package/docs/components/Timeline/README.md +12 -0
- package/docs/components/Toaster/README.md +34 -0
- package/docs/components/Tooltip/README.md +23 -0
- package/docs/components/TreeView/README.md +15 -0
- package/package.json +76 -4
package/docs/brand.md
ADDED
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
The Vokality design system is the shared look for anything Vokality builds or publishes: product UIs, dashboards, internal tools, landing pages, documents and decks. It is an engineer's aesthetic. A dark warm-charcoal ground carries one orange, with hard square corners, hairline rules and precise details such as square glyphs, hatch bars and tabular numerals. Start every new project from these tokens and components, then add only what the project needs.
|
|
2
|
+
|
|
3
|
+
## Principles
|
|
4
|
+
|
|
5
|
+
- **Built, not decorated.** Structure comes from rules, outlines and alignment. There are no gradients, shadows or illustrations.
|
|
6
|
+
- **One accent.** Orange marks the single thing that matters on a screen: the main action, the selected item, the bold half of a headline.
|
|
7
|
+
- **Square and exact.** Every corner is square, every rule 1px, every number tabular.
|
|
8
|
+
- **Quiet motion.** Short fades and color changes; one ambient detail at most. Everything stops under reduced motion.
|
|
9
|
+
|
|
10
|
+
## Writing
|
|
11
|
+
|
|
12
|
+
- Write plainly and specifically, the way a senior engineer explains something to a busy person. Say what a thing does and what happens next.
|
|
13
|
+
- Use "you" for the reader. Use "we" only when a team is actually speaking (marketing, support, release notes).
|
|
14
|
+
- Write all source copy in sentence case. Labels, eyebrows, navigation and buttons are *displayed* uppercase by their styles; never type capitals.
|
|
15
|
+
- Start buttons with a verb ("Save changes", "Export CSV"), and confirm with the same verb in the past tense ("Saved", "Exported").
|
|
16
|
+
- Error messages say what went wrong and how to fix it, without apology: "Enter an email address like name@company.com."
|
|
17
|
+
- Headlines may use the two-beat pattern: a light setup in `display-light`, then a bold close in `display-bold` ("Fewer steps. Same result.").
|
|
18
|
+
- No emoji, no exclamation marks, no superlatives, no filler numbers.
|
|
19
|
+
|
|
20
|
+
## Components
|
|
21
|
+
|
|
22
|
+
Build screens from **primitives** first. **Patterns** are primitives already composed for common jobs, **layout** components arrange them, and **templates** are whole pages to start from. Each component's page lists its anatomy, variants, sizes and every state, with the tokens it uses.
|
|
23
|
+
|
|
24
|
+
| Layer | Group | Components |
|
|
25
|
+
| --- | --- | --- |
|
|
26
|
+
| Primitives | Actions | `Button` (primary, outline, ghost, danger; default and `sm`; `loading`, `block`), `IconButton`, `Link`, `Menu` (submenus, checkbox and radio items), `ContextMenu` |
|
|
27
|
+
| Primitives | Form controls | `Field` (label, hint, error), `Input` (prefix, suffix, character count), `Textarea`, `PasswordInput`, `NumberInput`, `Slider`, `OtpInput`, `SearchInput`, `Select`, `Combobox`, `MultiSelect`, `DatePicker` (typed or picked), `Calendar`, `TimePicker`, `Checkbox`, `Radio`, `RadioGroup`, `Switch`, `SegmentedControl`, `FileUpload`, `ErrorSummary` |
|
|
28
|
+
| Primitives | Feedback | `Alert`, `Toaster` + `toast()`, `Progress`, `Spinner`, `Skeleton`, `EmptyState` |
|
|
29
|
+
| Primitives | Overlays | `Dialog` (and alert dialog), `Drawer`, `Popover`, `Tooltip`, `CommandPalette` (⌘K) |
|
|
30
|
+
| Primitives | Navigation | `Tabs`, `Pagination`, `Breadcrumbs`, `NavList`, `Steps`, `TreeView` |
|
|
31
|
+
| Primitives | Data display | `Table` (sort, select, expand, loading, paging), `List`, `DescriptionList`, `Stat`, `Timeline`, `Accordion`, `Badge`, `Tag`, `Avatar`, `AvatarGroup`, `Kbd` |
|
|
32
|
+
| Primitives | Typography | `Heading`, `Text`, `Prose`, `Code`, `CodeBlock`, `Figure` |
|
|
33
|
+
| Primitives | Display | `Icon`, `SquareGlyph`, `Divider`, `HatchDivider` |
|
|
34
|
+
| Layout | Structure | `AppShell` (top bar plus collapsible sidebar), `PageHeader`, `Container`, `Stack`, `Inline`, `Grid` |
|
|
35
|
+
| Charts | Data viz | `BarChart`, `LineChart`, `Sparkline` |
|
|
36
|
+
| Patterns | Content | `SectionHeader`, `Card`, `MediaCard`, `Quote`, `FaqList`, `TileGrid` |
|
|
37
|
+
| Templates | Pages | Sign in, Settings, List and detail, Form, Dashboard, Error |
|
|
38
|
+
|
|
39
|
+
Every form control shares one box: `card` fill, 1px `input-border` edge, square corners, 44px tall (`--control-height`). Focus adds a `primary` edge and the 2px `ring`; an invalid control gets a `primary` edge and its message; a disabled one turns transparent with a dashed edge and `muted-subtle` text. Checkboxes, radios and switches are square too, edged in `muted-subtle`, and fill `primary` when on.
|
|
40
|
+
|
|
41
|
+
Nothing renders as a native browser widget. The interactive components are built on Radix Primitives, which supply the WAI-ARIA keyboard, focus and screen-reader behaviour; `Select`, `Combobox`, `MultiSelect`, `DatePicker` and `TimePicker` draw their own panels, so every control looks and behaves the same in every browser. Exchange dates as `YYYY-MM-DD` strings and times as `HH:mm`.
|
|
42
|
+
|
|
43
|
+
Overlays (menus, popovers, listboxes, dialogs, drawers) share one surface: `surface-elevated`, 1px `border`, square corners, no shadow; modal ones sit on the `overlay` backdrop. Floating panels are positioned against their trigger with `position: fixed`, so a select inside a dialog, a drawer, a scrolling table or the app shell's main area is never clipped by that container; they flip above the trigger when there is no room below and shrink to the room they have. Layering follows the `z-*` tokens: dropdown < sticky < fixed < modal < popover < tooltip.
|
|
44
|
+
|
|
45
|
+
## Color
|
|
46
|
+
|
|
47
|
+
### Themes
|
|
48
|
+
|
|
49
|
+
- Three themes, chosen with `data-theme` on `<html>` (or any subtree): `dark` (the default, also `:root`), `light` and `contrast` (high contrast, dark-based, AAA). The same token names hold in every theme, so components never branch on the theme.
|
|
50
|
+
- Dark is the signature look and the default for products. Use `light` for documents, long reading, print and wherever a project or its users prefer it; offer `contrast` as a setting, never as the default.
|
|
51
|
+
- Follow the operating system with a small script that sets `data-theme` from `prefers-color-scheme` and `prefers-contrast: more`, and let people override it.
|
|
52
|
+
- Under Windows forced colors (`forced-colors: active`) the components hand over to system colors: focus rings, selected states, the primary button and chart marks stay visible.
|
|
53
|
+
|
|
54
|
+
### Using color
|
|
55
|
+
|
|
56
|
+
- Text: `foreground` for headings and anything that must be read, `muted-foreground` for supporting copy, navigation and labels, `muted-subtle` for metadata only (timestamps, IDs, placeholders). In dark, keep `muted-subtle` off `surface-elevated`, where it drops to 4.2:1.
|
|
57
|
+
- `primary` (Vokality orange) is the only brand hue. Spend it on the primary button, outline-button borders, the bold half of a headline, eyebrows, `+` and number markers, step numbers, and selected and active states. Never flood a large area with it.
|
|
58
|
+
- Text on an orange fill is `primary-foreground`, never white. Hover fills move to `primary-hover`, selected washes use `primary-tint`, hovered outlines use `primary-line`.
|
|
59
|
+
- Draw panels; don't fill them. Use a 1px `border-subtle` outline over a `card-fill` wash. Inputs fill with `card`, menus and popovers with `surface-elevated`. One featured band per screen may sit on `surface-sunken` with dashed `dash-line` rules.
|
|
60
|
+
- Keyboard focus is a solid 2px `ring` outline, offset 2–4px (1px on inputs). Every interactive element shows it.
|
|
61
|
+
- Status colors: `info` (blue), `success` (green), `warning` (amber) and `danger` (red), each with a `-tint` fill and a `-line` border. Use them only for status: alerts, toasts, badges, progress tones, stat changes and destructive actions; never for decoration, branding or chart series.
|
|
62
|
+
- Every status carries an icon and a word as well as its color (`info`, `circle-check`, `triangle-alert`, `circle-alert`; "Error:", "Paid", "Overdue"). Color alone never carries the meaning.
|
|
63
|
+
- Text on a filled status color is `on-status`; the only filled use is the `danger` button.
|
|
64
|
+
|
|
65
|
+
### Contrast
|
|
66
|
+
|
|
67
|
+
The test suite checks these pairs in every theme and fails the build if one slips (`scripts/contrast.mjs`). AA in dark and light (4.5:1 text, 3:1 UI), AAA in high contrast (7:1 text, 4.5:1 UI).
|
|
68
|
+
|
|
69
|
+
| Pair | Dark | Light | High contrast |
|
|
70
|
+
| --- | --- | --- | --- |
|
|
71
|
+
| `foreground` on `background` | 14.6 | 15.9 | 19.2 |
|
|
72
|
+
| `primary` on `background` | 5.8 | 5.0 | 9.2 |
|
|
73
|
+
| Status colors as text, worst surface | 5.4 | 5.5 | 8.8 |
|
|
74
|
+
| `input-border` (field edge), worst surface | 3.3 | 3.4 | 8.9 |
|
|
75
|
+
| `ring` on `background` | 4.8 | 5.0 | 10.5 |
|
|
76
|
+
|
|
77
|
+
- Control edges use `input-border`, which clears 3:1 everywhere, so a field is recognisable by its edge alone. `border` and `border-subtle` are decorative rules (1.6–1.9:1 in dark) and must never be the only sign that something is interactive.
|
|
78
|
+
|
|
79
|
+
### Charts
|
|
80
|
+
|
|
81
|
+
- Categorical series use `chart-1` to `chart-8` **in order, never cycled**: orange, aqua, blue, yellow, magenta, green, violet, red. The order was chosen so neighbouring series stay apart under the common color-vision deficiencies, checked with an OKLab distance test in both dark and light. A ninth series folds into "Other" or becomes small multiples.
|
|
82
|
+
- Magnitude uses the one-hue sequential ramp `seq-1` (low) to `seq-7` (high); polarity uses the diverging ramp `div-1` to `div-7` with a neutral gray at `div-4`. Each theme has its own steps; they are not flipped automatically.
|
|
83
|
+
- Charts keep one y-axis, thin marks, recessive `border-subtle` grid lines and text in text tokens, never in the series color. Two or more series always get a legend; four or fewer are also labelled directly. Every chart has a table view or summary for screen readers.
|
|
84
|
+
- Status colors never stand in for series.
|
|
85
|
+
|
|
86
|
+
## Type
|
|
87
|
+
|
|
88
|
+
- Three Google faces, each with one job:
|
|
89
|
+
- **Manrope** (`display`) for headlines, titles, questions and the section label.
|
|
90
|
+
- **IBM Plex Sans** (`sans`) for body copy, buttons, labels, navigation and eyebrows.
|
|
91
|
+
- **Space Grotesk** (`numeric`) for numbers, codes, IDs and glyphs, always with `tabular-nums`. Use it for every column of figures.
|
|
92
|
+
- Code uses the platform's monospace stack (`mono`: SF Mono, Cascadia Code, Menlo, Consolas) through `Code` and `CodeBlock`; it is not loaded as a web font.
|
|
93
|
+
- In apps, set headings with `Heading` and copy with `Text`; wrap long-form content (help pages, release notes, documents) in `Prose`, which styles plain HTML in the same scale.
|
|
94
|
+
- Contrast comes from weight and color more than from size: `display-light` (200) beside `display-bold` (700, `primary`).
|
|
95
|
+
- Headings use `text-wrap: balance`. Keep running text under 36–44rem.
|
|
96
|
+
- Uppercase is for small labels only, and always tracked: 0.06em (`numeric-label`), 0.08em (`meta`), 0.1em (`section-label`), 0.12em (`card-eyebrow`, `nav-link`, `badge`), 0.14em (`eyebrow`, `button`).
|
|
97
|
+
- The type styles give the desktop size. Display sizes scale down with `clamp()`, and each style notes its range.
|
|
98
|
+
|
|
99
|
+
## Space and layout
|
|
100
|
+
|
|
101
|
+
- Apps: wrap the screen in `AppShell` (56px top bar, 15rem sidebar that collapses to icons and becomes an overlay below 48rem), put a `PageHeader` at the top of each page, and lay out content with `Stack`, `Inline` and `Grid`. Start new pages from the templates.
|
|
102
|
+
- Sites and documents: set content in one frame, max-width 80rem (`--content-max`), outlined left, right and bottom by `border-subtle`, over a faint 10px dot grid (`.vk-dot-grid`) on marketing pages.
|
|
103
|
+
- The horizontal gutter is fluid: `--section-gutter: clamp(1.5rem, 5vw, 2.5rem)`. Marketing sections pad `clamp(2.75rem, 7vw, 4rem)` vertically; dense app screens use `space-lg` to `space-xl`.
|
|
104
|
+
- Use the fixed steps from `space-xs` to `space-3xl`. Keep gaps inside a component tight (0.35–0.65rem); grid gaps for cards are `clamp(0.75rem, 2vw, 1.25rem)`.
|
|
105
|
+
- Breakpoints (`bp-*`, also Tailwind's `xs`…`2xl`): 28rem small phones, 36rem paired form fields, 40rem end of phone layouts, 48rem tablets (split layouts, the sidebar stays open), 60rem wide grids and inline navigation, 80rem the frame's maximum.
|
|
106
|
+
- Running text stays under 44rem (`--prose-max`). Separate sections with a 1px `border-subtle` rule; reserve `HatchDivider` for at most two major breaks per page.
|
|
107
|
+
- Align to the left edge. Headlines, labels and cards start from the gutter; center only small controls and empty states.
|
|
108
|
+
|
|
109
|
+
## Shape, borders, depth
|
|
110
|
+
|
|
111
|
+
- `radius` is 0 everywhere: buttons, cards, inputs, menus, badges, glyph boxes and images. The only round shape is an avatar (`radius-round`).
|
|
112
|
+
- No shadows. Show depth with 1px outlines, `surface-elevated` for raised layers, dashed rules in a sunken band, the hatch bar, and the soft-light film grain (`.vk-grain`) on large hero areas.
|
|
113
|
+
|
|
114
|
+
## Motion
|
|
115
|
+
|
|
116
|
+
- Durations are tokens: `motion-fast` 200ms (link, icon and color changes), `motion-normal` 300ms (button fills, overlays opening), `motion-slow` 500ms (page entrance). Easing: `ease-standard`, `cubic-bezier(0.4, 0, 0.2, 1)`. They are exported to CSS, Tailwind and the DTCG file.
|
|
117
|
+
- Overlays fade and rise 0.5rem; drawers slide 1.5rem. Pages may float up 1.25rem on load. Images in media cards scale to 1.04 on hover.
|
|
118
|
+
- The square glyph's 3.4s border sweep is the one ambient animation; don't add others.
|
|
119
|
+
- Under `prefers-reduced-motion` every animation and transition stops.
|
|
120
|
+
|
|
121
|
+
## Iconography
|
|
122
|
+
|
|
123
|
+
- Draw icons as Lucide outlines at stroke 1.5–1.75 with round caps (`Icon`; files in **Icons**). The set covers actions, status, navigation, files and sorting; take more from Lucide at the same stroke and add them to the set.
|
|
124
|
+
- Icons sit beside a text label and take `currentColor`.
|
|
125
|
+
- Typographic marks do much of an icon's work: `+` for list bullets and inside square glyphs, `·` to join metadata, `|` between a name and a role, and zero-padded `01`, `02` for steps.
|
|
126
|
+
- No emoji, no filled or duotone icons, no illustrations.
|
|
127
|
+
|
|
128
|
+
## Imagery
|
|
129
|
+
|
|
130
|
+
- Show the product. Use real screenshots, square-cornered with a `border-subtle` edge, at 16:9 or 16:10 (**Imagery**).
|
|
131
|
+
- No stock photography. People appear only as avatars beside their own words.
|
|
132
|
+
|
|
133
|
+
## Logo
|
|
134
|
+
|
|
135
|
+
- On dark grounds use the white lockup `vokality-logo-white.png`, top left, about 9rem wide in a header and up to 7.5rem in a footer.
|
|
136
|
+
- `vokality-logo-color.png` (red mark, charcoal wordmark) is for light backgrounds only; its wordmark does not read on `background`.
|
|
137
|
+
- The mark alone (`vokality-mark-tile.svg`, `vokality-app-icon-512.png`) is the favicon and app icon. Use the files as they are; do not redraw or recolor the mark.
|
|
138
|
+
|
|
139
|
+
## Locale and formatting
|
|
140
|
+
|
|
141
|
+
- Format numbers, money, percentages and dates with `formatNumber`, `formatCurrency`, `formatPercent` and `formatDate`, and pass the same `locale` to `Calendar`, `DatePicker` and `TimePicker`. Never build these strings by hand.
|
|
142
|
+
- Supported and tested: `en-US`, `nl-NL`, and the Dutch Caribbean locales `nl-CW` (Curaçao), `nl-AW` (Aruba), `nl-SX` (Sint Maarten) and `nl-SR` (Suriname). Papiamentu tags (`pap-CW`, `pap-AW`) fall back to the matching Dutch locale for numbers and dates, since browsers carry no Papiamentu data.
|
|
143
|
+
- Currency: the Caribbean guilder (`XCG`, which replaced `ANG`) shows as "Cg.", the Aruban florin (`AWG`) as "Afl.". The Surinamese dollar always shows its code (`SRD`), because its local "$" reads as US dollars.
|
|
144
|
+
- Typed dates follow the locale's order (day first in Dutch and British English); `YYYY-MM-DD` and month names in the locale or in English always work.
|
|
145
|
+
|
|
146
|
+
## Touch and pointer
|
|
147
|
+
|
|
148
|
+
- Tooltips open on hover after 400ms, at once on keyboard focus, and on a tap for 1.5s. They hold only a hint: anything a touch user needs must also be visible or in the control's label.
|
|
149
|
+
- Every target is at least 32px (`sm` buttons) and 44px for form controls. Context menus also open with the keyboard (Shift+F10 or the Menu key).
|
|
150
|
+
|
|
151
|
+
## Using the system in code
|
|
152
|
+
|
|
153
|
+
- Install `@vokality/design-system` from the public npm registry, and import `@vokality/design-system/vokality.css` once. Installation does not require a token. It holds the fonts, all three themes and the component styles. The React components come from the package root; they are client components (`"use client"`) and render on the server without warnings. The formatting helpers are plain functions, usable in server components. `ThemeScript` and `useTheme` handle theme choice and switching; `LinkProvider` makes the system's links use the app's router. New projects start from the `Vokality/app-template` repository.
|
|
154
|
+
- Tailwind CSS v4 projects also import `@vokality/design-system/tailwind.css`, which maps every token onto Tailwind utilities (`bg-background`, `text-muted-foreground`, `border-input-border`, `font-display`, `md:` and the other breakpoints). Corners stay square.
|
|
155
|
+
- Design tools: `tokens.dtcg.json` is the W3C design-tokens format with one set per theme plus a shared set, and theme definitions. Import it into Figma with Tokens Studio, or feed it to Style Dictionary.
|
|
156
|
+
- Icons ship as SVG files under `icons/` as well as the `Icon` component.
|
|
157
|
+
|
|
158
|
+
## Source and status
|
|
159
|
+
|
|
160
|
+
- The visual language was first taken from the Vokality website and generalised for every Vokality project. The package (the private `Vokality/design-system` repository) is the source of truth: tokens in `tokens/tokens.json`, components in `src/`, and this documentation in `docs/`. Fluid `clamp()` sizes, textures and one-off color mixes live in the component CSS.
|
|
161
|
+
- Versioning follows semver: renaming or removing a token, component or prop is a major release; new tokens, components and props are minor; fixes are patches. See `CONTRIBUTING.md` and `CHANGELOG.md`.
|
|
162
|
+
- Not yet defined: rich-text editing, and a Figma component library (the tokens import into Figma; the components themselves exist only in code).
|
|
163
|
+
- Fonts are Latin subsets.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Accordion
|
|
2
|
+
|
|
3
|
+
A stack of sections that expand and collapse, for long content people scan by heading: settings groups, FAQs, details. Built on Radix Accordion.
|
|
4
|
+
|
|
5
|
+
## Anatomy
|
|
6
|
+
Rules of 1px `border-subtle` between items. Each heading is a full-width button in Manrope 600 (`text-base`) with a `chevron-down` that turns 180° and goes `primary` when open. The panel holds `small` text in `muted-foreground` and opens and closes by animating its height (`--radix-accordion-content-height`) over `motion-normal`; that motion stops under reduced motion.
|
|
7
|
+
|
|
8
|
+
## Behaviour
|
|
9
|
+
- `type="single"` (default) keeps one item open at a time, and a second press closes it again; `type="multiple"` lets several stay open.
|
|
10
|
+
- Style state with Radix's attributes: `[data-state=open|closed]` and `[data-disabled]` on `.vk-accordion-item`, `.vk-accordion-heading`, `.vk-accordion-trigger` and `.vk-accordion-panel` (this replaces the old `vk-accordion-open` class).
|
|
11
|
+
- Hover turns the heading `primary-hover`. Focus shows the 2px `ring`.
|
|
12
|
+
|
|
13
|
+
## Keyboard
|
|
14
|
+
Enter or Space toggles; ↓ ↑ move between enabled headings (wrapping); Home and End jump to the first or last.
|
|
15
|
+
|
|
16
|
+
## Accessibility
|
|
17
|
+
Each heading is a `button` inside a heading element (`headingLevel`, default `h3`) with `aria-expanded` and `aria-controls`; panels are `region`s labelled by their button.
|
|
18
|
+
|
|
19
|
+
## Props
|
|
20
|
+
- `items`: `{ id, title, content, disabled }`. `type`, `defaultOpen` (ids; with `type="single"` only the first opens), `headingLevel`.
|
|
21
|
+
|
|
22
|
+
## Rules
|
|
23
|
+
- Don't hide what everyone needs. Use an accordion when most people need only one section.
|
|
24
|
+
- For a short static Q&A on a page, `FaqList` shows everything at once.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Alert
|
|
2
|
+
|
|
3
|
+
An inline message about the page or a task: information, success, a warning or an error. It stays in place until the condition changes or someone dismisses it.
|
|
4
|
+
|
|
5
|
+
## Anatomy
|
|
6
|
+
1. **Box**: 1px border in the status `-line` color over its `-tint` fill, square, 0.85rem 1rem padding.
|
|
7
|
+
2. **Icon**: 18px, in the status color: `info`, `circle-check` (success), `triangle-alert` (warning), `circle-alert` (danger).
|
|
8
|
+
3. **Title**: Manrope 600, `text-base`, `foreground`.
|
|
9
|
+
4. **Text** (optional): `small`, `muted-foreground`.
|
|
10
|
+
5. **Action** (optional): usually an outline `Button` at `sm`.
|
|
11
|
+
6. **Dismiss** (optional): a 32px `IconButton` with an `x`.
|
|
12
|
+
|
|
13
|
+
## Status
|
|
14
|
+
| Status | Color tokens | Use |
|
|
15
|
+
| --- | --- | --- |
|
|
16
|
+
| `info` | `info`, `info-tint`, `info-line` | Neutral news: maintenance, a new feature, context |
|
|
17
|
+
| `success` | `success`, … | A task finished |
|
|
18
|
+
| `warning` | `warning`, … | Needs attention soon but nothing is broken |
|
|
19
|
+
| `danger` | `danger`, … | Something failed or is blocked |
|
|
20
|
+
|
|
21
|
+
## Accessibility
|
|
22
|
+
- A hidden status word ("Error:") is read before the title, so the meaning never relies on color.
|
|
23
|
+
- Static alerts that render with the page have no live role. Pass `live` for alerts that appear in response to an action; danger and warning then use `role="alert"`, the others `role="status"`.
|
|
24
|
+
|
|
25
|
+
## Props
|
|
26
|
+
- `status`, `title`, `children` (text), `action`, `onDismiss`, `dismissLabel`, `live`.
|
|
27
|
+
|
|
28
|
+
## Rules
|
|
29
|
+
- Titles state the situation in a few words ("Payment failed"); the text says what to do next.
|
|
30
|
+
- Put an alert where its problem is: above the form it concerns, or at the top of the page for page-wide notices.
|
|
31
|
+
- For short confirmations of an action someone just took, use a toast instead.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# AppShell
|
|
2
|
+
|
|
3
|
+
The frame of an application: a top bar with the brand, search and account actions; a sidebar for navigation; and the main area. On screens under 48rem the sidebar becomes a slide-over opened from a menu button.
|
|
4
|
+
|
|
5
|
+
## Anatomy
|
|
6
|
+
1. **Skip link**: "Skip to content", visible on keyboard focus, jumps to `main`.
|
|
7
|
+
2. **Top bar**: `topbar-height` (56px), sticky, `background` with a `border-subtle` rule. Holds the collapse (desktop) or menu (mobile) button, the brand, optional search (hidden on mobile) and actions.
|
|
8
|
+
3. **Sidebar**: `sidebar-width` (15rem), `border-subtle` rule on its right, scrolls on its own. Usually a `NavList`, with an optional footer.
|
|
9
|
+
4. **Main**: the page, with the fluid gutter, scrolling on its own. Start it with a `PageHeader`.
|
|
10
|
+
|
|
11
|
+
## Behaviour
|
|
12
|
+
- Desktop: the collapse button hides and shows the sidebar.
|
|
13
|
+
- Mobile (under 48rem): the menu button opens the sidebar over the page with the `overlay` scrim as a modal dialog (Radix Dialog, `aria-modal`, labelled by `sidebarLabel`): it slides in 1.5rem, focus moves to its first link and stays inside, the rest of the shell is hidden from assistive technology, and Esc or a scrim click closes it and returns focus to the menu button. Widening the window past 48rem closes it.
|
|
14
|
+
|
|
15
|
+
## Props
|
|
16
|
+
- `brand`, `sidebar`, `sidebarFooter`, `search`, `actions`, `children`, `defaultCollapsed`, `mainId`, `height`, and labels: `skipLabel`, `menuLabel`, `collapseLabel`, `expandLabel`, `sidebarLabel`.
|
|
17
|
+
|
|
18
|
+
## Rules
|
|
19
|
+
- One `AppShell` per app, at the root. Marketing pages don't use it.
|
|
20
|
+
- Keep the top bar to brand, search, notifications and account. Page actions go in the `PageHeader`.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Avatar
|
|
2
|
+
|
|
3
|
+
A person's photo or initials in a disc: the only round shape in the system.
|
|
4
|
+
|
|
5
|
+
## Anatomy
|
|
6
|
+
- **Photo**: `object-fit: cover`, `radius-round`.
|
|
7
|
+
- **Initials**: up to two letters in Manrope 600 (about a third of the size), `muted-foreground` on `muted-foreground` at 22%.
|
|
8
|
+
|
|
9
|
+
## Sizes
|
|
10
|
+
24px (dense lists), 34px (default, beside a name), 48px (profile headers). Pass any `size` in px.
|
|
11
|
+
|
|
12
|
+
## Props
|
|
13
|
+
- `src` and `alt`, or `name` (used for initials and the accessible label). `size`. `decorative` hides it from screen readers when the name is printed next to it.
|
|
14
|
+
|
|
15
|
+
## Rules
|
|
16
|
+
- People only, never logos or products.
|
|
17
|
+
- Put the name next to the avatar; don't rely on the picture alone.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# AvatarGroup
|
|
2
|
+
|
|
3
|
+
A row of overlapping avatars for the people on a record, with a "+N" for the rest.
|
|
4
|
+
|
|
5
|
+
## Anatomy
|
|
6
|
+
`Avatar`s overlapping by 6px, each ringed in `background` so edges stay clear, and a "+N" disc in Space Grotesk on `card`.
|
|
7
|
+
|
|
8
|
+
## Props
|
|
9
|
+
- `people`: `{ name, src }[]`, `max` (4, including the +N), `size` (28), `label` (defaults to every name).
|
|
10
|
+
|
|
11
|
+
## Accessibility
|
|
12
|
+
The group is one image named with everyone's names, so screen readers don't read each disc.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Badge
|
|
2
|
+
|
|
3
|
+
A small outlined tag for status, set beside a title or in a table cell.
|
|
4
|
+
|
|
5
|
+
## Anatomy
|
|
6
|
+
A square outline with 0.2rem 0.5rem padding around a 10px uppercase IBM Plex Sans label (`badge` style, 0.12em tracking). No fill.
|
|
7
|
+
|
|
8
|
+
## Tones
|
|
9
|
+
| Tone | Text | Border | Use |
|
|
10
|
+
| --- | --- | --- | --- |
|
|
11
|
+
| default | `primary` | `primary-line` | Product status: Beta, New, Coming soon |
|
|
12
|
+
| `neutral` | `muted-foreground` | `border` | Draft, Archived |
|
|
13
|
+
| `info` | `info` | `info-line` | Sent, Scheduled |
|
|
14
|
+
| `success` | `success` | `success-line` | Paid, Live, Passed |
|
|
15
|
+
| `warning` | `warning` | `warning-line` | Due soon, Expiring |
|
|
16
|
+
| `danger` | `danger` | `danger-line` | Overdue, Failed |
|
|
17
|
+
|
|
18
|
+
## Props
|
|
19
|
+
- `children`: one or two words ("Beta", "Draft", "Overdue"). `tone`.
|
|
20
|
+
|
|
21
|
+
## Rules
|
|
22
|
+
- Status only. Categories go in an eyebrow, not a badge.
|
|
23
|
+
- One badge per item.
|
|
24
|
+
- The word carries the meaning; the tone reinforces it. Never use a tone without a word.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# BarChart
|
|
2
|
+
|
|
3
|
+
Vertical bars for comparing amounts across categories or periods: grouped for a few series, or stacked to show a total and its parts.
|
|
4
|
+
|
|
5
|
+
## Anatomy
|
|
6
|
+
1. **Header**: optional title and description, and a ghost "Show table" button.
|
|
7
|
+
2. **Legend**: square swatches, shown for two or more series.
|
|
8
|
+
3. **Plot**: bars with square ends and a 2px gap between neighbors, faint gridlines on nice round ticks, the baseline in `border`, category labels below.
|
|
9
|
+
4. **Tooltip**: on hover or keyboard focus, the category with each series' value; the hovered band gets a `card-fill` wash.
|
|
10
|
+
|
|
11
|
+
## Props
|
|
12
|
+
- `data`: rows; `xKey` (default `label`) names the category field.
|
|
13
|
+
- `series`: `{ key, label }[]`; omit for one series read from `value`.
|
|
14
|
+
- `stacked`, `height` (240), `valueFormat(v)`, `tickFormat(v)`, `title`, `description`, `allowTable` (true), `locale`.
|
|
15
|
+
|
|
16
|
+
## Color
|
|
17
|
+
- Series take `chart-1` … `chart-8` in order and never cycle; slot 1 is Vokality orange. A ninth series folds into "Other".
|
|
18
|
+
- Slots 1–3 stay distinct for color-blind readers even in scatter-type charts where any two marks can meet; past three series there, use small multiples.
|
|
19
|
+
- The order was validated with the data-visualization checks (OKLab ΔE ×100 under protanopia and deuteranopia): worst neighboring pair 9.2 light and 9.4 dark against a target of 8, and 19.6 / 19.3 for full color vision against a floor of 15.
|
|
20
|
+
- In light, slots 1, 2, 4 and 5 sit under 3:1 on the page, so light-theme charts keep their legend, direct labels and table view on.
|
|
21
|
+
- Status colors are never series colors. Magnitude uses `seq-1`…`seq-7`; above or below a baseline uses `div-1`…`div-7` (blue, gray midpoint, orange).
|
|
22
|
+
|
|
23
|
+
## Accessibility
|
|
24
|
+
- Every chart carries a visually hidden data table, so screen readers get the numbers. "Show table" swaps the chart for the same table on screen.
|
|
25
|
+
- The plot is focusable: ← → move through the points and show the tooltip, Home and End jump to the ends, Esc hides it.
|
|
26
|
+
- Two or more series always get a legend; text uses text tokens, never the series color.
|
|
27
|
+
|
|
28
|
+
## Rules
|
|
29
|
+
- One y-axis per chart. Two measures of different scale get two charts.
|
|
30
|
+
- Gridlines are faint (`border-subtle`), the baseline is `border`, tick labels are Space Grotesk in `muted-subtle`.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Breadcrumbs
|
|
2
|
+
|
|
3
|
+
The path from a section to the current page, for pages nested more than one level deep.
|
|
4
|
+
|
|
5
|
+
## Anatomy
|
|
6
|
+
`small` links in `muted-foreground` (hover `foreground`, underlined) separated by a `/` in `muted-subtle`. The last item is the current page, in `foreground`, not a link.
|
|
7
|
+
|
|
8
|
+
## Props
|
|
9
|
+
- `items`: `{ label, href }[]`, the last being the current page. `label` (default "Breadcrumb").
|
|
10
|
+
|
|
11
|
+
## Accessibility
|
|
12
|
+
A `nav` landmark with an ordered list; the current page has `aria-current="page"`; separators are hidden from screen readers.
|
|
13
|
+
|
|
14
|
+
## Rules
|
|
15
|
+
- Put breadcrumbs above the page title. Skip them on top-level pages.
|
|
16
|
+
- Show the hierarchy, not the visit history.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Button
|
|
2
|
+
|
|
3
|
+
The text button for every action, in three variants and two sizes, always square, uppercase and tracked.
|
|
4
|
+
|
|
5
|
+
## Anatomy
|
|
6
|
+
1. **Container**: square (`radius`), 1px border, 40px minimum height (32px at `sm`).
|
|
7
|
+
2. **Label**: IBM Plex Sans, `button` style (12px, 0.14em tracking, uppercase); 11px at `sm`.
|
|
8
|
+
3. **Glyph cell** (optional, `arrow`): a 2.25rem cell on the right holding `arrow-up-right`, for links that leave the product.
|
|
9
|
+
|
|
10
|
+
## Variants
|
|
11
|
+
| Variant | Use | Fill | Border | Label |
|
|
12
|
+
| --- | --- | --- | --- | --- |
|
|
13
|
+
| `primary` | The one main action on a view | `primary` | `primary` | `primary-foreground`, 700 |
|
|
14
|
+
| `outline` | Secondary actions | none | `primary` | `foreground`, 600 |
|
|
15
|
+
| `ghost` | Low-emphasis actions in toolbars, dialogs and dense rows | none | none | `foreground`, 600 |
|
|
16
|
+
| `danger` | The confirming action of a destructive dialog ("Delete invoice") | `danger` | `danger` | `on-status`, 700 |
|
|
17
|
+
|
|
18
|
+
## Sizes
|
|
19
|
+
| Size | Min height | Label | Padding |
|
|
20
|
+
| --- | --- | --- | --- |
|
|
21
|
+
| default | 40px | 12px | 0.65rem 1.25rem |
|
|
22
|
+
| `sm` | 32px | 11px | 0.4rem 0.85rem |
|
|
23
|
+
|
|
24
|
+
## States
|
|
25
|
+
| State | Primary | Outline | Ghost |
|
|
26
|
+
| --- | --- | --- | --- |
|
|
27
|
+
| Rest | `primary` fill | transparent, `primary` border | transparent |
|
|
28
|
+
| Hover | `primary-hover` fill and border | `primary-tint` fill, `primary-hover` border, glyph `primary-hover` | `primary-tint` fill |
|
|
29
|
+
| Focus | 2px `ring` outline, 3px offset | same | same |
|
|
30
|
+
| Busy / disabled | 70% opacity, `progress` cursor, change the label ("Saving…") | 50% opacity, `not-allowed` cursor | 50% opacity |
|
|
31
|
+
|
|
32
|
+
## Props
|
|
33
|
+
- `children`: the label in sentence case, starting with a verb.
|
|
34
|
+
- `variant`: `primary` (default), `outline`, `ghost` or `danger`. `size`: `sm` for dense screens.
|
|
35
|
+
- `href` renders an `<a>`; otherwise a `<button type="button">`. Pass `type="submit"` in forms.
|
|
36
|
+
- `arrow` adds the external-link glyph cell. Other attributes pass through.
|
|
37
|
+
- `loading` disables the button, sets `aria-busy` and shows a spinner before the label; `loadingLabel` replaces the label while it runs ("Saving…"). Use it instead of building the spinner yourself.
|
|
38
|
+
- `block` stretches the button to its container (sign-in forms, mobile sheets).
|
|
39
|
+
|
|
40
|
+
## Rules
|
|
41
|
+
- One `primary` per view. Put it first in a row and last in a dialog footer.
|
|
42
|
+
- Under 40rem, buttons stretch to the column width.
|
|
43
|
+
- Don't use a button for navigation inside running text; use `Link`.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Calendar
|
|
2
|
+
|
|
3
|
+
A month grid for picking a date or a date range. It sits inline on a page, or inside `DatePicker`.
|
|
4
|
+
|
|
5
|
+
## Anatomy
|
|
6
|
+
1. **Header**: previous and next `IconButton`s (36px) around the month title in Manrope 600, announced politely when it changes.
|
|
7
|
+
2. **Weekday row**: two-letter abbreviations, 11px uppercase, 0.08em tracking, `muted-subtle`; the full name is in `abbr`.
|
|
8
|
+
3. **Day**: a 40×36px square button with the number in Space Grotesk (`tabular-nums`, 14px). There are always six rows, so the height never jumps.
|
|
9
|
+
|
|
10
|
+
## Day states
|
|
11
|
+
| State | Treatment |
|
|
12
|
+
| --- | --- |
|
|
13
|
+
| Default | `foreground` |
|
|
14
|
+
| Outside the month | `muted-subtle` |
|
|
15
|
+
| Today | a 2px `primary` bar under the number (`primary-foreground` when selected), plus `aria-current="date"` |
|
|
16
|
+
| Hover | 1px `primary-line` edge |
|
|
17
|
+
| Focus | 2px `ring` outline |
|
|
18
|
+
| Selected / range ends | `primary` fill, `primary-foreground` number |
|
|
19
|
+
| In range (and hover preview) | `primary-tint` fill, joined across the row |
|
|
20
|
+
| Disabled (outside `min`/`max`, or `isDateDisabled`) | `muted-subtle` with a strike-through; can be focused but not chosen |
|
|
21
|
+
|
|
22
|
+
## Keyboard
|
|
23
|
+
| Key | Action |
|
|
24
|
+
| --- | --- |
|
|
25
|
+
| ← → | Previous or next day |
|
|
26
|
+
| ↑ ↓ | Same day in the previous or next week |
|
|
27
|
+
| Home / End | Start or end of the week |
|
|
28
|
+
| PageUp / PageDown | Previous or next month (with Shift: year) |
|
|
29
|
+
| Enter / Space | Choose the focused day |
|
|
30
|
+
|
|
31
|
+
Only the focused day is in the tab order (a roving tabindex), so Tab moves between the header buttons and the grid.
|
|
32
|
+
|
|
33
|
+
## Accessibility
|
|
34
|
+
`role="grid"` labelled by the month title. Each day button has a full spoken label ("Saturday, October 10, 2026"), and chosen cells carry `aria-selected`.
|
|
35
|
+
|
|
36
|
+
## Props
|
|
37
|
+
- `mode`: `single` (default) or `range`.
|
|
38
|
+
- Single: `value` / `defaultValue` as `"YYYY-MM-DD"`. Range: `{ start, end }`. `onChange(next)`.
|
|
39
|
+
- `min`, `max` (`"YYYY-MM-DD"`), `isDateDisabled(iso)`, `weekStartsOn` (0 = Sunday, default; 1 = Monday), `locale` (default `en-US`), `defaultMonth`, `autoFocus`.
|
|
40
|
+
|
|
41
|
+
## Rules
|
|
42
|
+
- Dates go in and out as ISO strings (`YYYY-MM-DD`), with no time zone, so a date never shifts by a day.
|
|
43
|
+
- In range mode, the first click sets the start and the second sets the end; clicking earlier than the start swaps them.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Card
|
|
2
|
+
|
|
3
|
+
An outlined panel for a short block of content: a feature, a plan, a step, a summary.
|
|
4
|
+
|
|
5
|
+
## What you provide
|
|
6
|
+
- `title` (required) and body text as `children`.
|
|
7
|
+
- `eyebrow` (optional): a short category in `primary` above the title.
|
|
8
|
+
- `step` (optional): a number shown zero-padded in Space Grotesk ("01") when cards are a real sequence.
|
|
9
|
+
- `points` (optional): a short list, each line marked with an orange `+`, pushed to the bottom behind a rule.
|
|
10
|
+
- `footnote` (optional): one line pushed to the bottom behind a rule.
|
|
11
|
+
- `as`: `li` inside a list, `div` by default.
|
|
12
|
+
|
|
13
|
+
## Rules
|
|
14
|
+
- 1px `border-subtle` outline on a `card-fill` wash, square corners, no shadow.
|
|
15
|
+
- Lay cards out with `.vk-card-grid` plus `.vk-card-grid-2`, `-3` or `-4`: one column on phones, two from 40rem, three or four from 60rem. In a three-up grid at two columns, an odd last card spans the row.
|
|
16
|
+
- Keep titles to a few words and bodies under three lines.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Checkbox
|
|
2
|
+
|
|
3
|
+
A square box for turning a single option on or off, or for picking several options from a list. Built on Radix Checkbox.
|
|
4
|
+
|
|
5
|
+
## Anatomy
|
|
6
|
+
1. **Box**: 18×18px, square, `card` fill, 1px `muted-subtle` border (5.1:1 on `background`, so the control edge passes 3:1).
|
|
7
|
+
2. **Check**: a 2px square-capped stroke in `primary-foreground`.
|
|
8
|
+
3. **Label**: `small` (14px) in `foreground`, 0.65rem from the box. An optional **description** sits below in `muted-foreground`.
|
|
9
|
+
|
|
10
|
+
## States
|
|
11
|
+
| State | Box | Mark |
|
|
12
|
+
| --- | --- | --- |
|
|
13
|
+
| Unchecked | `card` fill, `muted-subtle` border | none |
|
|
14
|
+
| Hover | border `primary-hover` | |
|
|
15
|
+
| Checked | `primary` fill and border | `primary-foreground` check |
|
|
16
|
+
| Indeterminate | `primary` fill and border | `primary-foreground` dash (some, not all, of a group selected) |
|
|
17
|
+
| Focus | 2px `ring` outline, 2px offset, on the box | |
|
|
18
|
+
| Invalid | `primary` border | |
|
|
19
|
+
| Disabled | transparent, dashed border; label `muted-subtle` | |
|
|
20
|
+
| Disabled, checked | `muted-subtle` fill and border | `primary-foreground` check |
|
|
21
|
+
|
|
22
|
+
## Props
|
|
23
|
+
- `label` (required), `description`, `indeterminate`, `hideLabel` (keeps the label for screen readers only, as in table rows), and any checkbox attribute: `name`, `value`, `checked` or `defaultChecked`, `onChange`, `disabled`, `required`.
|
|
24
|
+
- `onChange` receives a change event whose `target` reads `checked`, `value` and `name` as a native checkbox would. Clicking an indeterminate box checks it.
|
|
25
|
+
- The ref (and any `Tooltip` or `Popover` around it) gets the control, a `button` with `role="checkbox"` and `aria-checked` (`mixed` when indeterminate). Inside a `form` a hidden checkbox carries `name`, `value` and `required`, so it submits, validates and resets like a native one.
|
|
26
|
+
|
|
27
|
+
## Rules
|
|
28
|
+
- The label states what will be true when checked ("Email me when an invoice is paid").
|
|
29
|
+
- The whole label is the click target.
|
|
30
|
+
- For a setting that applies immediately, use `Switch` instead.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Code
|
|
2
|
+
|
|
3
|
+
Inline code: a value, a key or a command inside a sentence.
|
|
4
|
+
|
|
5
|
+
## Anatomy
|
|
6
|
+
The mono face at 0.875em, `foreground` on `card` with a 1px `border-subtle` edge, square.
|
|
7
|
+
|
|
8
|
+
## Rules
|
|
9
|
+
- Use it for things people type or read exactly (`bun run build`, `INV-1043`, `XCG`). For more than one line, use `CodeBlock`.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# CodeBlock
|
|
2
|
+
|
|
3
|
+
A block of code or terminal output with a title, an optional line-number gutter and a copy button.
|
|
4
|
+
|
|
5
|
+
## Anatomy
|
|
6
|
+
1. **Header**: the title or language, 11px uppercase `muted-foreground`, and a Copy button that changes to "Copied" for 1.6 seconds (announced politely).
|
|
7
|
+
2. **Code**: the mono face at 13px / 1.65 on `card`, scrolling sideways when long, focusable so keyboard users can scroll it.
|
|
8
|
+
3. **Line numbers** (optional): `muted-subtle`, not selectable.
|
|
9
|
+
|
|
10
|
+
## Props
|
|
11
|
+
- `code` (string), `title`, `language`, `lineNumbers`, `copy` (true).
|
|
12
|
+
|
|
13
|
+
## Rules
|
|
14
|
+
- No syntax colors: they'd compete with the one accent. Keep examples short and runnable.
|
|
15
|
+
- If copying fails (some embedded views block the clipboard), the code is selected so people can copy it themselves.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Combobox
|
|
2
|
+
|
|
3
|
+
A searchable single select: type to filter a list, then pick one option. Its list is positioned by Radix Popover. Use it in place of `Select` when the list is long (time zones, countries, customers) or people know what they're looking for.
|
|
4
|
+
|
|
5
|
+
## Anatomy
|
|
6
|
+
1. **Input**: the `Input` box with `role="combobox"`, showing the chosen label. An optional leading `search` icon (`icon="search"`).
|
|
7
|
+
2. **Right control**: a `chevron-down` while empty; an `x` clear button once there is text.
|
|
8
|
+
3. **List**: the same panel as `Select` (`surface-elevated`, 1px `border`, at most 16rem). It is placed by Radix Popover and rendered in a portal on the body, so a dialog, drawer or scrolling container never clips it: 4px under the field and at least as wide, flipping above when there's no room below and shrinking to the room it has. It layers at `z-popover` and carries `data-state` and `data-side` (`top` or `bottom`).
|
|
9
|
+
4. **Option**: label plus optional `description`. The typed text is marked in each label (600 weight with a 2px `primary` underline). The chosen option is `primary-hover` with a `check`.
|
|
10
|
+
5. **Empty state**: "No matches for “…”" in `muted-foreground`, announced politely.
|
|
11
|
+
|
|
12
|
+
## States
|
|
13
|
+
| Part | State | Treatment |
|
|
14
|
+
| --- | --- | --- |
|
|
15
|
+
| Input | Focus or open | `primary` edge; focus adds the 2px `ring` |
|
|
16
|
+
| Input | Invalid / disabled | As `Input` |
|
|
17
|
+
| Option | Active | `primary-tint` fill |
|
|
18
|
+
| Option | Disabled | `muted-subtle`, skipped by arrows |
|
|
19
|
+
|
|
20
|
+
## Behaviour
|
|
21
|
+
- Focusing a filled combobox selects its text, so typing replaces it.
|
|
22
|
+
- Filtering is a case-insensitive "contains" match on the label and description.
|
|
23
|
+
- Leaving the field without choosing restores the last chosen label. Clearing the text and leaving clears the value.
|
|
24
|
+
|
|
25
|
+
## Keyboard
|
|
26
|
+
| Key | Action |
|
|
27
|
+
| --- | --- |
|
|
28
|
+
| Typing | Filters and opens the list; the first match is active |
|
|
29
|
+
| ↓ / ↑ | Opens the list, or moves through options (Alt + ↓ opens without moving) |
|
|
30
|
+
| Enter | Chooses the active option |
|
|
31
|
+
| Esc | Closes and restores the text; a second Esc clears the field |
|
|
32
|
+
| Tab | Closes without changing the value |
|
|
33
|
+
|
|
34
|
+
## Accessibility
|
|
35
|
+
WAI-ARIA combobox with list autocomplete: `aria-autocomplete="list"`, `aria-expanded`, `aria-controls` and `aria-activedescendant` on the input. The list is a `listbox` of `option`s. Built on Radix Popover for placement only: it is non-modal and never takes focus, so focus stays in the input while the list is open, after choosing, and after Esc or a click outside closes it.
|
|
36
|
+
|
|
37
|
+
## Props
|
|
38
|
+
- `options`: strings or `{ value, label, description, disabled }`. `value` + `onChange(value, option)`, or `defaultValue`.
|
|
39
|
+
- `placeholder`, `icon="search"`, `name` (hidden input), `emptyText`, `clearLabel`, `disabled`, `required`, `defaultOpen`.
|
|
40
|
+
|
|
41
|
+
## Rules
|
|
42
|
+
- Use `Select` for short lists people scan; use Combobox from about 10 options up.
|
|
43
|
+
- Put the most common choices first; filtering handles the rest.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# CommandPalette
|
|
2
|
+
|
|
3
|
+
A searchable list of every action and destination in an app, opened with ⌘K (Ctrl+K on Windows and Linux).
|
|
4
|
+
|
|
5
|
+
## Anatomy
|
|
6
|
+
A `Dialog` (Radix Dialog) near the top of the screen (12vh down) with a borderless search field, a grouped list of commands (icon, label with the match marked, shortcut) and a footer of key hints.
|
|
7
|
+
|
|
8
|
+
## Keyboard
|
|
9
|
+
⌘K / Ctrl+K toggles it from anywhere. Typing filters by label, keywords and group; ↓ ↑ move; Enter runs the command and closes; Esc or a backdrop click closes it and returns focus.
|
|
10
|
+
|
|
11
|
+
## Accessibility
|
|
12
|
+
A modal dialog containing a combobox (the search) that controls a listbox of options; the active command is announced through `aria-activedescendant`.
|
|
13
|
+
|
|
14
|
+
## Props
|
|
15
|
+
- `commands`: `{ id, label, group, icon, shortcut, keywords, disabled, onSelect }[]`.
|
|
16
|
+
- `open` + `onOpenChange`, or uncontrolled with the hotkey. `hotkey` (true), `placeholder`, `emptyText`, `title`.
|
|
17
|
+
|
|
18
|
+
## Rules
|
|
19
|
+
- Name commands as verbs or destinations ("Create invoice", "Go to Clients"). Group them by what they act on.
|
|
20
|
+
- Every command must also exist in the regular interface; the palette is a shortcut.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Container
|
|
2
|
+
|
|
3
|
+
Centers content at the frame width (`content-max`, 80rem) or the reading width (`prose-max`, 44rem), with the fluid page gutter on each side.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
- `size`: `content` (default) or `prose`. `padded={false}` drops the side gutter. `as`.
|
|
7
|
+
|
|
8
|
+
## Rules
|
|
9
|
+
- Marketing pages: one `content` container per band. Docs and articles: `prose`.
|
|
10
|
+
- Inside `AppShell`, the main area already has a gutter; don't nest a padded container.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# ContextMenu
|
|
2
|
+
|
|
3
|
+
Right-click (or long-press, or Shift+F10) actions for a region: a file, a row, a canvas object. Built on Radix ContextMenu (non-modal).
|
|
4
|
+
|
|
5
|
+
## Behaviour
|
|
6
|
+
- Opens at the pointer (or after a 700ms press on touch screens) with the same `Menu` panel, items, separators, checkable items and submenus, and the same keyboard. It stays inside the viewport and focus moves to its first item.
|
|
7
|
+
- Shift+F10 or the context-menu key opens it at the focused element's bottom-left corner (in every browser, not only those that send a `contextmenu` event for those keys). Esc, Tab, a click outside or scrolling closes it; after Esc, Tab or choosing an item focus returns to where it was.
|
|
8
|
+
|
|
9
|
+
## Props
|
|
10
|
+
- `items` (as in `Menu`), `children` (the region, wrapped in a `div.vk-context-target`; put a focusable element inside so keyboard users can open it), `label` (the menu's name, default "Actions"), `disabled` (no menu: the browser's own shows instead).
|
|
11
|
+
|
|
12
|
+
## Rules
|
|
13
|
+
- A context menu is a shortcut. Every action in it must also be reachable another way (a row `Menu`, a toolbar button), because touch and keyboard users may never open it.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Dashboard template
|
|
2
|
+
|
|
3
|
+
An overview screen: key numbers first, then the trends behind them, then the items that need attention.
|
|
4
|
+
|
|
5
|
+
## Built from
|
|
6
|
+
`AppShell`, `PageHeader`, `SegmentedControl`, `Grid`, `Stat`, `Sparkline`, `BarChart`, `LineChart`, `List`, `Badge`, `Alert`.
|
|
7
|
+
|
|
8
|
+
## Rules
|
|
9
|
+
- Summary before detail: a row of three to five `Stat`s, then charts, then lists of things to act on.
|
|
10
|
+
- One period control for the whole page (in the header), not one per chart.
|
|
11
|
+
- Every chart has a title that says what it shows and a table view. Charts never use status colors for series.
|
|
12
|
+
- Put anything that needs action in a list with a clear next step, not only in a chart.
|