@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.
Files changed (306) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/LICENSE.md +203 -0
  3. package/NOTICE.md +62 -0
  4. package/README.md +61 -2
  5. package/dist/base/a11y.css +1 -0
  6. package/dist/base/all.js +1225 -0
  7. package/dist/base/anchor.css +1 -0
  8. package/dist/base/base-external.css +15 -0
  9. package/dist/base/base-for-aem-only.css +15 -0
  10. package/dist/base/base.css +15 -0
  11. package/dist/base/fonts-external.css +1 -0
  12. package/dist/base/fonts.css +1 -0
  13. package/dist/base/icons.css +15 -0
  14. package/dist/base/motion.css +1 -0
  15. package/dist/base/reset.css +1 -0
  16. package/dist/base/theme-dark.css +1 -0
  17. package/dist/base/theme-density.css +1 -0
  18. package/dist/base/theme-light.css +1 -0
  19. package/dist/base/theme-only-dark.css +1 -0
  20. package/dist/base/top-layer-reset.css +1 -0
  21. package/dist/base/variables.css +1 -0
  22. package/dist/components/accordion.css +1 -0
  23. package/dist/components/all.css +1 -0
  24. package/dist/components/all.js +16789 -0
  25. package/dist/components/anchor.css +1 -0
  26. package/dist/components/animated-chevron.css +1 -0
  27. package/dist/components/app-bar.css +1 -0
  28. package/dist/components/attachment.css +1 -0
  29. package/dist/components/audio.css +1 -0
  30. package/dist/components/autocomplete.css +1 -0
  31. package/dist/components/avatar-group.css +1 -0
  32. package/dist/components/avatar.css +1 -0
  33. package/dist/components/badge.css +1 -0
  34. package/dist/components/banner.css +1 -0
  35. package/dist/components/block.css +1 -0
  36. package/dist/components/breadcrumbs.css +1 -0
  37. package/dist/components/button.css +1 -0
  38. package/dist/components/card.css +1 -0
  39. package/dist/components/carousel.css +1 -0
  40. package/dist/components/chat-bubble.css +1 -0
  41. package/dist/components/checkbox.css +1 -0
  42. package/dist/components/code-snippet.css +1 -0
  43. package/dist/components/collapsible.css +1 -0
  44. package/dist/components/combobox.css +1 -0
  45. package/dist/components/command.css +1 -0
  46. package/dist/components/context-menu.css +1 -0
  47. package/dist/components/date-picker.css +1 -0
  48. package/dist/components/divider.css +1 -0
  49. package/dist/components/dropdown.css +1 -0
  50. package/dist/components/flex.css +1 -0
  51. package/dist/components/form-field.css +1 -0
  52. package/dist/components/grid-item.css +1 -0
  53. package/dist/components/grid.css +1 -0
  54. package/dist/components/group.css +1 -0
  55. package/dist/components/halo.css +1 -0
  56. package/dist/components/hero.css +1 -0
  57. package/dist/components/horizontal-nav.css +1 -0
  58. package/dist/components/hover-card.css +1 -0
  59. package/dist/components/inline-notice.css +1 -0
  60. package/dist/components/input-shell.css +1 -0
  61. package/dist/components/jump-nav.css +1 -0
  62. package/dist/components/kbd.css +1 -0
  63. package/dist/components/key-value-editor.css +1 -0
  64. package/dist/components/key-value-group.css +1 -0
  65. package/dist/components/label.css +1 -0
  66. package/dist/components/legend.css +1 -0
  67. package/dist/components/list.css +1 -0
  68. package/dist/components/menu-bar.css +1 -0
  69. package/dist/components/menu.css +1 -0
  70. package/dist/components/meter.css +1 -0
  71. package/dist/components/modal.css +1 -0
  72. package/dist/components/notification.css +1 -0
  73. package/dist/components/otp-input.css +1 -0
  74. package/dist/components/page-header.css +1 -0
  75. package/dist/components/pagination.css +1 -0
  76. package/dist/components/panel.css +1 -0
  77. package/dist/components/popover.css +1 -0
  78. package/dist/components/primitive.css +1 -0
  79. package/dist/components/progress-bar.css +1 -0
  80. package/dist/components/radio-group.css +1 -0
  81. package/dist/components/range-slider.css +1 -0
  82. package/dist/components/rating.css +1 -0
  83. package/dist/components/reaction-group.css +1 -0
  84. package/dist/components/resizable.css +1 -0
  85. package/dist/components/segmented-control.css +1 -0
  86. package/dist/components/segmented-meter.css +1 -0
  87. package/dist/components/select.css +1 -0
  88. package/dist/components/severity.css +1 -0
  89. package/dist/components/side-panel.css +1 -0
  90. package/dist/components/skeleton.css +1 -0
  91. package/dist/components/slider.css +1 -0
  92. package/dist/components/spinner.css +1 -0
  93. package/dist/components/status-indicator.css +1 -0
  94. package/dist/components/status-message.css +1 -0
  95. package/dist/components/stepper.css +1 -0
  96. package/dist/components/switch.css +1 -0
  97. package/dist/components/table.css +1 -0
  98. package/dist/components/tabs.css +1 -0
  99. package/dist/components/tag-group.css +1 -0
  100. package/dist/components/tag.css +1 -0
  101. package/dist/components/terminal-line.css +1 -0
  102. package/dist/components/text-area.css +1 -0
  103. package/dist/components/text-content.css +1 -0
  104. package/dist/components/text.css +1 -0
  105. package/dist/components/toast.css +1 -0
  106. package/dist/components/toaster.css +1 -0
  107. package/dist/components/toggle-button-group.css +1 -0
  108. package/dist/components/toggle-button.css +1 -0
  109. package/dist/components/tooltip.css +1 -0
  110. package/dist/components/tree-nav.css +1 -0
  111. package/dist/components/upload.css +1 -0
  112. package/dist/components/vertical-nav.css +1 -0
  113. package/dist/css-sizes.js +1289 -0
  114. package/dist/index.cjs +3049 -0
  115. package/dist/index.d.cts +27 -0
  116. package/dist/index.d.ts +27 -0
  117. package/dist/index.js +3022 -0
  118. package/dist/plugins/tailwind-theme.css +505 -0
  119. package/dist/plugins/tailwind3-theme.js +683 -0
  120. package/dist/plugins/variables-sass.sass +415 -0
  121. package/dist/themes/kui11/_theme-selectors.css +1 -0
  122. package/dist/themes/kui11/accordion.css +1 -0
  123. package/dist/themes/kui11/app-bar.css +1 -0
  124. package/dist/themes/kui11/avatar.css +1 -0
  125. package/dist/themes/kui11/badge.css +1 -0
  126. package/dist/themes/kui11/banner.css +1 -0
  127. package/dist/themes/kui11/base.css +1 -0
  128. package/dist/themes/kui11/breadcrumbs.css +1 -0
  129. package/dist/themes/kui11/button.css +1 -0
  130. package/dist/themes/kui11/card.css +1 -0
  131. package/dist/themes/kui11/checkbox.css +1 -0
  132. package/dist/themes/kui11/components.css +1 -0
  133. package/dist/themes/kui11/date-picker.css +1 -0
  134. package/dist/themes/kui11/form-field.css +1 -0
  135. package/dist/themes/kui11/hero.css +1 -0
  136. package/dist/themes/kui11/horizontal-nav.css +1 -0
  137. package/dist/themes/kui11/input-shell.css +1 -0
  138. package/dist/themes/kui11/label.css +1 -0
  139. package/dist/themes/kui11/menu.css +1 -0
  140. package/dist/themes/kui11/modal.css +1 -0
  141. package/dist/themes/kui11/notification.css +1 -0
  142. package/dist/themes/kui11/page-header.css +1 -0
  143. package/dist/themes/kui11/pagination.css +1 -0
  144. package/dist/themes/kui11/popover.css +1 -0
  145. package/dist/themes/kui11/progress-bar.css +1 -0
  146. package/dist/themes/kui11/radio-group.css +1 -0
  147. package/dist/themes/kui11/range-slider.css +1 -0
  148. package/dist/themes/kui11/side-panel.css +1 -0
  149. package/dist/themes/kui11/slider.css +1 -0
  150. package/dist/themes/kui11/spinner.css +1 -0
  151. package/dist/themes/kui11/status-message.css +1 -0
  152. package/dist/themes/kui11/switch.css +1 -0
  153. package/dist/themes/kui11/table.css +1 -0
  154. package/dist/themes/kui11/tabs.css +1 -0
  155. package/dist/themes/kui11/tag.css +1 -0
  156. package/dist/themes/kui11/text-area.css +1 -0
  157. package/dist/themes/kui11/text-input.css +1 -0
  158. package/dist/themes/kui11/text.css +1 -0
  159. package/dist/themes/kui11/toast.css +1 -0
  160. package/dist/themes/kui11/tooltip.css +1 -0
  161. package/dist/themes/kui11/vertical-nav.css +1 -0
  162. package/dist/themes/kui11.base.css +1 -0
  163. package/dist/themes/kui11.base.js +935 -0
  164. package/dist/themes/kui11.components.css +1 -0
  165. package/dist/themes/kui11.components.js +2564 -0
  166. package/dist/themes/kui11.css +1 -0
  167. package/dist/themes/theme-partials.js +458 -0
  168. package/dist/utilities/all.js +442 -0
  169. package/dist/utilities/typography-utils.css +1 -0
  170. package/package.json +106 -3
  171. package/scripts/sync-skills.mjs +237 -0
  172. package/skills/kaizen-ui-html-css/SKILL.md +295 -0
  173. package/skills/kaizen-ui-html-css/assets/color-primitives-hex.md +141 -0
  174. package/skills/kaizen-ui-html-css/references/blocks/chat-input.md +94 -0
  175. package/skills/kaizen-ui-html-css/references/blocks/notification-center.md +320 -0
  176. package/skills/kaizen-ui-html-css/references/blocks/timeline.md +579 -0
  177. package/skills/kaizen-ui-html-css/references/components/Accordion.md +88 -0
  178. package/skills/kaizen-ui-html-css/references/components/Anchor.md +29 -0
  179. package/skills/kaizen-ui-html-css/references/components/AnimatedChevron.md +31 -0
  180. package/skills/kaizen-ui-html-css/references/components/AppBar.md +129 -0
  181. package/skills/kaizen-ui-html-css/references/components/Attachment.md +306 -0
  182. package/skills/kaizen-ui-html-css/references/components/Audio.md +21 -0
  183. package/skills/kaizen-ui-html-css/references/components/Autocomplete.md +29 -0
  184. package/skills/kaizen-ui-html-css/references/components/Avatar.md +28 -0
  185. package/skills/kaizen-ui-html-css/references/components/AvatarGroup.md +38 -0
  186. package/skills/kaizen-ui-html-css/references/components/Badge.md +121 -0
  187. package/skills/kaizen-ui-html-css/references/components/Banner.md +49 -0
  188. package/skills/kaizen-ui-html-css/references/components/Block.md +26 -0
  189. package/skills/kaizen-ui-html-css/references/components/Breadcrumbs.md +42 -0
  190. package/skills/kaizen-ui-html-css/references/components/Button.md +43 -0
  191. package/skills/kaizen-ui-html-css/references/components/ButtonGroup.md +32 -0
  192. package/skills/kaizen-ui-html-css/references/components/Card.md +39 -0
  193. package/skills/kaizen-ui-html-css/references/components/Carousel.md +53 -0
  194. package/skills/kaizen-ui-html-css/references/components/ChatBubble.md +28 -0
  195. package/skills/kaizen-ui-html-css/references/components/Checkbox.md +32 -0
  196. package/skills/kaizen-ui-html-css/references/components/CodeSnippet.md +33 -0
  197. package/skills/kaizen-ui-html-css/references/components/Collapsible.md +56 -0
  198. package/skills/kaizen-ui-html-css/references/components/Combobox.md +66 -0
  199. package/skills/kaizen-ui-html-css/references/components/Command.md +100 -0
  200. package/skills/kaizen-ui-html-css/references/components/ContextMenu.md +61 -0
  201. package/skills/kaizen-ui-html-css/references/components/DatePicker.md +30 -0
  202. package/skills/kaizen-ui-html-css/references/components/Divider.md +77 -0
  203. package/skills/kaizen-ui-html-css/references/components/Dropdown.md +94 -0
  204. package/skills/kaizen-ui-html-css/references/components/Flex.md +33 -0
  205. package/skills/kaizen-ui-html-css/references/components/FormField.md +35 -0
  206. package/skills/kaizen-ui-html-css/references/components/Grid.md +27 -0
  207. package/skills/kaizen-ui-html-css/references/components/Group.md +92 -0
  208. package/skills/kaizen-ui-html-css/references/components/Halo.md +26 -0
  209. package/skills/kaizen-ui-html-css/references/components/Hero.md +29 -0
  210. package/skills/kaizen-ui-html-css/references/components/HorizontalNav.md +34 -0
  211. package/skills/kaizen-ui-html-css/references/components/HoverCard.md +23 -0
  212. package/skills/kaizen-ui-html-css/references/components/Inline.md +49 -0
  213. package/skills/kaizen-ui-html-css/references/components/InlineNotice.md +96 -0
  214. package/skills/kaizen-ui-html-css/references/components/InputShell.md +26 -0
  215. package/skills/kaizen-ui-html-css/references/components/JumpNav.md +36 -0
  216. package/skills/kaizen-ui-html-css/references/components/Kbd.md +32 -0
  217. package/skills/kaizen-ui-html-css/references/components/KeyValueEditor.md +275 -0
  218. package/skills/kaizen-ui-html-css/references/components/KeyValueGroup.md +35 -0
  219. package/skills/kaizen-ui-html-css/references/components/Label.md +86 -0
  220. package/skills/kaizen-ui-html-css/references/components/Legend.md +148 -0
  221. package/skills/kaizen-ui-html-css/references/components/List.md +143 -0
  222. package/skills/kaizen-ui-html-css/references/components/Menu.md +103 -0
  223. package/skills/kaizen-ui-html-css/references/components/MenuBar.md +91 -0
  224. package/skills/kaizen-ui-html-css/references/components/Meter.md +27 -0
  225. package/skills/kaizen-ui-html-css/references/components/Modal.md +60 -0
  226. package/skills/kaizen-ui-html-css/references/components/Notification.md +48 -0
  227. package/skills/kaizen-ui-html-css/references/components/NumberInput.md +15 -0
  228. package/skills/kaizen-ui-html-css/references/components/OtpInput.md +51 -0
  229. package/skills/kaizen-ui-html-css/references/components/PageHeader.md +61 -0
  230. package/skills/kaizen-ui-html-css/references/components/Pagination.md +63 -0
  231. package/skills/kaizen-ui-html-css/references/components/Panel.md +133 -0
  232. package/skills/kaizen-ui-html-css/references/components/Popover.md +31 -0
  233. package/skills/kaizen-ui-html-css/references/components/ProgressBar.md +187 -0
  234. package/skills/kaizen-ui-html-css/references/components/RadioGroup.md +32 -0
  235. package/skills/kaizen-ui-html-css/references/components/RangeSlider.md +62 -0
  236. package/skills/kaizen-ui-html-css/references/components/Rating.md +69 -0
  237. package/skills/kaizen-ui-html-css/references/components/ReactionGroup.md +30 -0
  238. package/skills/kaizen-ui-html-css/references/components/Resizable.md +31 -0
  239. package/skills/kaizen-ui-html-css/references/components/SegmentedControl.md +36 -0
  240. package/skills/kaizen-ui-html-css/references/components/SegmentedMeter.md +200 -0
  241. package/skills/kaizen-ui-html-css/references/components/Select.md +39 -0
  242. package/skills/kaizen-ui-html-css/references/components/Severity.md +25 -0
  243. package/skills/kaizen-ui-html-css/references/components/SidePanel.md +42 -0
  244. package/skills/kaizen-ui-html-css/references/components/Skeleton.md +24 -0
  245. package/skills/kaizen-ui-html-css/references/components/Slider.md +32 -0
  246. package/skills/kaizen-ui-html-css/references/components/Spinner.md +63 -0
  247. package/skills/kaizen-ui-html-css/references/components/Stack.md +17 -0
  248. package/skills/kaizen-ui-html-css/references/components/StatusIndicator.md +30 -0
  249. package/skills/kaizen-ui-html-css/references/components/StatusMessage.md +78 -0
  250. package/skills/kaizen-ui-html-css/references/components/Stepper.md +57 -0
  251. package/skills/kaizen-ui-html-css/references/components/Switch.md +96 -0
  252. package/skills/kaizen-ui-html-css/references/components/Table.md +566 -0
  253. package/skills/kaizen-ui-html-css/references/components/Tabs.md +67 -0
  254. package/skills/kaizen-ui-html-css/references/components/Tag.md +194 -0
  255. package/skills/kaizen-ui-html-css/references/components/TagGroup.md +32 -0
  256. package/skills/kaizen-ui-html-css/references/components/TerminalLine.md +69 -0
  257. package/skills/kaizen-ui-html-css/references/components/Text.md +27 -0
  258. package/skills/kaizen-ui-html-css/references/components/TextArea.md +28 -0
  259. package/skills/kaizen-ui-html-css/references/components/TextContent.md +61 -0
  260. package/skills/kaizen-ui-html-css/references/components/TextInput.md +29 -0
  261. package/skills/kaizen-ui-html-css/references/components/TimeInput.md +17 -0
  262. package/skills/kaizen-ui-html-css/references/components/Toast.md +41 -0
  263. package/skills/kaizen-ui-html-css/references/components/Toaster.md +19 -0
  264. package/skills/kaizen-ui-html-css/references/components/ToggleButton.md +47 -0
  265. package/skills/kaizen-ui-html-css/references/components/ToggleButtonGroup.md +29 -0
  266. package/skills/kaizen-ui-html-css/references/components/Tooltip.md +45 -0
  267. package/skills/kaizen-ui-html-css/references/components/TreeNav.md +58 -0
  268. package/skills/kaizen-ui-html-css/references/components/Upload.md +90 -0
  269. package/skills/kaizen-ui-html-css/references/components/VerticalNav.md +65 -0
  270. package/skills/kaizen-ui-html-css/references/design-tokens/CHART_DATA_COLORS.md +56 -0
  271. package/skills/kaizen-ui-html-css/references/design-tokens/COLORS.md +148 -0
  272. package/skills/kaizen-ui-html-css/references/design-tokens/COLOR_PRIMITIVES.md +31 -0
  273. package/skills/kaizen-ui-html-css/references/design-tokens/EFFECTS_AND_LAYOUT.md +50 -0
  274. package/skills/kaizen-ui-html-css/references/design-tokens/SPACING_SCALE.md +36 -0
  275. package/skills/kaizen-ui-html-css/references/design-tokens/TYPOGRAPHY.md +44 -0
  276. package/skills/kaizen-ui-html-css/references/guides/CONFIGURATION.md +42 -0
  277. package/skills/kaizen-ui-html-css/references/guides/HTML_STRUCTURE.md +134 -0
  278. package/skills/kaizen-ui-html-css/references/patterns/activity-feed.md +132 -0
  279. package/skills/kaizen-ui-html-css/references/patterns/confirmations.md +133 -0
  280. package/skills/kaizen-ui-html-css/references/patterns/data-display.md +127 -0
  281. package/skills/kaizen-ui-html-css/references/patterns/data-visualization.md +73 -0
  282. package/skills/kaizen-ui-html-css/references/patterns/element-visibility.md +83 -0
  283. package/skills/kaizen-ui-html-css/references/patterns/empty-states.md +116 -0
  284. package/skills/kaizen-ui-html-css/references/patterns/entity-cards.md +172 -0
  285. package/skills/kaizen-ui-html-css/references/patterns/error-states.md +163 -0
  286. package/skills/kaizen-ui-html-css/references/patterns/feedback.md +77 -0
  287. package/skills/kaizen-ui-html-css/references/patterns/filters.md +167 -0
  288. package/skills/kaizen-ui-html-css/references/patterns/forms.md +215 -0
  289. package/skills/kaizen-ui-html-css/references/patterns/key-value-display.md +195 -0
  290. package/skills/kaizen-ui-html-css/references/patterns/loading.md +104 -0
  291. package/skills/kaizen-ui-html-css/references/patterns/navigation.md +154 -0
  292. package/skills/kaizen-ui-html-css/references/patterns/ranked-lists.md +60 -0
  293. package/skills/kaizen-ui-html-css/references/patterns/search.md +46 -0
  294. package/skills/kaizen-ui-html-css/references/patterns/settings.md +106 -0
  295. package/skills/kaizen-ui-html-css/references/patterns/stat-blocks.md +71 -0
  296. package/skills/kaizen-ui-html-css/references/templates/browse-page.md +92 -0
  297. package/skills/kaizen-ui-html-css/references/templates/dashboard.md +356 -0
  298. package/skills/kaizen-ui-html-css/references/templates/detail-page.md +424 -0
  299. package/skills/kaizen-ui-html-css/references/templates/detail-placement.md +68 -0
  300. package/skills/kaizen-ui-html-css/references/templates/error-page.md +82 -0
  301. package/skills/kaizen-ui-html-css/references/templates/form-page.md +256 -0
  302. package/skills/kaizen-ui-html-css/references/templates/layout-principles.md +152 -0
  303. package/skills/kaizen-ui-html-css/references/templates/list-view.md +229 -0
  304. package/skills/kaizen-ui-html-css/references/templates/page-modification.md +33 -0
  305. package/skills/kaizen-ui-html-css/references/templates/page-shell.md +225 -0
  306. package/skills/kaizen-ui-html-css/references/templates/workspace-page.md +427 -0
@@ -0,0 +1,167 @@
1
+ # Filters & Sort
2
+
3
+ Filters narrow a dataset to the user's relevant subset; sort orders what remains. This file covers when filters are warranted, their anatomy, placement variants, and how applied state, URL persistence, and sort compose with the result set.
4
+
5
+ ## When to use
6
+
7
+ Use filters when results require narrowing by attribute before users can find what they want — datasets too large to scan, multiple dimensions users care about, or shareable filtered views that benefit from URL state.
8
+
9
+ Don't use when:
10
+
11
+ - Results fit on one screen and users typically want all of them
12
+ - Only one attribute matters — use search instead
13
+ - The dataset is small enough that scanning beats filtering
14
+
15
+ ---
16
+
17
+ ## Anatomy
18
+
19
+ A filter surface is composed of required parts plus optional parts included when applicable. Variation comes from [placement](#variants), not from which parts are present.
20
+
21
+ ### Required
22
+
23
+ | Part | Purpose |
24
+ | --- | --- |
25
+ | **Filter controls** | One control per filter dimension. Control type depends on the dimension's shape — see [Filter control types](#filter-control-types). |
26
+ | **Result count** | Live count reflecting the filtered dataset (e.g., "Displaying 1,147 results", "200 Users"). Always visible. |
27
+ | **Applied-filter chips** | Tags/chips showing currently active filters, rendered below or adjacent to the controls whenever 1+ filter is active. Each chip shows the filter **category and value** (or **category and count** if multi-select) and includes a **close/remove** affordance to deselect that filter. |
28
+ | **Clear-all action** | Surface inline above the result set whenever 2+ filters are active. Do not bury inside a menu. |
29
+
30
+ ### Optional
31
+
32
+ | Part | Include when |
33
+ | --- | --- |
34
+ | **Sort control** | Content has at least one parameter it can be meaningfully ordered by (date, name, popularity, relevance, size). See [Modifiers → Sort](#sort). |
35
+ | **Typeahead within a filter** | A filter category contains more than 7 options — lets users find a value without scrolling through a long list. |
36
+
37
+ ### Filter control types
38
+
39
+ For each filter dimension, pick the control that matches the dimension's shape. **Pick one control type per dimension** — never mix (e.g., some chips and some checkboxes for the same set).
40
+
41
+ | Control | Use when |
42
+ | --- | --- |
43
+ | **[Checkbox](../components/Checkbox.md)** | Multi-select within a single category |
44
+ | **[Radio](../components/RadioGroup.md)** | Single-select within a category AND layout is **vertical sidebar** (options stacked and fully visible) |
45
+ | **[Select / Dropdown](../components/Select.md)** | Single-select within a category when layout is **horizontal**, or when vertical space needs to be conserved |
46
+ | **[Tag / Chip](../components/Tag.md)** | Surfacing a category + selected value/count ("Type: Model", "Type: 2 selected"), or rendering applied filters with remove affordances |
47
+ | **[Slider](../components/Slider.md)** | Filter value falls within a fixed numeric range (price, date range, learning rate, batch size) |
48
+ | **[Toggle / Switch](../components/Switch.md)** | On/off states ("Download Available: on/off", "API Endpoint: on/off") |
49
+ | **[Combobox](../components/Combobox.md)** | A filter category has more than 7 options |
50
+
51
+ **Anti-pattern:** Mixing control types within a single filter dimension (some chips, some checkboxes). Inconsistent affordance suggests filters behave differently when they don't.
52
+
53
+ ---
54
+
55
+ ## Variants
56
+
57
+ Placement variants. Choose by filter count, content type, and user intent.
58
+
59
+ | Variant | Use when |
60
+ | --- | --- |
61
+ | **Facet Panel** | More than 7 filterable dimensions, AND results are cards / browsable collections, AND filters affect the whole page globally, AND user intent is exploration / discovery |
62
+ | **Horizontal bar** | 7 or fewer dimensions, OR results are tables / specific item lists, OR user intent is targeted search |
63
+ | **Inline / component-level** | Page contains multiple independent data views (e.g., a dashboard with charts, tables, and graphs over different data sources) AND each view has its own data structure AND a single global filter set cannot logically apply |
64
+
65
+ **Default:** When in doubt, default to **horizontal bar**. This aligns with the predominant pattern across NVIDIA enterprise products and is the safest choice for consistency.
66
+
67
+ Keep active filters visible in both variants — applied-filter tags and Clear filters belong above the result set, not hidden in the control that opened them.
68
+
69
+ ### Facet Panel
70
+
71
+ Facet Panels are more scalable — they support nested values inside expandable sections by being built on `Accordion`. They keep all filter options visible and scannable, supporting progressive disclosure through expand/collapse. These should be rendered alongside the primary content as a sidebar, and on mobile collapse into a drawer with a prominent filter trigger.
72
+
73
+ The mobile filter trigger should look like a `Filter by` rail with an inline reset action.
74
+
75
+ Layout:
76
+
77
+ - Page shell uses the 80rem (1280px) browse-page maximum.
78
+ - Filter categories are accordion sections with stacked controls.
79
+ - Results column starts with title/count plus Sort aligned right.
80
+
81
+ > **KUI convention note:** The threshold of 7 is a KUI convention from a typical 80rem (1280px) page shell and 176px controls; the real constraint is available horizontal space, so adjust if labels or controls are unusually narrow or wide.
82
+
83
+ ### Horizontal bar
84
+
85
+ Horizontal bars preserve content width and keep the user's attention focused on results. They are the default for most NVIDIA enterprise product interfaces. They work well on mobile but may lack context on available options until opened.
86
+
87
+ See [Composition rules → Horizontal bar layout contract](#horizontal-bar-layout-contract) for the responsive layout requirements.
88
+
89
+ Layout:
90
+
91
+ - Page shell remains at the 80rem (1280px) browse-page maximum.
92
+ - Use a row of up to three `Select` controls for common dimensions.
93
+ - Render applied-filter `Tag`s with close affordances below/near the controls as soon as filters are active.
94
+ - Show `Clear filters` inline beside applied tags.
95
+
96
+ **Anti-pattern:** Inline filter bar with 8+ controls — items wrap or push past the viewport and row breaks become visual noise. Switch to vertical sidebar at 8+ filter dimensions.
97
+
98
+ ### Inline / component-level
99
+
100
+ Inline filters are contextualized to the specific component they control. Use only when the page has multiple independent data views whose data structures differ enough that no global filter set applies.
101
+
102
+ ---
103
+
104
+ ## Composition rules
105
+
106
+ Apply to all variants.
107
+
108
+ ### Apply real-time by default
109
+
110
+ Apply filters immediately as the user selects them; results update in real time. Use an explicit **Apply Filters** button only when:
111
+
112
+ - The dataset is large enough that each filter change triggers a costly server call, OR
113
+ - Applying filters in real time would cause noticeable performance degradation (perceptible delay greater than ~300ms per filter change)
114
+
115
+ When using explicit apply, also include a **Reset** / **Clear Filters** action.
116
+
117
+ **Anti-pattern:** Apply button on simple toggles or single-select dropdowns — forces the user to commit a click that adds no value and slows iteration. Reserve Apply patterns for queries too expensive to re-run on every change.
118
+
119
+ ### Reflect filter state in the URL
120
+
121
+ Filter state must be reflected in URL params so users can share a filtered view and don't lose state on refresh.
122
+
123
+ ### Synchronize filter chrome with input state
124
+
125
+ Active-filter labels and counts (e.g., "Active filters: 3") must always match the actual input state.
126
+
127
+ ### Empty / error states
128
+
129
+ When filters or search return zero results, apply the rules in [`empty-states.md`](./empty-states.md).
130
+
131
+ ### Coexisting with search
132
+
133
+ When a search input sits alongside filters, treat them as independent controls over the same result set. See [`search.md`](./search.md) for search-specific anatomy and variants.
134
+
135
+ - Both the active query and active filters stay visible; **result count reflects the combined effect** of search + filters.
136
+ - Clearing search does **not** clear filters, and clearing filters does **not** clear the search.
137
+ - Place search in the same control group as the primary filters, **search first**, then filter controls. In the Figma list-view frame: search, followed by three `Select` controls. See [`../templates/list-view.md`](../templates/list-view.md) → Toolbar.
138
+
139
+ ### Horizontal bar layout contract
140
+
141
+ See [`../templates/list-view.md`](../templates/list-view.md) → Toolbar section for structure.
142
+
143
+ ### Keep filters discoverable
144
+
145
+ Show filters by default; hide behind a toggle only when they genuinely don't fit.
146
+
147
+ ---
148
+
149
+ ## Modifiers
150
+
151
+ ### Sort
152
+
153
+ Sort is a separable affordance from filters. Include it when the content set has at least one parameter it can be meaningfully ordered by (date, name, popularity, relevance, size).
154
+
155
+ **Placement:** Sort appears as a separate control from filters — typically a dropdown aligned to the right side of the filter bar or results header. **It should not be mixed into the filter controls.**
156
+
157
+ #### Sort defaults
158
+
159
+ | Content shape | Default sort |
160
+ | --- | --- |
161
+ | Time-based (activity logs, recent items, changelogs) | **Newest first** |
162
+ | Search-result based (search query active) | **Relevance** |
163
+ | Browsable catalog, no search query active | **Most popular** / **Recommended** if popularity/recommendation data exists; otherwise **Alphabetical (A–Z)** |
164
+
165
+ #### Sort options
166
+
167
+ Offer sort options that map to real content attributes (Newest/Oldest, A–Z/Z–A, Most Popular, Size/Count, etc.). Two rules: offer **Relevance only when a search query is active**, and never offer a sort with no meaningful data behind it.
@@ -0,0 +1,215 @@
1
+ # Forms
2
+
3
+ The anatomy and composition rules for input surfaces that capture user data and submit it to the system. Covers container selection, field anatomy, validation, sizing, and trigger behavior.
4
+
5
+ **Contents:** [When to use](#when-to-use) · [Anatomy](#anatomy) · [Variants](#variants) · [Composition rules](#composition-rules) · [Modifiers](#modifiers) · [Example application](#example-application)
6
+
7
+ ## When to use
8
+
9
+ Use a form when capturing structured user input that gets submitted to the system — creating records, editing entities, configuring settings, generating tokens.
10
+
11
+ ## Anatomy
12
+
13
+ Forms are composed of required parts plus optional parts included when applicable. Wrap each field — input, label, helper text, info, and validation message — in [`FormField`](../components/FormField.md). This file covers form-level composition; `FormField.md` covers per-field mechanics.
14
+
15
+
16
+
17
+
18
+ Use one `<form>` per submission boundary. Keep each label, control, description, constraint, name, and value on the native elements as documented in [HTML_STRUCTURE.md](../guides/HTML_STRUCTURE.md).
19
+
20
+
21
+
22
+ ### Required parts
23
+
24
+ | Part | Purpose |
25
+ | --- | --- |
26
+ | **Field input** | The control that captures the value (TextInput, Select, Checkbox, etc.), wrapped in `FormField` with its label. See [Field input types](#field-input-types) below. |
27
+ | **Primary action button** | Submits the form. Label describes the specific action (e.g., "Generate Personal Key"), not generic "Submit". |
28
+ | **Cancel / dismiss action** | Always paired with the primary action — close button, Cancel button, or back navigation depending on container. |
29
+
30
+ ### Optional parts
31
+
32
+ Include when applicable. For per-field help, info, and validation slots, see [`FormField`](../components/FormField.md).
33
+
34
+ | Part | Include when |
35
+ | --- | --- |
36
+ | **Error summary** | Form has 7+ fields and submission fails — gives a global view of all errors |
37
+ | **Section headings** | Form uses [grouped sections](#sectioning-grouped-fields-on-one-page) |
38
+ | **Step indicator** | Form is a [multi-step / wizard](#single-step-vs-multi-step-wizard) |
39
+
40
+ ### Field input types
41
+
42
+ Most input choices follow from the value's shape: short text, long text, date, and binary values map to the corresponding KUI or native controls. The non-obvious calls:
43
+
44
+ - **Select vs. RadioGroup** — Select for one choice from 4+ options; RadioGroup for 4 or fewer where seeing all options at once aids the decision.
45
+ - **Duration → predefined Select, not a date picker** — when the value is a duration with a fixed option set (e.g. "1 / 3 / 6 / 12 months").
46
+ - **[Slider](../components/Slider.md)** — only when the user benefits from seeing their position in a fixed range; always pair it with a numeric input so exact values can be typed.
47
+
48
+ ---
49
+
50
+ ## Variants
51
+
52
+ ### By container
53
+
54
+ Determine where the form lives — modal, panel, or dedicated page.
55
+
56
+ | Container | Fields | Choose when |
57
+ | --- | --- | --- |
58
+ | **Modal (quick action)** | < 7 | ALL true: no conditional fields, no page content to reference, action is reversible, fire-and-forget (user won't revisit submitted values) |
59
+ | **Modal (high-stakes)** | 0–3 | ALL true: action is irreversible or high-consequence; user must pause and acknowledge before proceeding |
60
+ | **Panel (side panel)** | Any | ANY true: user references page content while filling, split input/output UI, editing an item in a visible collection |
61
+ | **Dedicated page** | 7+ | ANY true: complex logic (conditional fields, multi-step config), multiple logical sections, task warrants full attention |
62
+
63
+ #### When containers overlap
64
+
65
+ - **< 7 fields but user needs page context** → Panel, not modal. Context visibility overrides field count.
66
+ - **< 7 fields but user will revisit submitted values** → Dedicated page or panel. Modals are fire-and-forget — if the user needs to return to review or edit, the form needs a persistent surface.
67
+ - **7+ fields but irreversible action** → Dedicated page with a confirmation modal at submit. The page handles complexity; the modal handles the high-stakes acknowledgment.
68
+ - **High-stakes but needs page context** → Panel with a confirmation step, not a modal. The panel preserves context; add an inline confirmation or a final modal before the destructive action.
69
+
70
+ ### Single-step vs. multi-step (wizard)
71
+
72
+ Most forms are single-step — all fields are presented at once within the chosen container (optionally grouped via [sectioning](#sectioning-grouped-fields-on-one-page)).
73
+
74
+ Use a **multi-step / wizard flow** when:
75
+
76
+ - The process is complex and long enough that a single page would overwhelm the user
77
+ - Later inputs depend on earlier inputs (conditional logic between steps)
78
+ - Each step requires explanation or context to complete correctly
79
+ - The form primarily serves newer or infrequent users who benefit from guided progression
80
+
81
+ Wizards add a step indicator to the [Optional parts](#optional-parts) and split the field set across sequential screens, each with its own primary action ("Next") and the final step carrying the true submit.
82
+
83
+ ---
84
+
85
+ ## Composition rules
86
+
87
+ Apply to all variants.
88
+
89
+ ### Field ordering
90
+
91
+ Order fields using this priority hierarchy. Evaluate top-down — higher-priority rules override lower ones.
92
+
93
+ | Priority | Type | Definition | Test |
94
+ | --- | --- | --- | --- |
95
+ | **1** | **Identity fields** | Value becomes the label or name used to reference this object after creation (seen in lists, tables, navigation) | "Will this field's value be used to identify or reference this object later?" If yes → identity |
96
+ | **2** | **Framing fields** | Value exists for human comprehension and does not affect system behavior — captures intent, purpose, or description, not configuration | "Does this field change how the system processes or executes the task?" If no, and it exists so humans understand the purpose → framing |
97
+ | **3** | **Configuration fields** | Value directly determines how the system processes or executes the task — changing the value changes the outcome | "Does changing this field's value change what the system does?" If yes → configuration |
98
+
99
+ #### Within each priority tier — cognitive complexity gradient
100
+
101
+ Sort fields within each tier from lowest to highest cognitive effort:
102
+
103
+ 1. Fields requiring **free recall** (e.g., typing a name from memory)
104
+ 2. Fields requiring **selection from a small set of options** (e.g., dropdown with a few clear choices)
105
+ 3. Fields requiring **domain-specific knowledge** to understand and complete (e.g., selecting training parameters, configuring resource allocations)
106
+
107
+ #### Override — dependencies
108
+
109
+ If a field's value determines whether another field appears, changes, or is constrained, that field must be placed before the fields it affects, regardless of its position in the cognitive complexity gradient.
110
+
111
+ ### Trigger behavior
112
+
113
+ The control that opens the form — usually a button on a page, in a header, or per-row in a table.
114
+
115
+ - **Placement** — primary page action (fewer than 5 competing actions nearby) → standard button; repeated per row → minimal treatment (icon button or text link).
116
+ - **Label** — describe the action **and** the object ("Create Deployment", not "Create" or "New").
117
+
118
+ - **Keep the label even when icon-only is tempting** if the page is dense (icon-only triggers get lost) or the trigger is encountered infrequently (monthly or less — users need the text reminder).
119
+
120
+ ### Validation
121
+
122
+ > Per-field mechanics (on-blur validation, cross-field-on-submit, focus management) are owned by [`FormField`](../components/FormField.md); message voice and severity by [`error-states.md`](./error-states.md). This section covers only the form-wide layer.
123
+
124
+ The form-level addition is the error summary as a safety net: on submit with errors, show a banner listing all errors at the top of the form **only for forms with 7+ fields**. For shorter forms, skip the summary and move focus to the first invalid field.
125
+
126
+ ### Button placement and actions
127
+
128
+ Primary action sits at the bottom, right-aligned or full-width by container (label covered in [Required parts](#required-parts)). For long dedicated-page forms, fix it to the bottom of the viewport so it stays reachable. Always pair it with a cancel / dismiss action:
129
+
130
+ | Container | Cancel / dismiss treatment |
131
+ | --- | --- |
132
+ | Modal | Cancel button to the left of the primary action |
133
+ | Panel | Close button in the panel header |
134
+ | Dedicated page | Cancel button or back navigation |
135
+
136
+ For destructive submits, use `Button`'s danger variant and require confirmation — see [`confirmations.md`](./confirmations.md).
137
+
138
+ ### Read-only fields
139
+
140
+ For when to use read-only vs. disabled vs. hidden, see [`element-visibility.md`](./element-visibility.md).
141
+
142
+ Form-specific:
143
+
144
+
145
+
146
+
147
+
148
+
149
+ - Set the native `readonly` attribute on the input rather than `disabled` — it stays selectable and keeps the field in the tab order while signaling it can't be edited.
150
+ - A read-only range input (`readonly` plus `tabindex="-1"` on `<input type="range">`) is the exception: CSS keyed off `[readonly]` hides its thumb, and `tabindex="-1"` takes it out of the tab order, while its value stays visible and is still submitted. HTML does not treat `readonly` as applicable to `type="range"`, so the input can still be given focus directly (its label, a click, script) and still answers the keyboard; blocking that requires a scripted enhancement.
151
+
152
+
153
+
154
+ - For read-only key-value pairs in detail-style sections, see [`key-value-display.md`](./key-value-display.md).
155
+
156
+ ---
157
+
158
+ ## Modifiers
159
+
160
+ ### Sectioning (grouped fields on one page)
161
+
162
+ Within a single-step form, group fields into collapsible/expandable sections with clear headings when:
163
+
164
+ - The form is long but fields can be logically grouped to support scanning and reduce cognitive load (e.g., contact info, shipping, payment)
165
+ - The user benefits from seeing the entire form to review or jump between areas
166
+ - The field order is flexible rather than strictly sequential
167
+ - Power users need to repeatedly fill out this form quickly (e.g., creating tickets, submitting reports)
168
+
169
+ Each section should contain related fields that serve a common purpose. Skip sectioning when the form has 7 or fewer fields, all fields relate to a single logical purpose, and no meaningful grouping exists — keep it flat.
170
+
171
+ ### Input width as affordance
172
+
173
+ Input width communicates the expected length and format of a value before the user types anything. A narrow input signals a short value (zip code, port number); a wide input signals a longer one (full name, URL, description). When width mismatches expectation, users second-guess whether they're entering the right thing.
174
+
175
+ #### Width tiers
176
+
177
+ Use consistent width tiers across a form rather than arbitrary pixel values. The tiers below are relative to the form's content column — not the viewport.
178
+
179
+ | Tier | Width | Use for |
180
+ | --- | --- | --- |
181
+ | **Extra-small** | 80px | Zip codes, country codes, port numbers, short numeric IDs |
182
+ | **Small** | 160px | Phone numbers, dates, currency amounts, short codes |
183
+ | **Medium** | 320px | Names, email addresses, single-line labels, hostnames |
184
+ | **Large** | 384px | URLs, file paths, longer single-line values |
185
+ | **Full** | 100% | Descriptions, notes, queries, any multi-line content (TextArea) |
186
+
187
+ #### Width rules
188
+
189
+ | Rule | Rationale |
190
+ | --- | --- |
191
+ | Width should approximate the longest expected value, not the longest possible value | A full-width input for a 5-digit zip code provides no useful signal. Size for the common case. |
192
+ | Select and typeahead width should fit the longest option label without truncation | Truncated options force the user to open the control to read values. Test with real data, not placeholder text. |
193
+ | Within a form section, prefer consistent widths when fields share similar value lengths | Mismatched widths between similar fields create visual noise without information value. |
194
+ | Do not use width to create visual alignment patterns at the expense of affordance | A form where every field is the same width looks tidy but loses the affordance signal. Affordance accuracy outweighs visual symmetry. |
195
+
196
+ #### Interaction with form layout
197
+
198
+ In multi-column form layouts, the column width constrains the input width. When a column is narrower than the ideal tier, the input fills the column width — the column itself becomes the affordance. In single-column layouts, the width tiers above apply directly.
199
+
200
+ ---
201
+
202
+ ## Example application
203
+
204
+ **Input:** "I need a form for generating an API key in NGC. Fields are key name, expiration, and services included. The user has a list of existing keys visible on the page but doesn't need to reference them while creating a new one."
205
+
206
+ **Resolved spec:**
207
+
208
+ 1. Container → **Modal (quick action)** (3 fields, no dependencies, no need for page context, low-cost to redo)
209
+ 2. Flow → **Single-step**, flat (single logical purpose, no grouping)
210
+ 3. Field order (identity → configuration, then cognitive gradient) →
211
+ - Key Name — identity field (labels the key in lists)
212
+ - Expiration — configuration, low effort (predefined-duration Select)
213
+ - Services Included — configuration, higher effort (Select from services requiring domain knowledge)
214
+ 4. Trigger → "+ Generate Personal Key" button on the keys list page
215
+ 5. Widths → Key Name 320px (medium); Expiration 160px (small); Services Included 320px (fits longest service label)
@@ -0,0 +1,195 @@
1
+ # Key-Value Display
2
+
3
+ Labeled read-only value pairs
4
+
5
+ ## When to use
6
+
7
+ Use [KeyValueGroup](../components/KeyValueGroup.md) for labeled read-only values anywhere in the UI. For **editable** fields, use form fields. For tabular data with many rows, see [data-display](./data-display.md).
8
+
9
+ In a [SidePanel](../components/SidePanel.md) (the common detail-metadata surface), render `KeyValueGroup` directly in the panel body rather than nesting another container. See [detail-placement.md](../templates/detail-placement.md) for what metadata belongs in a panel vs. a full page.
10
+
11
+ ## Anatomy
12
+
13
+ `KeyValueGroup` renders a native description list (`<dl>`) where each item wraps a muted `<dt>` key and a primary `<dd>` value.
14
+
15
+ | Part | Typography | Color | Notes |
16
+ | --------- | ------------------ | ---------------- | ---------------------------- |
17
+ | **Key** | `label/regular/sm` | `text-secondary` | `<dt>`, short noun phrase |
18
+ | **Value** | `body/semibold/md` | `text-primary` | `<dd>`, text or rich element |
19
+
20
+ ---
21
+
22
+ ## Orientations
23
+
24
+ Two axes control layout:
25
+
26
+ - **Group `orientation`** (`"vertical"` default | `"horizontal"`): whether the pairs themselves stack in a list or sit side by side in a wrapping row.
27
+ - **Pair `pairOrientation`** (`"horizontal"` default | `"vertical"`): whether each key sits beside its value or stacks above it.
28
+
29
+ | Combination | Layout | Use when |
30
+ | --- | --- | --- |
31
+ | Vertical group + horizontal pairs (**default**) | Stacked rows; all keys share one aligned column (at least `100px` wide, up to `40%` of the group) | Default for detail panels, cards, and settings summaries with concise keys and values. |
32
+ | Vertical group + vertical pairs | Stacked rows; each key sits above its value (`4px` gap) | Narrow columns (such as a sidebar) or groups where values are long sentences/URLs. |
33
+ | Horizontal group + horizontal pairs | Wrapping inline row of `key value` pairs (`40px` between pairs, `8px` between key and value) | Compact summary strips above a table or in a card footer. |
34
+ | Horizontal group + vertical pairs | Wrapping row of stacked pairs (`16px` between pairs) | Metadata bars under a page header. |
35
+
36
+ One pair in an aligned list can opt out to vertical when a single field holds long-form prose such as a description or notes.
37
+
38
+ ---
39
+
40
+ ## Composition rules
41
+
42
+ ### Rich value types
43
+
44
+ The value is not always plain text. Match the value content to the data; do not wrap plain text in `Text` because `<dd>` already applies `body/semibold/md`:
45
+
46
+ | Value type | Render as | Notes |
47
+ | --- | --- | --- |
48
+ | **Plain scalar** (version, date, GPU type) | Plain text inside `<dd>` | Default. Render missing values as `—` with visually hidden `"Not provided"` text, never an empty `<dd>`. |
49
+ | **Status / state** (running, failed) | [`Badge`](../components/Badge.md) | Semantic color with text, never color alone. |
50
+ | **Owner / person** | [`Avatar`](../components/Avatar.md) marked `aria-hidden` + name text, both inside the value | The name carries the meaning, so the avatar is not announced. |
51
+ | **Leading icon** (timestamp, location) | Icon + text, both inside the value | Icons hide themselves from assistive technology; the text carries the meaning. |
52
+ | **Tags / categories** | Non-interactive [`Tag`](../components/Tag.md) | Use a neutral gray outline treatment, not Badge. Reserve Badge for status. |
53
+ | **Link / external resource** | [`Anchor`](../components/Anchor.md) | Keep at most one interactive control per value. |
54
+
55
+ A value should never become an editable form control — if it does, the surface is a form, not a key-value display.
56
+
57
+ ### Default stacked group (aligned key column)
58
+
59
+
60
+
61
+
62
+
63
+
64
+ ```html
65
+ <dl
66
+ class="nv-key-value-group-root nv-key-value-group-root--orientation-vertical"
67
+ data-orientation="vertical"
68
+ >
69
+ <div
70
+ class="nv-key-value-group-item nv-key-value-group-item--orientation-horizontal"
71
+ data-orientation="horizontal"
72
+ >
73
+ <dt class="nv-key-value-group-key">Owner</dt>
74
+ <dd class="nv-key-value-group-value">Jordan Lee</dd>
75
+ </div>
76
+ <div
77
+ class="nv-key-value-group-item nv-key-value-group-item--orientation-horizontal"
78
+ data-orientation="horizontal"
79
+ >
80
+ <dt class="nv-key-value-group-key">Region</dt>
81
+ <dd class="nv-key-value-group-value">us-west-2</dd>
82
+ </div>
83
+ </dl>
84
+ ```
85
+
86
+
87
+
88
+ ### Stacked pairs (label above value)
89
+
90
+
91
+
92
+
93
+
94
+
95
+ ```html
96
+ <dl
97
+ class="nv-key-value-group-root nv-key-value-group-root--orientation-vertical"
98
+ data-orientation="vertical"
99
+ >
100
+ <div
101
+ class="nv-key-value-group-item nv-key-value-group-item--orientation-vertical"
102
+ data-orientation="vertical"
103
+ >
104
+ <dt class="nv-key-value-group-key">Owner</dt>
105
+ <dd class="nv-key-value-group-value">Jordan Lee</dd>
106
+ </div>
107
+ <div
108
+ class="nv-key-value-group-item nv-key-value-group-item--orientation-vertical"
109
+ data-orientation="vertical"
110
+ >
111
+ <dt class="nv-key-value-group-key">Region</dt>
112
+ <dd class="nv-key-value-group-value">us-west-2</dd>
113
+ </div>
114
+ </dl>
115
+ ```
116
+
117
+
118
+
119
+ ---
120
+
121
+ ## Modifiers
122
+
123
+ ### Grouping within and between sections
124
+
125
+ Give each `<dl>` a visible section heading (`<h2>` / `<h3>`). A `<dl>` has no accessible name of its own, and screen readers expose `aria-label` on it inconsistently.
126
+
127
+ | Scope | Spacing |
128
+ | ---------------------- | ----------------------------------------- |
129
+ | Pairs within a section | Handled by `KeyValueGroup` (`16px` / `4`) |
130
+ | Between sections | Sectional spacing (`24px`) + a heading |
131
+
132
+
133
+
134
+
135
+
136
+
137
+ ```html
138
+ <section class="nv-flex nv-flex--direction-col nv-primitive--gap-4">
139
+ <h2 class="nv-text nv-text--title-sm">Workload</h2>
140
+ <dl
141
+ class="nv-key-value-group-root nv-key-value-group-root--orientation-vertical"
142
+ data-orientation="vertical"
143
+ >
144
+ <div
145
+ class="nv-key-value-group-item nv-key-value-group-item--orientation-horizontal"
146
+ data-orientation="horizontal"
147
+ >
148
+ <dt class="nv-key-value-group-key">Owner</dt>
149
+ <dd class="nv-key-value-group-value">Jordan Lee</dd>
150
+ </div>
151
+ <div
152
+ class="nv-key-value-group-item nv-key-value-group-item--orientation-horizontal"
153
+ data-orientation="horizontal"
154
+ >
155
+ <dt class="nv-key-value-group-key">Region</dt>
156
+ <dd class="nv-key-value-group-value">us-west-2</dd>
157
+ </div>
158
+ </dl>
159
+ </section>
160
+ ```
161
+
162
+
163
+
164
+ ### Horizontal row of pairs
165
+
166
+ For metadata bars under a page header or summary strips above a table, set `orientation="horizontal"` (and `pairOrientation="vertical"` when each label should stack above its value).
167
+
168
+
169
+
170
+
171
+
172
+
173
+ ```html
174
+ <dl
175
+ class="nv-key-value-group-root nv-key-value-group-root--orientation-horizontal"
176
+ data-orientation="horizontal"
177
+ >
178
+ <div
179
+ class="nv-key-value-group-item nv-key-value-group-item--orientation-vertical"
180
+ data-orientation="vertical"
181
+ >
182
+ <dt class="nv-key-value-group-key">Projects</dt>
183
+ <dd class="nv-key-value-group-value">8</dd>
184
+ </div>
185
+ <div
186
+ class="nv-key-value-group-item nv-key-value-group-item--orientation-vertical"
187
+ data-orientation="vertical"
188
+ >
189
+ <dt class="nv-key-value-group-key">Storage</dt>
190
+ <dd class="nv-key-value-group-value">640 GB</dd>
191
+ </div>
192
+ </dl>
193
+ ```
194
+
195
+