@nvidia/foundations-css 0.0.0-stage → 1.24.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/CHANGELOG.md +11 -0
- package/LICENSE.md +203 -0
- package/NOTICE.md +62 -0
- package/README.md +61 -2
- package/dist/base/a11y.css +1 -0
- package/dist/base/all.js +1225 -0
- package/dist/base/anchor.css +1 -0
- package/dist/base/base-external.css +15 -0
- package/dist/base/base-for-aem-only.css +15 -0
- package/dist/base/base.css +15 -0
- package/dist/base/fonts-external.css +1 -0
- package/dist/base/fonts.css +1 -0
- package/dist/base/icons.css +15 -0
- package/dist/base/motion.css +1 -0
- package/dist/base/reset.css +1 -0
- package/dist/base/theme-dark.css +1 -0
- package/dist/base/theme-density.css +1 -0
- package/dist/base/theme-light.css +1 -0
- package/dist/base/theme-only-dark.css +1 -0
- package/dist/base/top-layer-reset.css +1 -0
- package/dist/base/variables.css +1 -0
- package/dist/components/accordion.css +1 -0
- package/dist/components/all.css +1 -0
- package/dist/components/all.js +16546 -0
- package/dist/components/anchor.css +1 -0
- package/dist/components/animated-chevron.css +1 -0
- package/dist/components/app-bar.css +1 -0
- package/dist/components/attachment.css +1 -0
- package/dist/components/audio.css +1 -0
- package/dist/components/autocomplete.css +1 -0
- package/dist/components/avatar-group.css +1 -0
- package/dist/components/avatar.css +1 -0
- package/dist/components/badge.css +1 -0
- package/dist/components/banner.css +1 -0
- package/dist/components/block.css +1 -0
- package/dist/components/breadcrumbs.css +1 -0
- package/dist/components/button.css +1 -0
- package/dist/components/card.css +1 -0
- package/dist/components/carousel.css +1 -0
- package/dist/components/chat-bubble.css +1 -0
- package/dist/components/checkbox.css +1 -0
- package/dist/components/code-snippet.css +1 -0
- package/dist/components/collapsible.css +1 -0
- package/dist/components/combobox.css +1 -0
- package/dist/components/command.css +1 -0
- package/dist/components/context-menu.css +1 -0
- package/dist/components/date-picker.css +1 -0
- package/dist/components/divider.css +1 -0
- package/dist/components/dropdown.css +1 -0
- package/dist/components/flex.css +1 -0
- package/dist/components/form-field.css +1 -0
- package/dist/components/grid-item.css +1 -0
- package/dist/components/grid.css +1 -0
- package/dist/components/group.css +1 -0
- package/dist/components/halo.css +1 -0
- package/dist/components/hero.css +1 -0
- package/dist/components/horizontal-nav.css +1 -0
- package/dist/components/hover-card.css +1 -0
- package/dist/components/inline-notice.css +1 -0
- package/dist/components/input-shell.css +1 -0
- package/dist/components/jump-nav.css +1 -0
- package/dist/components/kbd.css +1 -0
- package/dist/components/key-value-editor.css +1 -0
- package/dist/components/key-value-group.css +1 -0
- package/dist/components/label.css +1 -0
- package/dist/components/legend.css +1 -0
- package/dist/components/list.css +1 -0
- package/dist/components/menu.css +1 -0
- package/dist/components/meter.css +1 -0
- package/dist/components/modal.css +1 -0
- package/dist/components/notification.css +1 -0
- package/dist/components/otp-input.css +1 -0
- package/dist/components/page-header.css +1 -0
- package/dist/components/pagination.css +1 -0
- package/dist/components/panel.css +1 -0
- package/dist/components/popover.css +1 -0
- package/dist/components/primitive.css +1 -0
- package/dist/components/progress-bar.css +1 -0
- package/dist/components/radio-group.css +1 -0
- package/dist/components/range-slider.css +1 -0
- package/dist/components/rating.css +1 -0
- package/dist/components/reaction-group.css +1 -0
- package/dist/components/resizable.css +1 -0
- package/dist/components/segmented-control.css +1 -0
- package/dist/components/segmented-meter.css +1 -0
- package/dist/components/select.css +1 -0
- package/dist/components/severity.css +1 -0
- package/dist/components/side-panel.css +1 -0
- package/dist/components/skeleton.css +1 -0
- package/dist/components/slider.css +1 -0
- package/dist/components/spinner.css +1 -0
- package/dist/components/status-indicator.css +1 -0
- package/dist/components/status-message.css +1 -0
- package/dist/components/stepper.css +1 -0
- package/dist/components/switch.css +1 -0
- package/dist/components/table.css +1 -0
- package/dist/components/tabs.css +1 -0
- package/dist/components/tag-group.css +1 -0
- package/dist/components/tag.css +1 -0
- package/dist/components/terminal-line.css +1 -0
- package/dist/components/text-area.css +1 -0
- package/dist/components/text-content.css +1 -0
- package/dist/components/text.css +1 -0
- package/dist/components/toast.css +1 -0
- package/dist/components/toaster.css +1 -0
- package/dist/components/toggle-button-group.css +1 -0
- package/dist/components/toggle-button.css +1 -0
- package/dist/components/tooltip.css +1 -0
- package/dist/components/tree-nav.css +1 -0
- package/dist/components/upload.css +1 -0
- package/dist/components/vertical-nav.css +1 -0
- package/dist/css-sizes.js +1279 -0
- package/dist/index.cjs +3041 -0
- package/dist/index.d.cts +27 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.js +3014 -0
- package/dist/plugins/tailwind-theme.css +504 -0
- package/dist/plugins/tailwind3-theme.js +682 -0
- package/dist/plugins/variables-sass.sass +414 -0
- package/dist/themes/kui11/_theme-selectors.css +1 -0
- package/dist/themes/kui11/accordion.css +1 -0
- package/dist/themes/kui11/app-bar.css +1 -0
- package/dist/themes/kui11/avatar.css +1 -0
- package/dist/themes/kui11/badge.css +1 -0
- package/dist/themes/kui11/banner.css +1 -0
- package/dist/themes/kui11/base.css +1 -0
- package/dist/themes/kui11/breadcrumbs.css +1 -0
- package/dist/themes/kui11/button.css +1 -0
- package/dist/themes/kui11/card.css +1 -0
- package/dist/themes/kui11/checkbox.css +1 -0
- package/dist/themes/kui11/components.css +1 -0
- package/dist/themes/kui11/date-picker.css +1 -0
- package/dist/themes/kui11/form-field.css +1 -0
- package/dist/themes/kui11/hero.css +1 -0
- package/dist/themes/kui11/horizontal-nav.css +1 -0
- package/dist/themes/kui11/input-shell.css +1 -0
- package/dist/themes/kui11/label.css +1 -0
- package/dist/themes/kui11/menu.css +1 -0
- package/dist/themes/kui11/modal.css +1 -0
- package/dist/themes/kui11/notification.css +1 -0
- package/dist/themes/kui11/page-header.css +1 -0
- package/dist/themes/kui11/pagination.css +1 -0
- package/dist/themes/kui11/popover.css +1 -0
- package/dist/themes/kui11/progress-bar.css +1 -0
- package/dist/themes/kui11/radio-group.css +1 -0
- package/dist/themes/kui11/range-slider.css +1 -0
- package/dist/themes/kui11/side-panel.css +1 -0
- package/dist/themes/kui11/slider.css +1 -0
- package/dist/themes/kui11/spinner.css +1 -0
- package/dist/themes/kui11/status-message.css +1 -0
- package/dist/themes/kui11/switch.css +1 -0
- package/dist/themes/kui11/table.css +1 -0
- package/dist/themes/kui11/tabs.css +1 -0
- package/dist/themes/kui11/tag.css +1 -0
- package/dist/themes/kui11/text-area.css +1 -0
- package/dist/themes/kui11/text-input.css +1 -0
- package/dist/themes/kui11/text.css +1 -0
- package/dist/themes/kui11/toast.css +1 -0
- package/dist/themes/kui11/tooltip.css +1 -0
- package/dist/themes/kui11/vertical-nav.css +1 -0
- package/dist/themes/kui11.base.css +1 -0
- package/dist/themes/kui11.base.js +935 -0
- package/dist/themes/kui11.components.css +1 -0
- package/dist/themes/kui11.components.js +2564 -0
- package/dist/themes/kui11.css +1 -0
- package/dist/themes/theme-partials.js +456 -0
- package/dist/utilities/all.js +442 -0
- package/dist/utilities/typography-utils.css +1 -0
- package/package.json +106 -3
- package/scripts/sync-skills.mjs +237 -0
- package/skills/kaizen-ui-html-css/SKILL.md +293 -0
- package/skills/kaizen-ui-html-css/assets/color-primitives-hex.md +141 -0
- package/skills/kaizen-ui-html-css/references/blocks/chat-input.md +94 -0
- package/skills/kaizen-ui-html-css/references/blocks/notification-center.md +320 -0
- package/skills/kaizen-ui-html-css/references/blocks/timeline.md +579 -0
- package/skills/kaizen-ui-html-css/references/components/Accordion.md +88 -0
- package/skills/kaizen-ui-html-css/references/components/Anchor.md +29 -0
- package/skills/kaizen-ui-html-css/references/components/AnimatedChevron.md +31 -0
- package/skills/kaizen-ui-html-css/references/components/AppBar.md +129 -0
- package/skills/kaizen-ui-html-css/references/components/Attachment.md +306 -0
- package/skills/kaizen-ui-html-css/references/components/Audio.md +21 -0
- package/skills/kaizen-ui-html-css/references/components/Autocomplete.md +29 -0
- package/skills/kaizen-ui-html-css/references/components/Avatar.md +28 -0
- package/skills/kaizen-ui-html-css/references/components/AvatarGroup.md +38 -0
- package/skills/kaizen-ui-html-css/references/components/Badge.md +121 -0
- package/skills/kaizen-ui-html-css/references/components/Banner.md +49 -0
- package/skills/kaizen-ui-html-css/references/components/Block.md +26 -0
- package/skills/kaizen-ui-html-css/references/components/Breadcrumbs.md +42 -0
- package/skills/kaizen-ui-html-css/references/components/Button.md +43 -0
- package/skills/kaizen-ui-html-css/references/components/ButtonGroup.md +32 -0
- package/skills/kaizen-ui-html-css/references/components/Card.md +39 -0
- package/skills/kaizen-ui-html-css/references/components/Carousel.md +53 -0
- package/skills/kaizen-ui-html-css/references/components/ChatBubble.md +28 -0
- package/skills/kaizen-ui-html-css/references/components/Checkbox.md +32 -0
- package/skills/kaizen-ui-html-css/references/components/CodeSnippet.md +33 -0
- package/skills/kaizen-ui-html-css/references/components/Collapsible.md +56 -0
- package/skills/kaizen-ui-html-css/references/components/Combobox.md +66 -0
- package/skills/kaizen-ui-html-css/references/components/Command.md +100 -0
- package/skills/kaizen-ui-html-css/references/components/ContextMenu.md +61 -0
- package/skills/kaizen-ui-html-css/references/components/DatePicker.md +30 -0
- package/skills/kaizen-ui-html-css/references/components/Divider.md +28 -0
- package/skills/kaizen-ui-html-css/references/components/Dropdown.md +94 -0
- package/skills/kaizen-ui-html-css/references/components/Flex.md +33 -0
- package/skills/kaizen-ui-html-css/references/components/FormField.md +35 -0
- package/skills/kaizen-ui-html-css/references/components/Grid.md +27 -0
- package/skills/kaizen-ui-html-css/references/components/Group.md +92 -0
- package/skills/kaizen-ui-html-css/references/components/Halo.md +26 -0
- package/skills/kaizen-ui-html-css/references/components/Hero.md +29 -0
- package/skills/kaizen-ui-html-css/references/components/HorizontalNav.md +34 -0
- package/skills/kaizen-ui-html-css/references/components/HoverCard.md +23 -0
- package/skills/kaizen-ui-html-css/references/components/Inline.md +49 -0
- package/skills/kaizen-ui-html-css/references/components/InlineNotice.md +96 -0
- package/skills/kaizen-ui-html-css/references/components/InputShell.md +26 -0
- package/skills/kaizen-ui-html-css/references/components/JumpNav.md +36 -0
- package/skills/kaizen-ui-html-css/references/components/Kbd.md +32 -0
- package/skills/kaizen-ui-html-css/references/components/KeyValueEditor.md +275 -0
- package/skills/kaizen-ui-html-css/references/components/KeyValueGroup.md +35 -0
- package/skills/kaizen-ui-html-css/references/components/Label.md +86 -0
- package/skills/kaizen-ui-html-css/references/components/Legend.md +148 -0
- package/skills/kaizen-ui-html-css/references/components/List.md +143 -0
- package/skills/kaizen-ui-html-css/references/components/Menu.md +103 -0
- package/skills/kaizen-ui-html-css/references/components/Meter.md +27 -0
- package/skills/kaizen-ui-html-css/references/components/Modal.md +60 -0
- package/skills/kaizen-ui-html-css/references/components/Notification.md +48 -0
- package/skills/kaizen-ui-html-css/references/components/NumberInput.md +15 -0
- package/skills/kaizen-ui-html-css/references/components/OtpInput.md +51 -0
- package/skills/kaizen-ui-html-css/references/components/PageHeader.md +61 -0
- package/skills/kaizen-ui-html-css/references/components/Pagination.md +63 -0
- package/skills/kaizen-ui-html-css/references/components/Panel.md +133 -0
- package/skills/kaizen-ui-html-css/references/components/Popover.md +31 -0
- package/skills/kaizen-ui-html-css/references/components/ProgressBar.md +187 -0
- package/skills/kaizen-ui-html-css/references/components/RadioGroup.md +32 -0
- package/skills/kaizen-ui-html-css/references/components/RangeSlider.md +62 -0
- package/skills/kaizen-ui-html-css/references/components/Rating.md +69 -0
- package/skills/kaizen-ui-html-css/references/components/ReactionGroup.md +30 -0
- package/skills/kaizen-ui-html-css/references/components/Resizable.md +31 -0
- package/skills/kaizen-ui-html-css/references/components/SegmentedControl.md +36 -0
- package/skills/kaizen-ui-html-css/references/components/SegmentedMeter.md +200 -0
- package/skills/kaizen-ui-html-css/references/components/Select.md +39 -0
- package/skills/kaizen-ui-html-css/references/components/Severity.md +25 -0
- package/skills/kaizen-ui-html-css/references/components/SidePanel.md +42 -0
- package/skills/kaizen-ui-html-css/references/components/Skeleton.md +24 -0
- package/skills/kaizen-ui-html-css/references/components/Slider.md +32 -0
- package/skills/kaizen-ui-html-css/references/components/Spinner.md +63 -0
- package/skills/kaizen-ui-html-css/references/components/Stack.md +17 -0
- package/skills/kaizen-ui-html-css/references/components/StatusIndicator.md +30 -0
- package/skills/kaizen-ui-html-css/references/components/StatusMessage.md +78 -0
- package/skills/kaizen-ui-html-css/references/components/Stepper.md +57 -0
- package/skills/kaizen-ui-html-css/references/components/Switch.md +96 -0
- package/skills/kaizen-ui-html-css/references/components/Table.md +566 -0
- package/skills/kaizen-ui-html-css/references/components/Tabs.md +67 -0
- package/skills/kaizen-ui-html-css/references/components/Tag.md +194 -0
- package/skills/kaizen-ui-html-css/references/components/TagGroup.md +32 -0
- package/skills/kaizen-ui-html-css/references/components/TerminalLine.md +69 -0
- package/skills/kaizen-ui-html-css/references/components/Text.md +27 -0
- package/skills/kaizen-ui-html-css/references/components/TextArea.md +28 -0
- package/skills/kaizen-ui-html-css/references/components/TextContent.md +61 -0
- package/skills/kaizen-ui-html-css/references/components/TextInput.md +29 -0
- package/skills/kaizen-ui-html-css/references/components/TimeInput.md +17 -0
- package/skills/kaizen-ui-html-css/references/components/Toast.md +41 -0
- package/skills/kaizen-ui-html-css/references/components/Toaster.md +19 -0
- package/skills/kaizen-ui-html-css/references/components/ToggleButton.md +47 -0
- package/skills/kaizen-ui-html-css/references/components/ToggleButtonGroup.md +29 -0
- package/skills/kaizen-ui-html-css/references/components/Tooltip.md +45 -0
- package/skills/kaizen-ui-html-css/references/components/TreeNav.md +58 -0
- package/skills/kaizen-ui-html-css/references/components/Upload.md +90 -0
- package/skills/kaizen-ui-html-css/references/components/VerticalNav.md +65 -0
- package/skills/kaizen-ui-html-css/references/design-tokens/CHART_DATA_COLORS.md +56 -0
- package/skills/kaizen-ui-html-css/references/design-tokens/COLORS.md +148 -0
- package/skills/kaizen-ui-html-css/references/design-tokens/COLOR_PRIMITIVES.md +31 -0
- package/skills/kaizen-ui-html-css/references/design-tokens/EFFECTS_AND_LAYOUT.md +50 -0
- package/skills/kaizen-ui-html-css/references/design-tokens/SPACING_SCALE.md +36 -0
- package/skills/kaizen-ui-html-css/references/design-tokens/TYPOGRAPHY.md +44 -0
- package/skills/kaizen-ui-html-css/references/guides/CONFIGURATION.md +51 -0
- package/skills/kaizen-ui-html-css/references/guides/HTML_STRUCTURE.md +134 -0
- package/skills/kaizen-ui-html-css/references/patterns/activity-feed.md +132 -0
- package/skills/kaizen-ui-html-css/references/patterns/confirmations.md +133 -0
- package/skills/kaizen-ui-html-css/references/patterns/data-display.md +127 -0
- package/skills/kaizen-ui-html-css/references/patterns/data-visualization.md +73 -0
- package/skills/kaizen-ui-html-css/references/patterns/element-visibility.md +83 -0
- package/skills/kaizen-ui-html-css/references/patterns/empty-states.md +116 -0
- package/skills/kaizen-ui-html-css/references/patterns/entity-cards.md +172 -0
- package/skills/kaizen-ui-html-css/references/patterns/error-states.md +163 -0
- package/skills/kaizen-ui-html-css/references/patterns/feedback.md +77 -0
- package/skills/kaizen-ui-html-css/references/patterns/filters.md +167 -0
- package/skills/kaizen-ui-html-css/references/patterns/forms.md +215 -0
- package/skills/kaizen-ui-html-css/references/patterns/key-value-display.md +195 -0
- package/skills/kaizen-ui-html-css/references/patterns/loading.md +104 -0
- package/skills/kaizen-ui-html-css/references/patterns/navigation.md +154 -0
- package/skills/kaizen-ui-html-css/references/patterns/ranked-lists.md +60 -0
- package/skills/kaizen-ui-html-css/references/patterns/search.md +46 -0
- package/skills/kaizen-ui-html-css/references/patterns/settings.md +106 -0
- package/skills/kaizen-ui-html-css/references/patterns/stat-blocks.md +71 -0
- package/skills/kaizen-ui-html-css/references/templates/browse-page.md +92 -0
- package/skills/kaizen-ui-html-css/references/templates/dashboard.md +356 -0
- package/skills/kaizen-ui-html-css/references/templates/detail-page.md +424 -0
- package/skills/kaizen-ui-html-css/references/templates/detail-placement.md +68 -0
- package/skills/kaizen-ui-html-css/references/templates/error-page.md +82 -0
- package/skills/kaizen-ui-html-css/references/templates/form-page.md +256 -0
- package/skills/kaizen-ui-html-css/references/templates/layout-principles.md +152 -0
- package/skills/kaizen-ui-html-css/references/templates/list-view.md +229 -0
- package/skills/kaizen-ui-html-css/references/templates/page-modification.md +33 -0
- package/skills/kaizen-ui-html-css/references/templates/page-shell.md +225 -0
- package/skills/kaizen-ui-html-css/references/templates/workspace-page.md +427 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Loading
|
|
2
|
+
|
|
3
|
+
Loading indicators communicate system status and set user expectations about wait time. The wrong loading pattern can make a fast system feel slow or a slow system feel broken.
|
|
4
|
+
|
|
5
|
+
## When to use
|
|
6
|
+
|
|
7
|
+
Show an indicator once an operation exceeds ~300ms; below that, show nothing (see [Timing thresholds](#timing-thresholds) for the full scale). Skip the indicator entirely when optimistic UI fits.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Anatomy
|
|
12
|
+
|
|
13
|
+
A visual indicator (spinner / skeleton / progress bar) plus optional context that aids the wait. The non-obvious requirement:
|
|
14
|
+
|
|
15
|
+
- **Reserve the indicator's space** to match the final content's dimensions, to minimize layout shift when content resolves.
|
|
16
|
+
|
|
17
|
+
### Optional
|
|
18
|
+
|
|
19
|
+
Include when applicable.
|
|
20
|
+
|
|
21
|
+
| Part | Include when |
|
|
22
|
+
| --- | --- |
|
|
23
|
+
| **Label / context message** | Operation is long enough that the user needs to know what is happening ("Processing 1,247 records…", "Training model — this may take a minute") |
|
|
24
|
+
| **Percentage / step count** | Progress is determinate and the value is meaningful to the user |
|
|
25
|
+
| **Estimated time remaining** | Wait is expected to exceed 60 seconds |
|
|
26
|
+
| **Cancel / dismiss action** | Operation is safely cancellable and the user may want to abandon it |
|
|
27
|
+
| **Retry action** | Loading failed and the failure is likely transient (see [Composition rules → Loading errors](#loading-errors)) |
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Variants
|
|
32
|
+
|
|
33
|
+
Pick the indicator by whether the wait duration is known and whether the content layout is predictable. For how the treatment escalates with wait length, see [Timing thresholds](#timing-thresholds).
|
|
34
|
+
|
|
35
|
+
| Variant | Use when |
|
|
36
|
+
| --- | --- |
|
|
37
|
+
| **Progress bar (determinate)** | System knows how far along the process is (% or steps complete); operation has measurable start + end |
|
|
38
|
+
| **Spinner (indeterminate)** | System cannot predict duration; content layout is NOT predictable |
|
|
39
|
+
| **Skeleton screen** | Content layout IS predictable (cards, table rows, text blocks) |
|
|
40
|
+
| **Button loading (inline spinning icon)** | User clicked a button to trigger an async action |
|
|
41
|
+
| **Optimistic UI** | High-success-rate, low-stakes action with a predictable result (no indicator shown) |
|
|
42
|
+
|
|
43
|
+
### Progress bar (determinate)
|
|
44
|
+
|
|
45
|
+
For uploads, exports, training, multi-step pipelines. See the [`ProgressBar`](../components/ProgressBar.md).
|
|
46
|
+
|
|
47
|
+
### Indeterminate spinner
|
|
48
|
+
|
|
49
|
+
Center it in the container if the whole view is loading; place it inline within the trigger with the `small` size variant if a single component is loading.
|
|
50
|
+
|
|
51
|
+
### Skeleton screen
|
|
52
|
+
|
|
53
|
+
Best for predictable/standardized layouts — the allocated space prevents layout shift. See the [`Skeleton`](../components/Skeleton.md).
|
|
54
|
+
|
|
55
|
+
### Button loading (inline spinner)
|
|
56
|
+
|
|
57
|
+
Use a small, non-distracting spinner inside the triggering button. Retain a meaningful accessible name, expose a busy state, and prevent duplicate submission while the operation is active.
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
Put `aria-busy="true"` and `disabled` on the button itself while loading. The `nv-button` classes supply only the visual treatment, so the spinner or progress affordance is yours to render.
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
### Optimistic UI
|
|
69
|
+
|
|
70
|
+
Show the result immediately and reconcile when the server responds — for high-success-rate, low-stakes, predictable actions (toggle a setting, mark as read, add a tag). On rejection, revert the UI atomically and surface an error. Never for destructive, financial, or unpredictable actions.
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Composition rules
|
|
75
|
+
|
|
76
|
+
Apply to all variants.
|
|
77
|
+
|
|
78
|
+
### Progressive loading: chrome → structure → content
|
|
79
|
+
|
|
80
|
+
Isolate loading states to narrow content areas to allow for progressive loading, so pages aren't gated on the slowest endpoint.
|
|
81
|
+
|
|
82
|
+
### Avoid full-page spinners
|
|
83
|
+
|
|
84
|
+
Don't cover the whole page with one spinner if regions can render independently — it feels slower and conveys nothing. **Exception:** auth screens, initial app boot, or true full-page transitions where no content exists yet.
|
|
85
|
+
|
|
86
|
+
### Loading errors
|
|
87
|
+
|
|
88
|
+
Replace the indicator with an error state (see [`error-states.md`](./error-states.md)). Scope the error to the failed region rather than blocking the whole page, and offer retry only when the failure is likely transient.
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Modifiers
|
|
93
|
+
|
|
94
|
+
### Timing thresholds
|
|
95
|
+
|
|
96
|
+
Match the indicator (or absence of one) to the expected wait duration.
|
|
97
|
+
|
|
98
|
+
| Duration | Treatment |
|
|
99
|
+
| --- | --- |
|
|
100
|
+
| **Under 300ms** | Show nothing. The response feels instant; any indicator creates a flash that feels more jarring than the wait. |
|
|
101
|
+
| **300ms – 1s** | Show a subtle indicator only if you can do so without a flash. Skeleton screens work well — they're already part of the layout. Delay-mount spinners by 300ms so they never appear if content arrives first. |
|
|
102
|
+
| **1 – 10s** | Show the appropriate indicator (see [Variants](#variants)). This is the core range where indicators are essential. |
|
|
103
|
+
| **10 – 60s** | Show a progress indicator (determinate if possible) with context about what's happening ("Processing 1,247 records…", "Training model — this may take a minute"). |
|
|
104
|
+
| **Over 60s** | Show a progress indicator with estimated time remaining. Consider allowing the user to navigate away and return — surface task status in a persistent location (a notification, a status bar, or a task queue view). Notify the user when the long-running task completes. |
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# Navigation
|
|
2
|
+
|
|
3
|
+
Navigation is never a single component choice. Each surface answers a different wayfinding question, and most pages need several at once. Don't ask "which nav component?" — ask "which questions must this page answer?", then pick a surface for each.
|
|
4
|
+
|
|
5
|
+
## When to use
|
|
6
|
+
|
|
7
|
+
| The user is asking… | Scope | Surface |
|
|
8
|
+
| --- | --- | --- |
|
|
9
|
+
| **Where can I go?** (what areas exist) | App | Horizontal app navigation, vertical section navigation, or both (see [Variants](#variants)) |
|
|
10
|
+
| **Where am I?** (within the current area) | Section | Vertical section navigation or in-page tabs |
|
|
11
|
+
| **How did I get here — and back?** | Path | Breadcrumbs |
|
|
12
|
+
| **What's on this page?** (how its content is organized) | Content | Tabs or accordions in the page body |
|
|
13
|
+
|
|
14
|
+
These surfaces **layer, they don't compete:**
|
|
15
|
+
|
|
16
|
+
- A typical detail page answers three at once — app nav (where I can go), breadcrumbs (how I got here), tabs (what's on the page).
|
|
17
|
+
- **Never answer the same question twice.** If breadcrumbs show the path, the sidebar shouldn't re-encode it; if tabs make position obvious, you may not need breadcrumbs (see [Breadcrumbs](#breadcrumbs) → "Not needed when").
|
|
18
|
+
- **Decide the app-level surface first** (see [Variants](#variants)). It constrains content width and which other patterns stay viable.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Variants
|
|
23
|
+
|
|
24
|
+
Choose the primary nav pattern based on top-level destination count, section depth, and label complexity. Content-level variants (tabs, accordions) compose with any primary nav.
|
|
25
|
+
|
|
26
|
+
### Horizontal Navigation (Default)
|
|
27
|
+
|
|
28
|
+
Use [`AppBar`](../components/AppBar.md) with [HorizontalNav](../components/HorizontalNav.md).
|
|
29
|
+
|
|
30
|
+
Use when ALL of the following are true:
|
|
31
|
+
|
|
32
|
+
- The application has fewer than 7 top-level destinations
|
|
33
|
+
- No top-level destination requires its own section-level sub-navigation
|
|
34
|
+
- Destinations are self-evident from their labels
|
|
35
|
+
|
|
36
|
+
> **KUI convention note:** The threshold of 7 is a NVIDIA convention reflecting typical label lengths in NVIDIA tools and the width of AppBar's center slot. Real capacity depends on label length and available width, not a fixed count — short labels may fit 7–8, long labels fewer.
|
|
37
|
+
|
|
38
|
+
This preserves full page width for data-dense views such as tables and dashboards. Put the horizontal navigation in the AppBar's documented navigation region. See [`page-shell.md`](../templates/page-shell.md#stacked-shell).
|
|
39
|
+
|
|
40
|
+
Adding vertical navigation "for future expansion" is an antipattern. A detail page with 5–6 items does not justify a sidebar; promote only when the rules above are met.
|
|
41
|
+
|
|
42
|
+
### Horizontal + Vertical Navigation (Global + Local)
|
|
43
|
+
|
|
44
|
+
Use [`AppBar`](../components/AppBar.md) with [HorizontalNav](../components/HorizontalNav.md) and [VerticalNav](../components/VerticalNav.md).
|
|
45
|
+
|
|
46
|
+
Use when ALL of the following are true:
|
|
47
|
+
|
|
48
|
+
- The application has distinct top-level areas shown horizontally
|
|
49
|
+
- At least one top-level area has enough internal structure to need its own
|
|
50
|
+
local navigation (e.g., Documentation → Get Started, Guides, Components)
|
|
51
|
+
- The vertical nav is scoped to the selected top-level area
|
|
52
|
+
|
|
53
|
+
This pattern separates global wayfinding (horizontal) from local wayfinding (vertical). Keep the two visually and spatially distinct so each level occupies a consistent, different location.
|
|
54
|
+
|
|
55
|
+
The horizontal surface carries global areas; the vertical surface is **scoped to the selected top-level area** and changes per section. Keep each level in a stable, distinct location.
|
|
56
|
+
|
|
57
|
+
For the surrounding shell (sidebar grid, sticky aside offset by the AppBar height, mobile drawer behavior) see [`page-shell.md`](../templates/page-shell.md#fixed-sidebar-shell).
|
|
58
|
+
|
|
59
|
+
### Vertical Navigation Alone
|
|
60
|
+
|
|
61
|
+
Use [VerticalNav](../components/VerticalNav.md).
|
|
62
|
+
|
|
63
|
+
Use when ANY of the following are true:
|
|
64
|
+
|
|
65
|
+
- The entire application is a single product area with 7+ destinations
|
|
66
|
+
and/or multi-level hierarchy
|
|
67
|
+
- No meaningful top-level split exists to justify horizontal separation
|
|
68
|
+
- All destinations belong to one domain and users navigate between them
|
|
69
|
+
frequently
|
|
70
|
+
|
|
71
|
+
### Breadcrumbs
|
|
72
|
+
|
|
73
|
+
Component: [`Breadcrumbs`](../components/Breadcrumbs.md).
|
|
74
|
+
|
|
75
|
+
Use breadcrumbs when ALL of the following are true:
|
|
76
|
+
|
|
77
|
+
- The user navigates 3 or more levels deep in the application hierarchy
|
|
78
|
+
- No other wayfinding mechanism (tabs, visible navigation trail) makes the user's current position obvious
|
|
79
|
+
- The user may need to jump to an intermediate level
|
|
80
|
+
|
|
81
|
+
**Not needed when:**
|
|
82
|
+
|
|
83
|
+
- Tabs are present that show the user's current position within a section (tabs already communicate the trail)
|
|
84
|
+
- The application has only 1–2 levels of depth
|
|
85
|
+
- The navigation sidebar already shows the user's full path via expanded / highlighted states
|
|
86
|
+
|
|
87
|
+
### Tabs
|
|
88
|
+
|
|
89
|
+
Use [Tabs](../components/Tabs.md).
|
|
90
|
+
|
|
91
|
+
Use when:
|
|
92
|
+
|
|
93
|
+
- Content on a single page can be divided into 2–7 parallel categories
|
|
94
|
+
- The user benefits from switching between views without leaving the page
|
|
95
|
+
- Each tab represents a complete, independent view of content (not sequential steps — use a stepper/wizard for that)
|
|
96
|
+
- The categories are peer-level — no tab is subordinate to another
|
|
97
|
+
|
|
98
|
+
**Placement:**
|
|
99
|
+
|
|
100
|
+
- Directly below the page header or section header they relate to
|
|
101
|
+
- Never nested more than one level deep (tabs within tabs creates confusion — use a different pattern for the second level)
|
|
102
|
+
|
|
103
|
+
If tabs are part of the URL structure (each tab has its own route), they function as lightweight navigation. If they are not part of the URL, they are purely content organization.
|
|
104
|
+
|
|
105
|
+
### Accordions / Collapsible Sections
|
|
106
|
+
|
|
107
|
+
Use [`Accordion`](../components/Accordion.md) or [Collapsible](../components/Collapsible.md).
|
|
108
|
+
|
|
109
|
+
Use for progressive disclosure when a single page is long and users need only one or two sections at a time. Don't use to hide primary content the user came for.
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## Composition rules
|
|
114
|
+
|
|
115
|
+
Apply to all variants.
|
|
116
|
+
|
|
117
|
+
### What belongs as a primary nav item
|
|
118
|
+
|
|
119
|
+
Top-level navigation items are **destinations** — places users go to orient, browse, or monitor. They are not actions on specific entities.
|
|
120
|
+
|
|
121
|
+
**Navigation destinations (belong in top-level nav):**
|
|
122
|
+
|
|
123
|
+
- **Collection views:** "Browse clusters", "My requests", "Request queue"
|
|
124
|
+
- **Dashboards:** "Utilization", "Overview"
|
|
125
|
+
- **Settings or admin areas:** "Settings", "Team management"
|
|
126
|
+
|
|
127
|
+
**NOT navigation destinations (do not put in top-level nav):**
|
|
128
|
+
|
|
129
|
+
- **Actions on an entity:** "Configure cluster", "Edit request", "Create task"
|
|
130
|
+
- **Forms reached from entity context:** creating, editing, or configuring a specific item is an action launched from the entity's row, detail page, or a contextual button — not a peer of browse/dashboard destinations
|
|
131
|
+
|
|
132
|
+
**Where entity actions live instead:**
|
|
133
|
+
|
|
134
|
+
- **Row action** in a browse table (button, link, or row click)
|
|
135
|
+
- **Action button** in the detail page header
|
|
136
|
+
- **"New [entity]" button** in a list view toolbar (for create flows)
|
|
137
|
+
- **Contextual link** from a related entity's detail page
|
|
138
|
+
|
|
139
|
+
Entity actions in top-level nav break the mental model (nav = where I go, actions = what I do to something) and appear selectable without context. **If the user's prompt or feature spec places an action in the nav,** flag it and suggest an alternative entry point rather than silently adding it.
|
|
140
|
+
|
|
141
|
+
### Role-gated items: hide, don't disable
|
|
142
|
+
|
|
143
|
+
When a user's role does not grant access to a destination, **hide the item entirely** — disabled nav items create false affordance and leak the existence of restricted areas. This is [element visibility](./element-visibility.md) → Question 1 applied to nav.
|
|
144
|
+
|
|
145
|
+
- For a restricted URL hit directly (bookmark, shared link), show a permission-denied state on the page itself (see `../templates/list-view.md` → Permission denied empty state), not a disabled nav item.
|
|
146
|
+
- **Exception:** a preview/beta feature the user can request access to may show a "Request access" affordance — a product decision, not a default.
|
|
147
|
+
|
|
148
|
+
## Responsive Adaptation
|
|
149
|
+
|
|
150
|
+
Every navigation decision should include a responsive plan.
|
|
151
|
+
|
|
152
|
+
- Horizontal navigation — keep visible while it fits; collapse to a labeled menu when overflow becomes likely.
|
|
153
|
+
- Vertical navigation — move into an accessible drawer on narrow viewports.
|
|
154
|
+
- Tabs — preserve the active tab and use the target framework's documented overflow behavior.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Ranked lists
|
|
2
|
+
|
|
3
|
+
Rules for ranked-contribution displays — "top N by X" (models by cost, departments by spend, endpoints by error volume). Decides when a ranked list beats a table, chart, or donut; row anatomy; bar color; and drill interaction. Does not decide chart types in general ([data-visualization.md](./data-visualization.md)) or full entity tables with sorting/filtering ([data-display.md](./data-display.md)).
|
|
4
|
+
|
|
5
|
+
## When to use
|
|
6
|
+
|
|
7
|
+
Users are scanning for "who or what contributes most" — pick the display that fits the data shape.
|
|
8
|
+
|
|
9
|
+
| Data shape | Use |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| 5–20 items, one primary measure, share-of-whole matters, scanning intent | Ranked list (this pattern) |
|
|
12
|
+
| ≤ 5 parts that compose a whole | Stacked bar or donut, [data-visualization.md](./data-visualization.md) |
|
|
13
|
+
| Users need several attributes per item, or sort/filter/search | A [`Table`](../components/Table.md) — a ranked list has exactly one ranking |
|
|
14
|
+
| Precise magnitude comparison against an axis | A horizontal bar chart in a chart Panel, [data-visualization.md](./data-visualization.md) |
|
|
15
|
+
| A single scalar with no comparable dimension | A [stat block](./stat-blocks.md) — not a one-row list |
|
|
16
|
+
|
|
17
|
+
**Default when uncertain:** ranked list for "top contributors" panels on dashboards. It degrades gracefully — remove the bars and it's still a legible label/value list.
|
|
18
|
+
|
|
19
|
+
## Anatomy
|
|
20
|
+
|
|
21
|
+
Base row anatomy (label + right-aligned value) is [dashboard.md](../templates/dashboard.md) → Ranking list panel. This pattern extends it with:
|
|
22
|
+
|
|
23
|
+
1. **Series dot** (optional) — only when rows correspond to chart series shown elsewhere (see Composition rules).
|
|
24
|
+
2. **Share bar** — proportional fill in a fixed-width track; the largest row (or the whole, when shares sum to it) sets 100%.
|
|
25
|
+
3. **Value + share columns** — right-aligned, `tabular-nums`, formatted per [Metric presentation](./data-display.md#metric-presentation).
|
|
26
|
+
4. **Delta / status** (optional) — a period delta per [stat-blocks.md](./stat-blocks.md) valence rules, or an informational `Badge` (`color="blue"`) for a genuinely new entrant.
|
|
27
|
+
|
|
28
|
+
**Rules:**
|
|
29
|
+
|
|
30
|
+
- **Row ceiling:** top 5–8 rows plus one muted, aggregated **"Other (N)"** row so shares visibly sum to the whole. Never render every contributor — link "View all" to the full table.
|
|
31
|
+
- Left-align the label column, right-align every numeric column; one row height, no wrapping.
|
|
32
|
+
- Label and value are separate elements, never a single concatenated text run ("DGX Cloud $1.12M").
|
|
33
|
+
|
|
34
|
+
## Composition rules
|
|
35
|
+
|
|
36
|
+
### Bar and dot color
|
|
37
|
+
|
|
38
|
+
| Situation | Treatment |
|
|
39
|
+
| --- | --- |
|
|
40
|
+
| Rows correspond to chart series shown elsewhere on the page (e.g. models that also appear in a trend chart) | Same series colors with the same assignment everywhere, per [chart color tokens](../design-tokens/CHART_DATA_COLORS.md) → Categorical — include the series dot |
|
|
41
|
+
| Rows are not chart series anywhere | Single accent (or neutral) bars — rank order already carries the signal; per-row colors add noise |
|
|
42
|
+
| "Other" aggregate row | Always neutral/muted, regardless of the scheme above |
|
|
43
|
+
| New entrant | `Badge color="blue"` ("New") — never a unique bar color |
|
|
44
|
+
|
|
45
|
+
### Interaction and drill
|
|
46
|
+
|
|
47
|
+
- **Row navigation:** when each row is an entity with a destination, the whole row is the click target — no per-row "View" buttons.
|
|
48
|
+
- Clicking a row and clicking a panel-level "View all" link may go to different depths (entity vs. full list) — that's correct progressive disclosure, not duplication.
|
|
49
|
+
- A ranked list with no destination for its rows is fine — just don't invent a page for it.
|
|
50
|
+
|
|
51
|
+
## Anti-patterns
|
|
52
|
+
|
|
53
|
+
| Anti-pattern | Why it's wrong | Do this instead |
|
|
54
|
+
| --- | --- | --- |
|
|
55
|
+
| Scattering label and stats across the panel width instead of fixed columns | Values float away from labels; the value column stops being scannable | Fixed columns: label (flexible) + bar + right-aligned numerics |
|
|
56
|
+
| Per-row rainbow bars with no series meaning | Color implies categories that don't exist | Single accent bars; series colors only when rows are chart series |
|
|
57
|
+
| Rendering every contributor (20, 40 rows) in the panel | The panel becomes an unpaginated table, losing its summary role | Top 5–8 + muted "Other (N)" + "View all" |
|
|
58
|
+
| Omitting the "Other" bucket when showing shares | Percentages visibly don't sum; users distrust the data | Always aggregate the tail when truncating a share-based list |
|
|
59
|
+
| Values as Tags/Badges/pills in each row | Pills compound into noise in dense rows, per [data-display.md](./data-display.md) → Taxonomic labels | Plain text values; one optional delta chip or "New" `Badge` |
|
|
60
|
+
| Sortable headers on a ranked-list panel | It's now an under-featured table | Keep the fixed ranking; link to the real table for sorting |
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Search pattern
|
|
2
|
+
|
|
3
|
+
A text input that lets users find content by query. Search often works alongside filters — read [`filters.md`](./filters.md) when both are present.
|
|
4
|
+
|
|
5
|
+
## When to use
|
|
6
|
+
|
|
7
|
+
Reach for search when items need to be found by name, keyword, or content rather than narrowed by attribute. See [`filters.md`](./filters.md) when attribute-based narrowing is the better tool, or when search and filters should coexist.
|
|
8
|
+
|
|
9
|
+
## Anatomy
|
|
10
|
+
|
|
11
|
+
A search input plus a results display. The non-obvious rule - **the query lives in the input only**. Do not duplicate it as a tag or chip elsewhere, unless it's part of an applied-filters display in a filter-level search context.
|
|
12
|
+
|
|
13
|
+
Optional parts, include when applicable:
|
|
14
|
+
|
|
15
|
+
| Part | Include when |
|
|
16
|
+
| --- | --- |
|
|
17
|
+
| **Inline validation message** | Field has character restrictions (e.g., no special characters allowed for certain query types). Be specific about which characters are disallowed |
|
|
18
|
+
| **Scope indicators** (tabs / chips / categories) | Content spans sub-types or content kinds. See [Modifiers → Scope indicators](#scope-indicators) |
|
|
19
|
+
| **Result count** | Useful when search updates content in place, especially combined with active filters, so the user sees the full query state |
|
|
20
|
+
|
|
21
|
+
## Variants
|
|
22
|
+
|
|
23
|
+
Pick the variant that matches the search scope. Variant choice drives placement and result behavior.
|
|
24
|
+
|
|
25
|
+
| Variant | Placement | Result behavior | Use when |
|
|
26
|
+
| --- | --- | --- | --- |
|
|
27
|
+
| **Global search** | Persistent search bar in the app header / AppBar; always accessible regardless of current page | Navigates the user to a dedicated results page. Group results by content type when the app has multiple types (e.g., "Models (94)", "Blueprints (34)", "Other (39)") | User searches across the entire application; user may not know which section has the target content; the app has multiple distinct content areas |
|
|
28
|
+
| **Contextual search** | Within or directly above the content area it searches; no filters present alongside | Content updates in place; no page navigation | User searches within a single data set or view on the current page; scope is limited to the current context |
|
|
29
|
+
| **Filter-level search** | Inside or adjacent to the filter controls; functions as part of the filter system | Content updates in place; query combines with active filters; both affect displayed results | Search is paired with filters; user needs to search by text and narrow by filter criteria simultaneously |
|
|
30
|
+
|
|
31
|
+
**Anti-pattern:** the same input handling global and contextual search depending on page state. Users can't predict scope from the input alone — use distinct placements (header for global, page-level for contextual).
|
|
32
|
+
|
|
33
|
+
## Query Behavior
|
|
34
|
+
|
|
35
|
+
- **Debounce** ~200–400ms; for high-latency datasets add a **2–3 character minimum** or require **Enter** to submit.
|
|
36
|
+
- **Rank results by relevance** (not alphabetical/unranked); offer a secondary sort if needed.
|
|
37
|
+
- **Zero results** → see [`empty-states.md`](./empty-states.md#no-results-filtered-or-searched): acknowledge the query, suggest next steps, and offer a reset rather than a bare "no results."
|
|
38
|
+
|
|
39
|
+
## Scope indicators
|
|
40
|
+
|
|
41
|
+
Provide scope indicators (tabs, chips, or categories) when content has sub-types or kinds. Show counts per category so users can narrow without re-querying.
|
|
42
|
+
|
|
43
|
+
| Variant | Scope indicator placement |
|
|
44
|
+
| --- | --- |
|
|
45
|
+
| **Global search** | Tabs / chips on the dedicated results page, grouped by content type with counts (e.g., Models, Blueprints, Other) |
|
|
46
|
+
| **Contextual / filter-level search** | Content-type tabs or toggles above the results when content spans sub-categories (e.g., a docs portal spanning Guides, Recipes, Reference, Changelog, Discussions) |
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Settings
|
|
2
|
+
|
|
3
|
+
A row-based pattern for user-configurable preferences.
|
|
4
|
+
|
|
5
|
+
## When to use
|
|
6
|
+
|
|
7
|
+
Use the settings pattern when:
|
|
8
|
+
|
|
9
|
+
- Users need to configure preferences, behavior, or state that persists across sessions
|
|
10
|
+
- Each option maps to a single discrete control (switch, select, input, slider)
|
|
11
|
+
- The configuration is ongoing — not a one-time setup wizard or data-entry form
|
|
12
|
+
|
|
13
|
+
For traditional create / edit data-entry forms, see [`forms.md`](./forms.md).
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Anatomy
|
|
18
|
+
|
|
19
|
+
Every setting in a settings surface shares the same row structure. Variation comes from the control type and value, not from which parts are present.
|
|
20
|
+
|
|
21
|
+
### Required
|
|
22
|
+
|
|
23
|
+
| Part | Purpose |
|
|
24
|
+
| --- | --- |
|
|
25
|
+
| **Title** | Names the setting. Clear and concise — the user should understand what this controls from the title alone. |
|
|
26
|
+
| **Control** | The interactive element that changes the setting value. See [Composition rules → Choose the right control](#choose-the-right-control). |
|
|
27
|
+
|
|
28
|
+
### Optional
|
|
29
|
+
|
|
30
|
+
| Part | Include when |
|
|
31
|
+
| --- | --- |
|
|
32
|
+
| **Description** | Title alone is ambiguous, or the setting's impact is not immediately obvious. Brief explanation of what the setting does or what its effect is. |
|
|
33
|
+
| **Section heading** | Settings split across distinct categories. See [Composition rules → Grouping](#grouping). |
|
|
34
|
+
| **Save bar** | Surface uses explicit save (vs. immediate-apply). See [Composition rules → Save behavior](#save-behavior). |
|
|
35
|
+
|
|
36
|
+
### Row layout
|
|
37
|
+
|
|
38
|
+
Each setting occupies a single horizontal row with the title and description on the left and the control on the right. Settings stack vertically within their section.
|
|
39
|
+
|
|
40
|
+
Use [FormField](../components/FormField.md) to keep each control's label, description, and validation relationships together. Lay out each row with the framework's Stack/Flex primitives or equivalent CSS, and use [Divider](../components/Divider.md) only when spacing does not separate rows clearly enough.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Variants
|
|
45
|
+
|
|
46
|
+
| Variant | Use when |
|
|
47
|
+
| --- | --- |
|
|
48
|
+
| **Dedicated settings page** | Settings are application-level (not contextual to a specific view), there are many settings across multiple categories, or the user is performing a focused configuration task rather than a quick tweak. |
|
|
49
|
+
| **Settings panel (side panel / drawer)** | Settings are contextual to the current view or tool, the user needs to adjust settings while seeing the effect on the main content, or the settings set is small (fewer than 10 settings). |
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Composition rules
|
|
54
|
+
|
|
55
|
+
Apply to all variants.
|
|
56
|
+
|
|
57
|
+
### Choose the right control
|
|
58
|
+
|
|
59
|
+
Match the control to the shape of the setting's value. The table below covers the most common settings controls — treat them as recommended defaults for consistency, not an exhaustive list. Any KUI form control is available.
|
|
60
|
+
|
|
61
|
+
| Control | Recommended when |
|
|
62
|
+
| --- | --- |
|
|
63
|
+
| **Toggle / Switch** | Binary on/off state that applies immediately. The most common settings control — communicates immediacy. |
|
|
64
|
+
| **Select** | More than 2 predefined options; one value from a fixed set. Examples: language, timezone, notification frequency, default view mode. |
|
|
65
|
+
| **Text input** | Setting value is user-defined and freeform. Examples: display name, custom domain, webhook URL. |
|
|
66
|
+
| **[Slider](../components/Slider.md)** | Setting value is numeric within a defined range and the user benefits from seeing their position within the range. Examples: volume, notification threshold, data retention period. |
|
|
67
|
+
|
|
68
|
+
### Grouping
|
|
69
|
+
|
|
70
|
+
| Organization | Use when |
|
|
71
|
+
| --- | --- |
|
|
72
|
+
| **Sections with headings** | Settings page contains more than 5 settings, or settings serve distinct categories (e.g., "Account", "Notifications", "Privacy", "Appearance"). Each section heading describes the category. Separate sections with visible dividers or generous spacing. |
|
|
73
|
+
| **Flat list (no headings)** | Settings page contains 5 or fewer settings, and all settings relate to a single category or purpose. |
|
|
74
|
+
|
|
75
|
+
### Save behavior
|
|
76
|
+
|
|
77
|
+
| Model | Use when |
|
|
78
|
+
| --- | --- |
|
|
79
|
+
| **Immediate application** (default for toggles) | Changes take effect as soon as the user interacts with the control. No save button. Use for toggles and simple single-value selections. |
|
|
80
|
+
| **Explicit save** | Multiple settings may need to be changed together before taking effect; changes have significant consequences the user should commit to deliberately; or the surface contains text inputs where the user needs to finish typing before applying. |
|
|
81
|
+
|
|
82
|
+
When using explicit save, include a cancel / discard option and indicate unsaved changes visually.
|
|
83
|
+
|
|
84
|
+
#### Save bar
|
|
85
|
+
|
|
86
|
+
The explicit-save affordance is a persistent bar holding the commit actions. Anatomy and rules:
|
|
87
|
+
|
|
88
|
+
- **Actions:** `[Cancel] [Save]`, with Save as the trailing brand-primary action. Disable both until there are unsaved changes; while saving, show a busy state on Save and keep Cancel available.
|
|
89
|
+
- **Placement:** bottom-aligned within the settings surface. On a dedicated page, a sticky footer bar; in a settings panel, pinned to the panel footer. Keep it visible without scrolling away from long forms.
|
|
90
|
+
- **Unsaved-changes signal:** indicate the dirty state explicitly (e.g. an "Unsaved changes" label near the bar) and warn before navigation away discards edits.
|
|
91
|
+
- **Result feedback:** on success the in-place control values are the confirmation — add a `Toast status="success"` only when the result scrolls out of view. On failure follow [error-states.md](./error-states.md) (inline for field-level rejections; transient toast/notification for the save action itself). See [feedback.md](./feedback.md) for the surface decision.
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Example application
|
|
96
|
+
|
|
97
|
+
**Input:** "I need a settings panel for a data visualization tool. Users can set default chart type (bar, line, pie), and configure auto-refresh interval."
|
|
98
|
+
|
|
99
|
+
**Resolved spec:**
|
|
100
|
+
|
|
101
|
+
1. Variant → **Settings panel** (contextual to the tool, user wants to see the effect, 2 settings)
|
|
102
|
+
2. Grouping → **Flat list** (2 settings, single category)
|
|
103
|
+
3. Controls →
|
|
104
|
+
- Default chart type: **Select** (3+ predefined options, single selection)
|
|
105
|
+
- Auto-refresh interval: **Select** or a **Slider** depending on whether values are predefined steps or a continuous range
|
|
106
|
+
4. Save behavior → **explicit save** (with a [save bar](#save-bar)) for the chart type and interval if changes affect saved preferences.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Stat blocks
|
|
2
|
+
|
|
3
|
+
Rules for headline-metric tiles (KPI blocks): what every stat block must contain, and how its delta chip is composed and colored. This pattern does not decide grid mechanics or count (see [dashboard.md](../templates/dashboard.md) → Stat blocks) or chart-type selection ([data-visualization.md](./data-visualization.md)).
|
|
4
|
+
|
|
5
|
+
## When to use
|
|
6
|
+
|
|
7
|
+
Grant a stat block only to a metric that answers "are we on track?" at a glance — it's the most visually expensive way to show a number.
|
|
8
|
+
|
|
9
|
+
| Signal | Treatment |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| Headline metric the user checks first; a change would trigger action | Stat block, per [dashboard.md](../templates/dashboard.md) → Stat blocks count and priority-order rules |
|
|
12
|
+
| Metric only interpretable next to peers (per-entity values, per-category splits) | A row in a [ranked list](./ranked-lists.md) — not a tile |
|
|
13
|
+
| Static attribute (region, owner, version, type) | A [key-value pair](./key-value-display.md) — never a stat block |
|
|
14
|
+
|
|
15
|
+
**Default when uncertain:** fewer, bigger. If the user wouldn't act differently when the number changes, it's context, not a KPI.
|
|
16
|
+
|
|
17
|
+
## Anatomy
|
|
18
|
+
|
|
19
|
+
Every stat block renders all three, plus a terse label:
|
|
20
|
+
|
|
21
|
+
1. **Value** — the hero element. Format per [Metric presentation](./data-display.md#metric-presentation).
|
|
22
|
+
2. **Comparison** — at least one of: a delta vs. a baseline ("▲ 6.2%"), a share of a whole ("64% of total"), or a distance to a target ("93% of quota").
|
|
23
|
+
3. **Scope** — the line that makes the value interpretable: period ("Jun 1 – Jun 30"), denominator ("82% of eligible employees"), or method ("Blended across models").
|
|
24
|
+
|
|
25
|
+
An optional **sparkline** may sit beneath (see Modifiers).
|
|
26
|
+
|
|
27
|
+
**Consistency:** every tile in a row uses the same slots in the same order. If one metric has no delta, keep the slot's space or drop the delta from the whole row — don't let tiles diverge in composition.
|
|
28
|
+
|
|
29
|
+
## Composition rules
|
|
30
|
+
|
|
31
|
+
### Delta chip: direction and color valence
|
|
32
|
+
|
|
33
|
+
The delta chip communicates direction (arrow) and magnitude. Color is a claim about goodness — make it deliberately.
|
|
34
|
+
|
|
35
|
+
| Metric valence | Treatment |
|
|
36
|
+
| --- | --- |
|
|
37
|
+
| No inherent valence — cost, usage volume, request count: "up" isn't intrinsically good or bad | Neutral chip (gray background, default foreground). The arrow carries direction; color stays out of it. |
|
|
38
|
+
| True threshold semantics — error rate, availability vs. SLO, budget vs. cap | Semantic trend color, per [chart color tokens](../design-tokens/CHART_DATA_COLORS.md) → Trend |
|
|
39
|
+
| Flat / no change | Muted chip ("▬ 0.4%"), never semantic color |
|
|
40
|
+
|
|
41
|
+
- **Decide valence once per metric, app-wide.** If cost deltas are neutral on the dashboard, they're neutral on every page — mixed conventions read as meaning where none exists.
|
|
42
|
+
- **Never encode direction by color alone.** The arrow glyph is `aria-hidden`; the visible text (and any `title`/accessible name) states direction and magnitude ("up 6.2% vs. previous period") so the chip works without color.
|
|
43
|
+
- Every delta names its baseline somewhere in the tile, usually the scope line ("vs. previous period"). A percentage with no baseline is noise.
|
|
44
|
+
|
|
45
|
+
**Default when uncertain:** neutral. Reserve semantic color for metrics where the team has agreed what "good" means.
|
|
46
|
+
|
|
47
|
+
### `Badge` is not a delta chip
|
|
48
|
+
|
|
49
|
+
`Badge` communicates entity status. A delta chip is composed text (arrow + magnitude), not a `Badge` — a `Badge` inside a stat tile implies the metric itself has a workflow state.
|
|
50
|
+
|
|
51
|
+
## Modifiers
|
|
52
|
+
|
|
53
|
+
### Sparkline
|
|
54
|
+
|
|
55
|
+
Include only when the period series exists and the trend's _shape_ adds decision value beyond the delta.
|
|
56
|
+
|
|
57
|
+
- No axes, labels, or legends — shape and direction only, per [data-visualization.md](./data-visualization.md) → Sparkline.
|
|
58
|
+
- Single stroke: `--color-chart-data-categorical-1` by default, or — when the metric also appears as a chart series elsewhere on the page — that series' color, used consistently.
|
|
59
|
+
- Sized so it never changes the tile's height.
|
|
60
|
+
- Accessibility: `aria-hidden` when the delta chip already states the trend; otherwise `role="img"` with an `aria-label` summarizing it ("cost trending up over 5 weeks").
|
|
61
|
+
|
|
62
|
+
## Anti-patterns
|
|
63
|
+
|
|
64
|
+
| Anti-pattern | Why it's wrong | Do this instead |
|
|
65
|
+
| --- | --- | --- |
|
|
66
|
+
| Bare value ("$4.82M" alone) | The user can't answer "so what?" — no baseline, no scope | Render value + comparison + scope |
|
|
67
|
+
| Semantic green/red on a valence-free metric | Colors an increase "bad" (or "good") without the team having decided that | Neutral delta chip; semantic color only for true thresholds |
|
|
68
|
+
| Direction shown by color alone | Fails color-blind users and grayscale contexts | `aria-hidden` arrow + visible magnitude text |
|
|
69
|
+
| Tiles with different compositions in one row | Row reads as unrelated boxes; eyes re-parse each tile | Same slots, same order, every tile |
|
|
70
|
+
| Sparkline with axes or point labels | It's a chart now — competes with the value | Shape-only sparkline, or promote to a real chart panel |
|
|
71
|
+
| Delta with no baseline named anywhere | "▲ 12.4%" against what? | Name the baseline in the scope line or the chip's accessible name |
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Browse Page (Template Reference)
|
|
2
|
+
|
|
3
|
+
Use for pages where users find, filter, and select from a collection of items.
|
|
4
|
+
|
|
5
|
+
This file is a **router**: it helps you pick how results display, then defers to the file that owns each variant's markup. There is no standalone browse code example — every variant is built from the list-view shell plus a result-display pattern documented elsewhere.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## When to use
|
|
10
|
+
|
|
11
|
+
- URL represents a collection (e.g., `/tasks`, `/models`, `/functions`)
|
|
12
|
+
- Primary user intent is finding or comparing items
|
|
13
|
+
- Page shows multiple items of the same type
|
|
14
|
+
- User may filter, sort, or search to narrow results
|
|
15
|
+
|
|
16
|
+
**Examples:** task list, model catalog, function registry, user directory, order history.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Choose the right variant
|
|
21
|
+
|
|
22
|
+
Browse pages share a common structure (page shell, header, filters, results) but differ in how results are displayed and how selection works.
|
|
23
|
+
|
|
24
|
+
See [data-display.md](../patterns/data-display.md) for the Table vs. Cards decision.
|
|
25
|
+
|
|
26
|
+
| Variant | When to use | Reference |
|
|
27
|
+
|---|---|---|
|
|
28
|
+
| **List view** | Results are a **table**. Users filter, sort, and act on rows. Most common browse pattern in NVIDIA enterprise apps. | [list-view.md](./list-view.md) |
|
|
29
|
+
| **Card grid** | Results are **cards** with visual content (images, icons, charts). Users browse to discover or compare. | See [Card grid variant](#card-grid-variant) below |
|
|
30
|
+
| **List → detail** | Selecting an item opens a contextual side panel instead of navigating away. Users compare items or take quick actions without losing list context. | See [List → detail variant](#list--detail-variant) below |
|
|
31
|
+
| **Hierarchical** | Items have **parent-child relationships** that expand inline. | See [Hierarchical variant](#hierarchical-variant) below |
|
|
32
|
+
|
|
33
|
+
**Default:** if unsure, start with **list view**. Tables are the standard for data-dense enterprise interfaces.
|
|
34
|
+
|
|
35
|
+
## Common structure (all variants)
|
|
36
|
+
|
|
37
|
+
All browse variants share the stacked page shell from [layout-principles.md](./layout-principles.md).
|
|
38
|
+
|
|
39
|
+
## Card grid variant
|
|
40
|
+
|
|
41
|
+
Same shell and toolbar as [list-view.md](./list-view.md) (page header, search + filters, result count) — the only change is that results render as a card grid instead of a `Table`. Build the cards from [entity-cards.md](../patterns/entity-cards.md) + [Card.md](../components/Card.md). No separate code example is needed.
|
|
42
|
+
|
|
43
|
+
Use when items have visual elements (images, thumbnails, charts) and users browse to discover or explore rather than searching for a specific item.
|
|
44
|
+
|
|
45
|
+
### Card grid rules
|
|
46
|
+
|
|
47
|
+
For card grid layout (columns, vertical stack) see [entity-cards.md](../patterns/entity-cards.md#modifiers); for shared anatomy and equal heights across the grid see [entity-cards.md](../patterns/entity-cards.md#composition-rules); for clickable-card vs. inline-actions rules see [Card.md](../components/Card.md).
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
Browse-page-specific: use the CSS Grid recipe in [entity-cards.md](../patterns/entity-cards.md#layout) for a **280px minimum card width** and automatic responsive columns.
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
### Filter placement
|
|
59
|
+
|
|
60
|
+
For filter count thresholds and toolbar collapse rules, see [filters.md](../patterns/filters.md).
|
|
61
|
+
|
|
62
|
+
## List → detail variant
|
|
63
|
+
|
|
64
|
+
This is the [list-view.md](./list-view.md) layout (table, toolbar, optional scope tabs) plus a [SidePanel](../components/SidePanel.md) — selection opens the panel instead of navigating away. The panel is **toggleable, not always-visible**: the list is primary content and the panel appears in response to selection.
|
|
65
|
+
|
|
66
|
+
For the IA decision (panel vs. standalone page vs. both, what content belongs in each), see [detail-placement.md](./detail-placement.md).
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
For side panel structure, headings, and full-detail escalation, see [SidePanel](../components/SidePanel.md). Opening, dismissal, focus containment, and initial selection have no stylesheet equivalent and must be implemented.
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
## Hierarchical variant
|
|
78
|
+
|
|
79
|
+
Items expand inline to show child items. Use when:
|
|
80
|
+
|
|
81
|
+
- Data has parent-child relationships
|
|
82
|
+
- Users need to see children in the context of siblings
|
|
83
|
+
- Comparison across hierarchy levels matters
|
|
84
|
+
|
|
85
|
+
Rules:
|
|
86
|
+
|
|
87
|
+
- One level of inline expansion max. Deeper hierarchy → navigate to a dedicated view.
|
|
88
|
+
- Nested filtering only when children are numerous (>10) with distinct filter dimensions.
|
|
89
|
+
|
|
90
|
+
## Empty states
|
|
91
|
+
|
|
92
|
+
All browse variants share the same empty state patterns. See [list-view.md](./list-view.md) → variants and [empty-states.md](../patterns/empty-states.md).
|