@nvidia/foundations-css 0.0.0-stage → 1.25.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 +22 -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 +16789 -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-bar.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 +1289 -0
- package/dist/index.cjs +3049 -0
- package/dist/index.d.cts +27 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.js +3022 -0
- package/dist/plugins/tailwind-theme.css +505 -0
- package/dist/plugins/tailwind3-theme.js +683 -0
- package/dist/plugins/variables-sass.sass +415 -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 +458 -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 +295 -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 +77 -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/MenuBar.md +91 -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 +42 -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,100 @@
|
|
|
1
|
+
# Command
|
|
2
|
+
|
|
3
|
+
A modal menu that lets users search for and run actions or jump to pages from the keyboard. Opens over the page, filters its items as the user types, and closes when an item is chosen.
|
|
4
|
+
|
|
5
|
+
## Examples
|
|
6
|
+
|
|
7
|
+
```html
|
|
8
|
+
<button type="button" class="nv-button nv-button--kind-secondary" command="show-modal" commandfor="nv-command" aria-haspopup="dialog">Open command menu</button>
|
|
9
|
+
<dialog id="nv-command" class="nv-command-dialog" aria-label="Command menu">
|
|
10
|
+
<div class="nv-command-content">
|
|
11
|
+
<div class="nv-input-shell nv-input-shell--kind-floating nv-text-input-root nv-command-input">
|
|
12
|
+
<i class="nv-icon nv-icon-magnifying-glass" role="img" aria-hidden="true"></i>
|
|
13
|
+
<input
|
|
14
|
+
type="search"
|
|
15
|
+
role="combobox"
|
|
16
|
+
aria-label="Type a command or search..."
|
|
17
|
+
aria-autocomplete="list"
|
|
18
|
+
aria-controls="nv-command-list"
|
|
19
|
+
aria-expanded="true"
|
|
20
|
+
aria-activedescendant="nv-command-new-document"
|
|
21
|
+
autocomplete="off"
|
|
22
|
+
spellcheck="false"
|
|
23
|
+
placeholder="Type a command or search..."
|
|
24
|
+
/>
|
|
25
|
+
</div>
|
|
26
|
+
<div id="nv-command-list" class="nv-command-list" role="listbox" aria-label="Commands" data-empty-message="No results found">
|
|
27
|
+
<div class="nv-command-section" role="group" aria-labelledby="nv-command-suggestions">
|
|
28
|
+
<div id="nv-command-suggestions" class="nv-command-heading" role="presentation">Suggestions</div>
|
|
29
|
+
<button
|
|
30
|
+
type="button"
|
|
31
|
+
id="nv-command-new-document"
|
|
32
|
+
aria-labelledby="nv-command-new-document-label"
|
|
33
|
+
class="nv-command-item"
|
|
34
|
+
role="option"
|
|
35
|
+
tabindex="-1"
|
|
36
|
+
aria-selected="true"
|
|
37
|
+
data-active-item="true"
|
|
38
|
+
>
|
|
39
|
+
<span class="nv-command-item-start">
|
|
40
|
+
<i class="nv-icon nv-icon-document" role="img" aria-hidden="true"></i>
|
|
41
|
+
</span>
|
|
42
|
+
<span class="nv-command-item-text">
|
|
43
|
+
<span id="nv-command-new-document-label" class="nv-command-item-label">New document</span>
|
|
44
|
+
</span>
|
|
45
|
+
<span class="nv-command-item-end">
|
|
46
|
+
<kbd class="nv-kbd-root nv-kbd--size-small nv-kbd--kind-solid">
|
|
47
|
+
<kbd class="nv-kbd-key">⌘</kbd>
|
|
48
|
+
<kbd class="nv-kbd-key">N</kbd>
|
|
49
|
+
</kbd>
|
|
50
|
+
</span>
|
|
51
|
+
</button>
|
|
52
|
+
<button
|
|
53
|
+
type="button"
|
|
54
|
+
id="nv-command-upload"
|
|
55
|
+
aria-labelledby="nv-command-upload-label"
|
|
56
|
+
aria-describedby="nv-command-upload-description"
|
|
57
|
+
class="nv-command-item"
|
|
58
|
+
role="option"
|
|
59
|
+
tabindex="-1"
|
|
60
|
+
aria-selected="false"
|
|
61
|
+
aria-disabled="true"
|
|
62
|
+
data-disabled="true"
|
|
63
|
+
>
|
|
64
|
+
<span class="nv-command-item-start">
|
|
65
|
+
<i class="nv-icon nv-icon-paperclip" role="img" aria-hidden="true"></i>
|
|
66
|
+
</span>
|
|
67
|
+
<span class="nv-command-item-text">
|
|
68
|
+
<span id="nv-command-upload-label" class="nv-command-item-label">Upload file</span>
|
|
69
|
+
<span id="nv-command-upload-description" class="nv-command-item-description"> Available to project editors </span>
|
|
70
|
+
</span>
|
|
71
|
+
</button>
|
|
72
|
+
</div>
|
|
73
|
+
<hr class="nv-command-divider" role="none" />
|
|
74
|
+
<div class="nv-command-section" role="group" aria-labelledby="nv-command-navigation">
|
|
75
|
+
<div id="nv-command-navigation" class="nv-command-heading" role="presentation">Navigation</div>
|
|
76
|
+
<a href="/calendar" id="nv-command-calendar" aria-labelledby="nv-command-calendar-label" class="nv-command-item" role="option" tabindex="-1" aria-selected="false">
|
|
77
|
+
<span class="nv-command-item-start">
|
|
78
|
+
<i class="nv-icon nv-icon-calendar" role="img" aria-hidden="true"></i>
|
|
79
|
+
</span>
|
|
80
|
+
<span class="nv-command-item-text">
|
|
81
|
+
<span id="nv-command-calendar-label" class="nv-command-item-label">Calendar</span>
|
|
82
|
+
</span>
|
|
83
|
+
</a>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
</dialog>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## CSS classes
|
|
91
|
+
|
|
92
|
+
### Elements
|
|
93
|
+
|
|
94
|
+
`nv-command-content`, `nv-command-dialog`, `nv-command-divider`, `nv-command-heading`, `nv-command-input`, `nv-command-item`, `nv-command-item-description`, `nv-command-item-end`, `nv-command-item-label`, `nv-command-item-start`, `nv-command-item-text`, `nv-command-list`, `nv-command-portal`, `nv-command-section`, `nv-command-status`
|
|
95
|
+
|
|
96
|
+
## See also
|
|
97
|
+
|
|
98
|
+
- [Dropdown](./Dropdown.md)
|
|
99
|
+
- [Combobox](./Combobox.md)
|
|
100
|
+
- [Kbd](./Kbd.md)
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# ContextMenu
|
|
2
|
+
|
|
3
|
+
A menu of actions that opens at the pointer when the user right-clicks, long-presses, or presses the Menu key inside an area. Use for secondary actions on the thing under the pointer.
|
|
4
|
+
|
|
5
|
+
## Examples
|
|
6
|
+
|
|
7
|
+
The menu is a `manual` popover placed at a viewport point: the component writes it to `--nv-context-menu-x` and `--nv-context-menu-y`, in pixels, when it opens. Nothing opens a menu from a right-click without JavaScript, so this markup lets the file button toggle it with `popovertarget` and anchors it inside the button with CSS anchor positioning instead — keep an equivalent visible way to reach the same actions.
|
|
8
|
+
|
|
9
|
+
```html
|
|
10
|
+
<button
|
|
11
|
+
type="button"
|
|
12
|
+
popovertarget="nv-context-menu"
|
|
13
|
+
class="nv-context-menu-trigger"
|
|
14
|
+
data-state="closed"
|
|
15
|
+
style="anchor-name: --nv-context-menu-anchor; width: 20rem; height: 10rem; border: 1px dashed; border-radius: 6px"
|
|
16
|
+
>
|
|
17
|
+
report.pdf
|
|
18
|
+
</button>
|
|
19
|
+
<menu
|
|
20
|
+
popover="manual"
|
|
21
|
+
id="nv-context-menu"
|
|
22
|
+
role="menu"
|
|
23
|
+
aria-label="File actions"
|
|
24
|
+
aria-orientation="vertical"
|
|
25
|
+
tabindex="-1"
|
|
26
|
+
class="nv-menu-root nv-dropdown-content nv-context-menu-content"
|
|
27
|
+
style="position-anchor: --nv-context-menu-anchor; top: calc(anchor(top) + 24px); left: calc(anchor(left) + 24px)"
|
|
28
|
+
>
|
|
29
|
+
<button type="button" role="menuitem" class="nv-menu-item">
|
|
30
|
+
<span class="nv-menu-item-slot">
|
|
31
|
+
<i class="nv-icon nv-icon--fill nv-icon-open-external" role="img" aria-hidden="true"></i>
|
|
32
|
+
</span>
|
|
33
|
+
<span class="nv-menu-item-label">Open</span>
|
|
34
|
+
</button>
|
|
35
|
+
<button type="button" role="menuitem" class="nv-menu-item">
|
|
36
|
+
<span class="nv-menu-item-slot">
|
|
37
|
+
<i class="nv-icon nv-icon--fill nv-icon-copy-doc" role="img" aria-hidden="true"></i>
|
|
38
|
+
</span>
|
|
39
|
+
<span class="nv-menu-item-label">Duplicate</span>
|
|
40
|
+
</button>
|
|
41
|
+
<div class="nv-divider-root">
|
|
42
|
+
<div class="nv-divider-element nv-divider-element--orientation-horizontal" role="separator" aria-orientation="horizontal"></div>
|
|
43
|
+
</div>
|
|
44
|
+
<button type="button" role="menuitem" class="nv-menu-item nv-menu-item--danger">
|
|
45
|
+
<span class="nv-menu-item-slot">
|
|
46
|
+
<i class="nv-icon nv-icon--fill nv-icon-trash" role="img" aria-hidden="true"></i>
|
|
47
|
+
</span>
|
|
48
|
+
<span class="nv-menu-item-label">Delete</span>
|
|
49
|
+
</button>
|
|
50
|
+
</menu>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## CSS classes
|
|
54
|
+
|
|
55
|
+
### Elements
|
|
56
|
+
|
|
57
|
+
`nv-context-menu-content`, `nv-context-menu-trigger`
|
|
58
|
+
|
|
59
|
+
## See also
|
|
60
|
+
|
|
61
|
+
- [Dropdown](./Dropdown.md)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# DatePicker
|
|
2
|
+
|
|
3
|
+
An input field paired with a calendar popup for selecting a single date or a date range. Use when users need to enter or browse to a specific date.
|
|
4
|
+
|
|
5
|
+
## Examples
|
|
6
|
+
|
|
7
|
+
A bare `.nv-input-shell` keeps the browser's own calendar picker indicator, so `<input type="date">` opens the native calendar without any script. Do not add a decorative calendar icon here — it duplicates the indicator that opens the picker.
|
|
8
|
+
|
|
9
|
+
```html
|
|
10
|
+
<label class="nv-input-shell">
|
|
11
|
+
<input type="date" aria-label="Date" />
|
|
12
|
+
</label>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## CSS classes
|
|
16
|
+
|
|
17
|
+
### Elements
|
|
18
|
+
|
|
19
|
+
`nv-date-picker-calendar`, `nv-date-picker-calendar-caption`, `nv-date-picker-calendar-cell`, `nv-date-picker-calendar-day`, `nv-date-picker-calendar-dropdown`, `nv-date-picker-calendar-dropdown-container`, `nv-date-picker-calendar-footer`, `nv-date-picker-calendar-header-container`, `nv-date-picker-calendar-month`, `nv-date-picker-calendar-months`, `nv-date-picker-calendar-next-button`, `nv-date-picker-calendar-prev-button`, `nv-date-picker-calendar-range-end`, `nv-date-picker-calendar-range-middle`, `nv-date-picker-calendar-range-start`, `nv-date-picker-calendar-table`, `nv-date-picker-calendar-week`, `nv-date-picker-calendar-weekday`, `nv-date-picker-content`, `nv-date-picker-native-fallback`, `nv-date-picker-trigger`
|
|
20
|
+
|
|
21
|
+
### Modifiers
|
|
22
|
+
|
|
23
|
+
| Group | Classes |
|
|
24
|
+
| --- | --- |
|
|
25
|
+
| kind | `nv-date-picker-trigger--kind-range` |
|
|
26
|
+
| state | `nv-date-picker-calendar-caption--range`, `nv-date-picker-calendar-cell--range`, `nv-date-picker-calendar-day--disabled`, `nv-date-picker-calendar-day--outside`, `nv-date-picker-calendar-day--selected` |
|
|
27
|
+
|
|
28
|
+
## See also
|
|
29
|
+
|
|
30
|
+
- [FormField](./FormField.md)
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Divider
|
|
2
|
+
|
|
3
|
+
A horizontal or vertical line that separates distinct regions of content.
|
|
4
|
+
|
|
5
|
+
## When to use
|
|
6
|
+
|
|
7
|
+
Use Divider to separate distinct regions, such as navigation groups in a sidebar, when spacing alone doesn't make the boundary clear.
|
|
8
|
+
You may not need a Divider when headings and spacing already make each section clear, such as between sections of a form.
|
|
9
|
+
Choose [Resizable](./Resizable.md) when people need to drag a boundary to resize adjacent panels.
|
|
10
|
+
|
|
11
|
+
## Usage guidelines
|
|
12
|
+
|
|
13
|
+
- Make lines decorative when headings or labels already communicate the grouping, so screen readers don't announce redundant separators.
|
|
14
|
+
- Start with the small thickness. Reserve heavier rules for boundaries that need more visual weight.
|
|
15
|
+
- The `width` variant controls thickness, not length: medium is 2px and large is 4px. Set the available span through the surrounding layout.
|
|
16
|
+
- Give a vertical rule a container with a definite height that doesn't grow across the row.
|
|
17
|
+
- Keep text between rules available to screen readers and make the surrounding lines decorative.
|
|
18
|
+
- Set semantics yourself on the line element: `role="separator"` with the matching `aria-orientation`, or `role="none"` for an ornamental line.
|
|
19
|
+
|
|
20
|
+
## Examples
|
|
21
|
+
|
|
22
|
+
```html
|
|
23
|
+
<div class="nv-flex nv-flex--align-stretch nv-flex--direction-col nv-flex--justify-start nv-flex--wrap-nowrap nv-primitive--gap-density-md" style="width: 100%">
|
|
24
|
+
<div class="nv-flex nv-flex--align-stretch nv-flex--direction-col nv-flex--justify-start nv-flex--wrap-nowrap nv-primitive--gap-density-xs">
|
|
25
|
+
<span class="nv-text nv-text--label-semibold-md">Project resources</span>
|
|
26
|
+
<span class="nv-text nv-text--label-regular-md">Datasets and training jobs</span>
|
|
27
|
+
</div>
|
|
28
|
+
<div class="nv-divider-root">
|
|
29
|
+
<div class="nv-divider-element nv-divider-element--orientation-horizontal" role="none"></div>
|
|
30
|
+
</div>
|
|
31
|
+
<div class="nv-flex nv-flex--align-stretch nv-flex--direction-col nv-flex--justify-start nv-flex--wrap-nowrap nv-primitive--gap-density-xs">
|
|
32
|
+
<span class="nv-text nv-text--label-semibold-md">Workspace settings</span>
|
|
33
|
+
<span class="nv-text nv-text--label-regular-md">Members and access</span>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Vertical separation
|
|
39
|
+
|
|
40
|
+
```html
|
|
41
|
+
<div class="nv-flex nv-flex--align-center nv-flex--direction-row nv-flex--justify-start nv-flex--wrap-nowrap nv-primitive--gap-density-lg">
|
|
42
|
+
<span class="nv-text nv-text--label-regular-md">CPU resources</span>
|
|
43
|
+
<div style="height: 2rem; flex: none">
|
|
44
|
+
<div class="nv-divider-root">
|
|
45
|
+
<div class="nv-divider-element nv-divider-element--orientation-vertical" role="none"></div>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
<span class="nv-text nv-text--label-regular-md">GPU resources</span>
|
|
49
|
+
</div>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Text between rules
|
|
53
|
+
|
|
54
|
+
```html
|
|
55
|
+
<div class="nv-flex nv-flex--align-center nv-flex--direction-row nv-flex--justify-start nv-flex--wrap-nowrap nv-primitive--gap-density-lg" style="width: 100%">
|
|
56
|
+
<div class="nv-divider-root">
|
|
57
|
+
<div class="nv-divider-element nv-divider-element--orientation-horizontal" role="none"></div>
|
|
58
|
+
</div>
|
|
59
|
+
<span class="nv-text nv-text--label-regular-md" style="flex-shrink: 0">Or use an access token</span>
|
|
60
|
+
<div class="nv-divider-root">
|
|
61
|
+
<div class="nv-divider-element nv-divider-element--orientation-horizontal" role="none"></div>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## CSS classes
|
|
67
|
+
|
|
68
|
+
### Elements
|
|
69
|
+
|
|
70
|
+
`nv-divider-element`, `nv-divider-root`
|
|
71
|
+
|
|
72
|
+
### Modifiers
|
|
73
|
+
|
|
74
|
+
| Group | Classes |
|
|
75
|
+
| --- | --- |
|
|
76
|
+
| orientation | `nv-divider-element--orientation-horizontal`, `nv-divider-element--orientation-vertical` |
|
|
77
|
+
| width | `nv-divider-element--width-large`, `nv-divider-element--width-medium` |
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Dropdown
|
|
2
|
+
|
|
3
|
+
A button that opens a menu of actions, links, or selectable options. Use for contextual actions, filters, and overflow menus.
|
|
4
|
+
|
|
5
|
+
## Examples
|
|
6
|
+
|
|
7
|
+
```html
|
|
8
|
+
<button
|
|
9
|
+
type="button"
|
|
10
|
+
popovertarget="nv-dropdown"
|
|
11
|
+
aria-haspopup="menu"
|
|
12
|
+
aria-controls="nv-dropdown"
|
|
13
|
+
aria-expanded="false"
|
|
14
|
+
data-state="closed"
|
|
15
|
+
class="nv-button nv-button--kind-tertiary nv-dropdown-trigger"
|
|
16
|
+
style="anchor-name: --nv-dropdown-anchor"
|
|
17
|
+
>
|
|
18
|
+
Open Dropdown
|
|
19
|
+
<i class="nv-animated-chevron nv-icon nv-icon-chevron-down" aria-hidden="true"></i>
|
|
20
|
+
</button>
|
|
21
|
+
<menu
|
|
22
|
+
popover="auto"
|
|
23
|
+
id="nv-dropdown"
|
|
24
|
+
role="menu"
|
|
25
|
+
aria-orientation="vertical"
|
|
26
|
+
data-side="bottom"
|
|
27
|
+
data-align="start"
|
|
28
|
+
class="nv-menu-root nv-dropdown-content"
|
|
29
|
+
style="position-anchor: --nv-dropdown-anchor"
|
|
30
|
+
>
|
|
31
|
+
<button type="button" role="menuitem" class="nv-menu-item">
|
|
32
|
+
<span class="nv-menu-item-label">Item 1</span>
|
|
33
|
+
</button>
|
|
34
|
+
<button type="button" role="menuitem" class="nv-menu-item">
|
|
35
|
+
<span class="nv-menu-item-label">Item 2</span>
|
|
36
|
+
</button>
|
|
37
|
+
<button type="button" role="menuitem" class="nv-menu-item">
|
|
38
|
+
<span class="nv-menu-item-label">Item 3</span>
|
|
39
|
+
</button>
|
|
40
|
+
</menu>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Filterable HTML structure
|
|
44
|
+
|
|
45
|
+
Filtering requires consumer JavaScript that removes non-matching items from the DOM; when no `.nv-menu-item` remains, the CSS renders the `data-empty-message` text as the empty state.
|
|
46
|
+
|
|
47
|
+
```html
|
|
48
|
+
<button
|
|
49
|
+
type="button"
|
|
50
|
+
popovertarget="nv-dropdown-filterable"
|
|
51
|
+
aria-haspopup="menu"
|
|
52
|
+
aria-controls="nv-dropdown-filterable"
|
|
53
|
+
aria-expanded="false"
|
|
54
|
+
data-state="closed"
|
|
55
|
+
class="nv-button nv-button--kind-tertiary nv-dropdown-trigger"
|
|
56
|
+
style="anchor-name: --nv-dropdown-filterable-anchor"
|
|
57
|
+
>
|
|
58
|
+
Open Dropdown
|
|
59
|
+
<i class="nv-animated-chevron nv-icon nv-icon-chevron-down" aria-hidden="true"></i>
|
|
60
|
+
</button>
|
|
61
|
+
<menu
|
|
62
|
+
popover="auto"
|
|
63
|
+
id="nv-dropdown-filterable"
|
|
64
|
+
data-side="bottom"
|
|
65
|
+
data-align="start"
|
|
66
|
+
data-empty-message="No results found"
|
|
67
|
+
class="nv-menu-root nv-menu--filterable nv-dropdown-content"
|
|
68
|
+
role="none"
|
|
69
|
+
style="position-anchor: --nv-dropdown-filterable-anchor"
|
|
70
|
+
>
|
|
71
|
+
<div class="nv-input-shell nv-text-input-root nv-menu-search">
|
|
72
|
+
<i class="nv-icon nv-icon--fill nv-icon-filter" aria-hidden="true"></i>
|
|
73
|
+
<input type="search" placeholder="Filter items" aria-label="Filter items" />
|
|
74
|
+
</div>
|
|
75
|
+
<menu class="nv-menu-list" role="menu" aria-orientation="vertical">
|
|
76
|
+
<button type="button" role="menuitem" class="nv-menu-item">
|
|
77
|
+
<span class="nv-menu-item-label">GPU Metrics</span>
|
|
78
|
+
</button>
|
|
79
|
+
<button type="button" role="menuitem" class="nv-menu-item">
|
|
80
|
+
<span class="nv-menu-item-label">Training Jobs</span>
|
|
81
|
+
</button>
|
|
82
|
+
</menu>
|
|
83
|
+
</menu>
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## CSS classes
|
|
87
|
+
|
|
88
|
+
### Elements
|
|
89
|
+
|
|
90
|
+
`nv-dropdown-content`, `nv-dropdown-sub`, `nv-dropdown-sub-content`, `nv-dropdown-trigger`
|
|
91
|
+
|
|
92
|
+
## See also
|
|
93
|
+
|
|
94
|
+
- [Menu](./Menu.md)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Flex
|
|
2
|
+
|
|
3
|
+
A layout primitive that arranges its children with CSS flexbox using design-token spacing.
|
|
4
|
+
|
|
5
|
+
## Examples
|
|
6
|
+
|
|
7
|
+
```html
|
|
8
|
+
<div class="nv-flex nv-flex--justify-between nv-primitive--gap-density-md">
|
|
9
|
+
<div>Item A</div>
|
|
10
|
+
<div>Item B</div>
|
|
11
|
+
<div>Item C</div>
|
|
12
|
+
</div>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## CSS classes
|
|
16
|
+
|
|
17
|
+
### Elements
|
|
18
|
+
|
|
19
|
+
`nv-flex`
|
|
20
|
+
|
|
21
|
+
### Modifiers
|
|
22
|
+
|
|
23
|
+
| Group | Classes |
|
|
24
|
+
| --- | --- |
|
|
25
|
+
| align | `nv-flex--align-baseline`, `nv-flex--align-center`, `nv-flex--align-end`, `nv-flex--align-start`, `nv-flex--align-stretch` |
|
|
26
|
+
| direction | `nv-flex--direction-col`, `nv-flex--direction-col-reverse`, `nv-flex--direction-row`, `nv-flex--direction-row-reverse` |
|
|
27
|
+
| justify | `nv-flex--justify-around`, `nv-flex--justify-between`, `nv-flex--justify-center`, `nv-flex--justify-end`, `nv-flex--justify-evenly`, `nv-flex--justify-normal`, `nv-flex--justify-start`, `nv-flex--justify-stretch` |
|
|
28
|
+
| wrap | `nv-flex--wrap-nowrap`, `nv-flex--wrap-wrap`, `nv-flex--wrap-wrap-reverse` |
|
|
29
|
+
|
|
30
|
+
## See also
|
|
31
|
+
|
|
32
|
+
- [Stack](./Stack.md)
|
|
33
|
+
- [Grid](./Grid.md)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# FormField
|
|
2
|
+
|
|
3
|
+
Also known as: Form Group, Fieldset
|
|
4
|
+
|
|
5
|
+
Groups a label, input, and helper text to keep form elements consistent and accessible.
|
|
6
|
+
|
|
7
|
+
## Examples
|
|
8
|
+
|
|
9
|
+
```html
|
|
10
|
+
<div class="nv-form-field-root">
|
|
11
|
+
<div class="nv-form-field-content-group">
|
|
12
|
+
<div class="nv-form-field-label-group">
|
|
13
|
+
<label for="email" class="nv-label"> Email Address </label>
|
|
14
|
+
</div>
|
|
15
|
+
<div class="nv-input-shell">
|
|
16
|
+
<input type="email" id="email" placeholder="name@example.com" aria-describedby="email-helper" />
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
<div id="email-helper" class="nv-form-field-helper">We'll never share your email with anyone else.</div>
|
|
20
|
+
</div>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## CSS classes
|
|
24
|
+
|
|
25
|
+
### Elements
|
|
26
|
+
|
|
27
|
+
`nv-form-field-content-group`, `nv-form-field-control-group`, `nv-form-field-helper`, `nv-form-field-label-group`, `nv-form-field-root`, `nv-form-field-sr-only`
|
|
28
|
+
|
|
29
|
+
### Modifiers
|
|
30
|
+
|
|
31
|
+
| Group | Classes |
|
|
32
|
+
| --- | --- |
|
|
33
|
+
| kind | `nv-form-field-helper--kind-error`, `nv-form-field-helper--kind-success` |
|
|
34
|
+
| label | `nv-form-field-root--label-position-left` |
|
|
35
|
+
| state | `nv-form-field-root--required` |
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Grid
|
|
2
|
+
|
|
3
|
+
A two-dimensional layout primitive that arranges children into rows and columns. Use for dashboards, card listings, and any layout that needs both horizontal and vertical alignment.
|
|
4
|
+
|
|
5
|
+
## Examples
|
|
6
|
+
|
|
7
|
+
```html
|
|
8
|
+
<div class="nv-grid nv-primitive--gap-density-md" style="--nv-grid-template-columns: repeat(3, minmax(0, 1fr));">
|
|
9
|
+
<div>Item 1</div>
|
|
10
|
+
<div>Item 2</div>
|
|
11
|
+
<div>Item 3</div>
|
|
12
|
+
<div class="nv-grid-item" style="--nv-grid-item-col-start: span 2; --nv-grid-item-col-end: span 2;">Spanning two columns</div>
|
|
13
|
+
<div>Item 5</div>
|
|
14
|
+
</div>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## CSS classes
|
|
18
|
+
|
|
19
|
+
### Elements
|
|
20
|
+
|
|
21
|
+
`nv-grid`, `nv-grid-item`
|
|
22
|
+
|
|
23
|
+
### Modifiers
|
|
24
|
+
|
|
25
|
+
| Group | Classes |
|
|
26
|
+
| --- | --- |
|
|
27
|
+
| flow | `nv-grid--flow-col`, `nv-grid--flow-col-dense`, `nv-grid--flow-dense`, `nv-grid--flow-row`, `nv-grid--flow-row-dense` |
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Group
|
|
2
|
+
|
|
3
|
+
A layout container that visually joins adjacent related items into one compact unit.
|
|
4
|
+
|
|
5
|
+
## When to use
|
|
6
|
+
|
|
7
|
+
Use Group to join related items, such as a text field and the button that acts on it or a strip of badges, into one connected unit. Use [ButtonGroup](./ButtonGroup.md) for a set of related action buttons, including a split button. Use [Inline](./Inline.md), [Flex](./Flex.md), or [Stack](./Stack.md) when items need standard spacing instead of joined edges, such as Cancel and Save in a dialog footer.
|
|
8
|
+
|
|
9
|
+
Group has no selection state. Use [SegmentedControl](./SegmentedControl.md) when exactly one option is always selected. Use [ToggleButtonGroup](./ToggleButtonGroup.md) when options toggle on and off, or when having none selected is valid.
|
|
10
|
+
|
|
11
|
+
## Usage guidelines
|
|
12
|
+
|
|
13
|
+
- Group adds no role or accessible name. When the items only make sense together, add `role="group"` and an `aria-label` to the group, and keep each item's own label on the item.
|
|
14
|
+
- Group joins items in a row only. Its corner rounding and border overlap assume a horizontal layout, so stack vertical actions with spacing instead.
|
|
15
|
+
- Make each item a direct child of the group. A wrapper element between them becomes the joined item, so the shared edges land on the wrapper instead of the control.
|
|
16
|
+
- Leave an absent item out of the markup instead of hiding it. A child with `hidden` or `display: none` still counts as an item, so its visible neighbor keeps a squared edge. A single item keeps its full rounding, and popover content placed inside the group is skipped.
|
|
17
|
+
|
|
18
|
+
## Examples
|
|
19
|
+
|
|
20
|
+
```html
|
|
21
|
+
<div class="nv-group" aria-label="Model search" role="group">
|
|
22
|
+
<div class="nv-input-shell nv-text-input-root"><input type="text" aria-label="Search models" /></div>
|
|
23
|
+
<button class="nv-button nv-button--kind-secondary" type="button">Search</button>
|
|
24
|
+
</div>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Kind
|
|
28
|
+
|
|
29
|
+
`flush`, the default, overlaps adjacent borders by 1px, for items with their own border such as text fields and outline buttons. `gap` leaves 1px between filled items, such as solid badges. `border` draws a 1px divider between filled or borderless items.
|
|
30
|
+
|
|
31
|
+
```html
|
|
32
|
+
<div class="nv-flex nv-flex--align-stretch nv-flex--direction-col nv-flex--justify-start nv-flex--wrap-nowrap nv-primitive--gap-4">
|
|
33
|
+
<div class="nv-group nv-group--kind-gap">
|
|
34
|
+
<span class="nv-badge nv-badge--kind-solid nv-badge--color-green">12 running</span>
|
|
35
|
+
<span class="nv-badge nv-badge--kind-solid nv-badge--color-yellow">3 queued</span>
|
|
36
|
+
<span class="nv-badge nv-badge--kind-solid nv-badge--color-red">1 failed</span>
|
|
37
|
+
</div>
|
|
38
|
+
<div class="nv-group nv-group--kind-border">
|
|
39
|
+
<span class="nv-badge nv-badge--kind-solid nv-badge--color-gray">4 GPUs</span>
|
|
40
|
+
<span class="nv-badge nv-badge--kind-solid nv-badge--color-gray">80 GB</span>
|
|
41
|
+
<span class="nv-badge nv-badge--kind-solid nv-badge--color-gray">SXM</span>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Name the group
|
|
47
|
+
|
|
48
|
+
Name the group when its items act as one control, such as a field and the button that resets it, so assistive technology announces their shared purpose. A purely visual group, such as a strip of status badges, needs no name.
|
|
49
|
+
|
|
50
|
+
```html
|
|
51
|
+
<div class="nv-group" aria-label="Batch size controls" role="group">
|
|
52
|
+
<div class="nv-input-shell nv-text-input-root"><input type="text" aria-label="Batch size" value="32" /></div>
|
|
53
|
+
<button class="nv-button nv-button--kind-secondary" type="button" aria-label="Reset batch size">
|
|
54
|
+
<i class="nv-icon nv-icon-refresh" role="img" aria-hidden="true"></i>
|
|
55
|
+
</button>
|
|
56
|
+
</div>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Split button
|
|
60
|
+
|
|
61
|
+
Keep both parts the same kind, color, and size so they read as one control, and give the icon-only menu trigger an accessible name.
|
|
62
|
+
|
|
63
|
+
Place the native popover menu beside the buttons; Group skips `[popover]` children when it rounds corners. The Popover API opens and dismisses the menu, and menu keyboard navigation is up to you.
|
|
64
|
+
|
|
65
|
+
```html
|
|
66
|
+
<div class="nv-group">
|
|
67
|
+
<button class="nv-button" type="button">Deploy</button>
|
|
68
|
+
<button class="nv-button" type="button" aria-label="More deploy options" popovertarget="deploy-options-menu">
|
|
69
|
+
<i class="nv-icon nv-icon-chevron-down" aria-hidden="true"></i>
|
|
70
|
+
</button>
|
|
71
|
+
<menu class="nv-menu-root" id="deploy-options-menu" popover="auto">
|
|
72
|
+
<li>
|
|
73
|
+
<button class="nv-menu-item" type="button"><span class="nv-menu-item-label">Deploy to staging</span></button>
|
|
74
|
+
</li>
|
|
75
|
+
<li>
|
|
76
|
+
<button class="nv-menu-item" type="button"><span class="nv-menu-item-label">Deploy to production</span></button>
|
|
77
|
+
</li>
|
|
78
|
+
</menu>
|
|
79
|
+
</div>
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## CSS classes
|
|
83
|
+
|
|
84
|
+
### Elements
|
|
85
|
+
|
|
86
|
+
`nv-group`
|
|
87
|
+
|
|
88
|
+
### Modifiers
|
|
89
|
+
|
|
90
|
+
| Group | Classes |
|
|
91
|
+
| --- | --- |
|
|
92
|
+
| kind | `nv-group--kind-border`, `nv-group--kind-flush`, `nv-group--kind-gap` |
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Halo
|
|
2
|
+
|
|
3
|
+
A decorative rotating gradient ring that wraps a single element to draw attention to it. Halo is presentational only — it adds no semantics, so the element inside keeps its own role, label, and behavior.
|
|
4
|
+
|
|
5
|
+
## Examples
|
|
6
|
+
|
|
7
|
+
The `nv-halo-glow` span is optional and draws the outer bloom — it is what the `glow` prop renders, and the ring itself needs only the wrapper. Drop the span for a ring on its own, which is the default.
|
|
8
|
+
|
|
9
|
+
```html
|
|
10
|
+
<div class="nv-halo">
|
|
11
|
+
<span class="nv-halo-glow" aria-hidden="true"></span>
|
|
12
|
+
<button class="nv-button nv-button--kind-primary" type="button">Ask AI</button>
|
|
13
|
+
</div>
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## CSS classes
|
|
17
|
+
|
|
18
|
+
### Elements
|
|
19
|
+
|
|
20
|
+
`nv-halo`, `nv-halo-glow`
|
|
21
|
+
|
|
22
|
+
### Modifiers
|
|
23
|
+
|
|
24
|
+
| Group | Classes |
|
|
25
|
+
| --- | --- |
|
|
26
|
+
| child | `nv-halo--child-radius-2xl`, `nv-halo--child-radius-3xl`, `nv-halo--child-radius-density-lg`, `nv-halo--child-radius-density-xl`, `nv-halo--child-radius-lg`, `nv-halo--child-radius-md`, `nv-halo--child-radius-none`, `nv-halo--child-radius-round`, `nv-halo--child-radius-sm`, `nv-halo--child-radius-xl` |
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Hero
|
|
2
|
+
|
|
3
|
+
A large page banner that combines headline messaging and calls to action with imagery.
|
|
4
|
+
|
|
5
|
+
## Examples
|
|
6
|
+
|
|
7
|
+
```html
|
|
8
|
+
<div class="nv-hero-root nv-dark">
|
|
9
|
+
<img class="nv-hero-media" src="./images/placeholder.png" alt="" />
|
|
10
|
+
<div class="nv-hero-content">
|
|
11
|
+
<p class="nv-hero-subheading">Kaizen Design System</p>
|
|
12
|
+
<h1 class="nv-hero-heading">Kaizen UI Foundations</h1>
|
|
13
|
+
<p class="nv-hero-body">NVIDIA's design system: theme-responsive tokens, component styles, and accessible patterns</p>
|
|
14
|
+
<div class="nv-hero-footer">
|
|
15
|
+
<button type="button" class="nv-button nv-button--kind-primary nv-button--color-brand">Explore</button>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## CSS classes
|
|
22
|
+
|
|
23
|
+
### Elements
|
|
24
|
+
|
|
25
|
+
`nv-hero-body`, `nv-hero-content`, `nv-hero-footer`, `nv-hero-heading`, `nv-hero-media`, `nv-hero-root`, `nv-hero-subheading`
|
|
26
|
+
|
|
27
|
+
## See also
|
|
28
|
+
|
|
29
|
+
- [PageHeader](./PageHeader.md)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# HorizontalNav
|
|
2
|
+
|
|
3
|
+
A horizontal navigation bar that organizes links to top-level sections of an application or site.
|
|
4
|
+
|
|
5
|
+
## Examples
|
|
6
|
+
|
|
7
|
+
```html
|
|
8
|
+
<nav class="nv-horizontal-nav-root">
|
|
9
|
+
<div class="nv-horizontal-nav-list" role="presentation">
|
|
10
|
+
<div id="horizontal-nav-scroll-region" class="nv-tabs-scroll-container">
|
|
11
|
+
<a class="nv-horizontal-nav-item" href="/" aria-current="page" data-active> Home </a>
|
|
12
|
+
<a class="nv-horizontal-nav-item" href="/about"> About </a>
|
|
13
|
+
<a class="nv-horizontal-nav-item" href="/contact"> Contact </a>
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
</nav>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## CSS classes
|
|
20
|
+
|
|
21
|
+
### Elements
|
|
22
|
+
|
|
23
|
+
`nv-horizontal-nav-item`, `nv-horizontal-nav-list`
|
|
24
|
+
|
|
25
|
+
### Modifiers
|
|
26
|
+
|
|
27
|
+
| Group | Classes |
|
|
28
|
+
| --- | --- |
|
|
29
|
+
| state | `nv-horizontal-nav-item--disabled`, `nv-horizontal-nav-item--selected` |
|
|
30
|
+
|
|
31
|
+
## See also
|
|
32
|
+
|
|
33
|
+
- [VerticalNav](./VerticalNav.md)
|
|
34
|
+
- [AppBar](./AppBar.md)
|