@nvidia/foundations-css 0.0.0-stage → 1.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (304) hide show
  1. package/CHANGELOG.md +11 -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 +16546 -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.css +1 -0
  69. package/dist/components/meter.css +1 -0
  70. package/dist/components/modal.css +1 -0
  71. package/dist/components/notification.css +1 -0
  72. package/dist/components/otp-input.css +1 -0
  73. package/dist/components/page-header.css +1 -0
  74. package/dist/components/pagination.css +1 -0
  75. package/dist/components/panel.css +1 -0
  76. package/dist/components/popover.css +1 -0
  77. package/dist/components/primitive.css +1 -0
  78. package/dist/components/progress-bar.css +1 -0
  79. package/dist/components/radio-group.css +1 -0
  80. package/dist/components/range-slider.css +1 -0
  81. package/dist/components/rating.css +1 -0
  82. package/dist/components/reaction-group.css +1 -0
  83. package/dist/components/resizable.css +1 -0
  84. package/dist/components/segmented-control.css +1 -0
  85. package/dist/components/segmented-meter.css +1 -0
  86. package/dist/components/select.css +1 -0
  87. package/dist/components/severity.css +1 -0
  88. package/dist/components/side-panel.css +1 -0
  89. package/dist/components/skeleton.css +1 -0
  90. package/dist/components/slider.css +1 -0
  91. package/dist/components/spinner.css +1 -0
  92. package/dist/components/status-indicator.css +1 -0
  93. package/dist/components/status-message.css +1 -0
  94. package/dist/components/stepper.css +1 -0
  95. package/dist/components/switch.css +1 -0
  96. package/dist/components/table.css +1 -0
  97. package/dist/components/tabs.css +1 -0
  98. package/dist/components/tag-group.css +1 -0
  99. package/dist/components/tag.css +1 -0
  100. package/dist/components/terminal-line.css +1 -0
  101. package/dist/components/text-area.css +1 -0
  102. package/dist/components/text-content.css +1 -0
  103. package/dist/components/text.css +1 -0
  104. package/dist/components/toast.css +1 -0
  105. package/dist/components/toaster.css +1 -0
  106. package/dist/components/toggle-button-group.css +1 -0
  107. package/dist/components/toggle-button.css +1 -0
  108. package/dist/components/tooltip.css +1 -0
  109. package/dist/components/tree-nav.css +1 -0
  110. package/dist/components/upload.css +1 -0
  111. package/dist/components/vertical-nav.css +1 -0
  112. package/dist/css-sizes.js +1279 -0
  113. package/dist/index.cjs +3041 -0
  114. package/dist/index.d.cts +27 -0
  115. package/dist/index.d.ts +27 -0
  116. package/dist/index.js +3014 -0
  117. package/dist/plugins/tailwind-theme.css +504 -0
  118. package/dist/plugins/tailwind3-theme.js +682 -0
  119. package/dist/plugins/variables-sass.sass +414 -0
  120. package/dist/themes/kui11/_theme-selectors.css +1 -0
  121. package/dist/themes/kui11/accordion.css +1 -0
  122. package/dist/themes/kui11/app-bar.css +1 -0
  123. package/dist/themes/kui11/avatar.css +1 -0
  124. package/dist/themes/kui11/badge.css +1 -0
  125. package/dist/themes/kui11/banner.css +1 -0
  126. package/dist/themes/kui11/base.css +1 -0
  127. package/dist/themes/kui11/breadcrumbs.css +1 -0
  128. package/dist/themes/kui11/button.css +1 -0
  129. package/dist/themes/kui11/card.css +1 -0
  130. package/dist/themes/kui11/checkbox.css +1 -0
  131. package/dist/themes/kui11/components.css +1 -0
  132. package/dist/themes/kui11/date-picker.css +1 -0
  133. package/dist/themes/kui11/form-field.css +1 -0
  134. package/dist/themes/kui11/hero.css +1 -0
  135. package/dist/themes/kui11/horizontal-nav.css +1 -0
  136. package/dist/themes/kui11/input-shell.css +1 -0
  137. package/dist/themes/kui11/label.css +1 -0
  138. package/dist/themes/kui11/menu.css +1 -0
  139. package/dist/themes/kui11/modal.css +1 -0
  140. package/dist/themes/kui11/notification.css +1 -0
  141. package/dist/themes/kui11/page-header.css +1 -0
  142. package/dist/themes/kui11/pagination.css +1 -0
  143. package/dist/themes/kui11/popover.css +1 -0
  144. package/dist/themes/kui11/progress-bar.css +1 -0
  145. package/dist/themes/kui11/radio-group.css +1 -0
  146. package/dist/themes/kui11/range-slider.css +1 -0
  147. package/dist/themes/kui11/side-panel.css +1 -0
  148. package/dist/themes/kui11/slider.css +1 -0
  149. package/dist/themes/kui11/spinner.css +1 -0
  150. package/dist/themes/kui11/status-message.css +1 -0
  151. package/dist/themes/kui11/switch.css +1 -0
  152. package/dist/themes/kui11/table.css +1 -0
  153. package/dist/themes/kui11/tabs.css +1 -0
  154. package/dist/themes/kui11/tag.css +1 -0
  155. package/dist/themes/kui11/text-area.css +1 -0
  156. package/dist/themes/kui11/text-input.css +1 -0
  157. package/dist/themes/kui11/text.css +1 -0
  158. package/dist/themes/kui11/toast.css +1 -0
  159. package/dist/themes/kui11/tooltip.css +1 -0
  160. package/dist/themes/kui11/vertical-nav.css +1 -0
  161. package/dist/themes/kui11.base.css +1 -0
  162. package/dist/themes/kui11.base.js +935 -0
  163. package/dist/themes/kui11.components.css +1 -0
  164. package/dist/themes/kui11.components.js +2564 -0
  165. package/dist/themes/kui11.css +1 -0
  166. package/dist/themes/theme-partials.js +456 -0
  167. package/dist/utilities/all.js +442 -0
  168. package/dist/utilities/typography-utils.css +1 -0
  169. package/package.json +106 -3
  170. package/scripts/sync-skills.mjs +237 -0
  171. package/skills/kaizen-ui-html-css/SKILL.md +293 -0
  172. package/skills/kaizen-ui-html-css/assets/color-primitives-hex.md +141 -0
  173. package/skills/kaizen-ui-html-css/references/blocks/chat-input.md +94 -0
  174. package/skills/kaizen-ui-html-css/references/blocks/notification-center.md +320 -0
  175. package/skills/kaizen-ui-html-css/references/blocks/timeline.md +579 -0
  176. package/skills/kaizen-ui-html-css/references/components/Accordion.md +88 -0
  177. package/skills/kaizen-ui-html-css/references/components/Anchor.md +29 -0
  178. package/skills/kaizen-ui-html-css/references/components/AnimatedChevron.md +31 -0
  179. package/skills/kaizen-ui-html-css/references/components/AppBar.md +129 -0
  180. package/skills/kaizen-ui-html-css/references/components/Attachment.md +306 -0
  181. package/skills/kaizen-ui-html-css/references/components/Audio.md +21 -0
  182. package/skills/kaizen-ui-html-css/references/components/Autocomplete.md +29 -0
  183. package/skills/kaizen-ui-html-css/references/components/Avatar.md +28 -0
  184. package/skills/kaizen-ui-html-css/references/components/AvatarGroup.md +38 -0
  185. package/skills/kaizen-ui-html-css/references/components/Badge.md +121 -0
  186. package/skills/kaizen-ui-html-css/references/components/Banner.md +49 -0
  187. package/skills/kaizen-ui-html-css/references/components/Block.md +26 -0
  188. package/skills/kaizen-ui-html-css/references/components/Breadcrumbs.md +42 -0
  189. package/skills/kaizen-ui-html-css/references/components/Button.md +43 -0
  190. package/skills/kaizen-ui-html-css/references/components/ButtonGroup.md +32 -0
  191. package/skills/kaizen-ui-html-css/references/components/Card.md +39 -0
  192. package/skills/kaizen-ui-html-css/references/components/Carousel.md +53 -0
  193. package/skills/kaizen-ui-html-css/references/components/ChatBubble.md +28 -0
  194. package/skills/kaizen-ui-html-css/references/components/Checkbox.md +32 -0
  195. package/skills/kaizen-ui-html-css/references/components/CodeSnippet.md +33 -0
  196. package/skills/kaizen-ui-html-css/references/components/Collapsible.md +56 -0
  197. package/skills/kaizen-ui-html-css/references/components/Combobox.md +66 -0
  198. package/skills/kaizen-ui-html-css/references/components/Command.md +100 -0
  199. package/skills/kaizen-ui-html-css/references/components/ContextMenu.md +61 -0
  200. package/skills/kaizen-ui-html-css/references/components/DatePicker.md +30 -0
  201. package/skills/kaizen-ui-html-css/references/components/Divider.md +28 -0
  202. package/skills/kaizen-ui-html-css/references/components/Dropdown.md +94 -0
  203. package/skills/kaizen-ui-html-css/references/components/Flex.md +33 -0
  204. package/skills/kaizen-ui-html-css/references/components/FormField.md +35 -0
  205. package/skills/kaizen-ui-html-css/references/components/Grid.md +27 -0
  206. package/skills/kaizen-ui-html-css/references/components/Group.md +92 -0
  207. package/skills/kaizen-ui-html-css/references/components/Halo.md +26 -0
  208. package/skills/kaizen-ui-html-css/references/components/Hero.md +29 -0
  209. package/skills/kaizen-ui-html-css/references/components/HorizontalNav.md +34 -0
  210. package/skills/kaizen-ui-html-css/references/components/HoverCard.md +23 -0
  211. package/skills/kaizen-ui-html-css/references/components/Inline.md +49 -0
  212. package/skills/kaizen-ui-html-css/references/components/InlineNotice.md +96 -0
  213. package/skills/kaizen-ui-html-css/references/components/InputShell.md +26 -0
  214. package/skills/kaizen-ui-html-css/references/components/JumpNav.md +36 -0
  215. package/skills/kaizen-ui-html-css/references/components/Kbd.md +32 -0
  216. package/skills/kaizen-ui-html-css/references/components/KeyValueEditor.md +275 -0
  217. package/skills/kaizen-ui-html-css/references/components/KeyValueGroup.md +35 -0
  218. package/skills/kaizen-ui-html-css/references/components/Label.md +86 -0
  219. package/skills/kaizen-ui-html-css/references/components/Legend.md +148 -0
  220. package/skills/kaizen-ui-html-css/references/components/List.md +143 -0
  221. package/skills/kaizen-ui-html-css/references/components/Menu.md +103 -0
  222. package/skills/kaizen-ui-html-css/references/components/Meter.md +27 -0
  223. package/skills/kaizen-ui-html-css/references/components/Modal.md +60 -0
  224. package/skills/kaizen-ui-html-css/references/components/Notification.md +48 -0
  225. package/skills/kaizen-ui-html-css/references/components/NumberInput.md +15 -0
  226. package/skills/kaizen-ui-html-css/references/components/OtpInput.md +51 -0
  227. package/skills/kaizen-ui-html-css/references/components/PageHeader.md +61 -0
  228. package/skills/kaizen-ui-html-css/references/components/Pagination.md +63 -0
  229. package/skills/kaizen-ui-html-css/references/components/Panel.md +133 -0
  230. package/skills/kaizen-ui-html-css/references/components/Popover.md +31 -0
  231. package/skills/kaizen-ui-html-css/references/components/ProgressBar.md +187 -0
  232. package/skills/kaizen-ui-html-css/references/components/RadioGroup.md +32 -0
  233. package/skills/kaizen-ui-html-css/references/components/RangeSlider.md +62 -0
  234. package/skills/kaizen-ui-html-css/references/components/Rating.md +69 -0
  235. package/skills/kaizen-ui-html-css/references/components/ReactionGroup.md +30 -0
  236. package/skills/kaizen-ui-html-css/references/components/Resizable.md +31 -0
  237. package/skills/kaizen-ui-html-css/references/components/SegmentedControl.md +36 -0
  238. package/skills/kaizen-ui-html-css/references/components/SegmentedMeter.md +200 -0
  239. package/skills/kaizen-ui-html-css/references/components/Select.md +39 -0
  240. package/skills/kaizen-ui-html-css/references/components/Severity.md +25 -0
  241. package/skills/kaizen-ui-html-css/references/components/SidePanel.md +42 -0
  242. package/skills/kaizen-ui-html-css/references/components/Skeleton.md +24 -0
  243. package/skills/kaizen-ui-html-css/references/components/Slider.md +32 -0
  244. package/skills/kaizen-ui-html-css/references/components/Spinner.md +63 -0
  245. package/skills/kaizen-ui-html-css/references/components/Stack.md +17 -0
  246. package/skills/kaizen-ui-html-css/references/components/StatusIndicator.md +30 -0
  247. package/skills/kaizen-ui-html-css/references/components/StatusMessage.md +78 -0
  248. package/skills/kaizen-ui-html-css/references/components/Stepper.md +57 -0
  249. package/skills/kaizen-ui-html-css/references/components/Switch.md +96 -0
  250. package/skills/kaizen-ui-html-css/references/components/Table.md +566 -0
  251. package/skills/kaizen-ui-html-css/references/components/Tabs.md +67 -0
  252. package/skills/kaizen-ui-html-css/references/components/Tag.md +194 -0
  253. package/skills/kaizen-ui-html-css/references/components/TagGroup.md +32 -0
  254. package/skills/kaizen-ui-html-css/references/components/TerminalLine.md +69 -0
  255. package/skills/kaizen-ui-html-css/references/components/Text.md +27 -0
  256. package/skills/kaizen-ui-html-css/references/components/TextArea.md +28 -0
  257. package/skills/kaizen-ui-html-css/references/components/TextContent.md +61 -0
  258. package/skills/kaizen-ui-html-css/references/components/TextInput.md +29 -0
  259. package/skills/kaizen-ui-html-css/references/components/TimeInput.md +17 -0
  260. package/skills/kaizen-ui-html-css/references/components/Toast.md +41 -0
  261. package/skills/kaizen-ui-html-css/references/components/Toaster.md +19 -0
  262. package/skills/kaizen-ui-html-css/references/components/ToggleButton.md +47 -0
  263. package/skills/kaizen-ui-html-css/references/components/ToggleButtonGroup.md +29 -0
  264. package/skills/kaizen-ui-html-css/references/components/Tooltip.md +45 -0
  265. package/skills/kaizen-ui-html-css/references/components/TreeNav.md +58 -0
  266. package/skills/kaizen-ui-html-css/references/components/Upload.md +90 -0
  267. package/skills/kaizen-ui-html-css/references/components/VerticalNav.md +65 -0
  268. package/skills/kaizen-ui-html-css/references/design-tokens/CHART_DATA_COLORS.md +56 -0
  269. package/skills/kaizen-ui-html-css/references/design-tokens/COLORS.md +148 -0
  270. package/skills/kaizen-ui-html-css/references/design-tokens/COLOR_PRIMITIVES.md +31 -0
  271. package/skills/kaizen-ui-html-css/references/design-tokens/EFFECTS_AND_LAYOUT.md +50 -0
  272. package/skills/kaizen-ui-html-css/references/design-tokens/SPACING_SCALE.md +36 -0
  273. package/skills/kaizen-ui-html-css/references/design-tokens/TYPOGRAPHY.md +44 -0
  274. package/skills/kaizen-ui-html-css/references/guides/CONFIGURATION.md +51 -0
  275. package/skills/kaizen-ui-html-css/references/guides/HTML_STRUCTURE.md +134 -0
  276. package/skills/kaizen-ui-html-css/references/patterns/activity-feed.md +132 -0
  277. package/skills/kaizen-ui-html-css/references/patterns/confirmations.md +133 -0
  278. package/skills/kaizen-ui-html-css/references/patterns/data-display.md +127 -0
  279. package/skills/kaizen-ui-html-css/references/patterns/data-visualization.md +73 -0
  280. package/skills/kaizen-ui-html-css/references/patterns/element-visibility.md +83 -0
  281. package/skills/kaizen-ui-html-css/references/patterns/empty-states.md +116 -0
  282. package/skills/kaizen-ui-html-css/references/patterns/entity-cards.md +172 -0
  283. package/skills/kaizen-ui-html-css/references/patterns/error-states.md +163 -0
  284. package/skills/kaizen-ui-html-css/references/patterns/feedback.md +77 -0
  285. package/skills/kaizen-ui-html-css/references/patterns/filters.md +167 -0
  286. package/skills/kaizen-ui-html-css/references/patterns/forms.md +215 -0
  287. package/skills/kaizen-ui-html-css/references/patterns/key-value-display.md +195 -0
  288. package/skills/kaizen-ui-html-css/references/patterns/loading.md +104 -0
  289. package/skills/kaizen-ui-html-css/references/patterns/navigation.md +154 -0
  290. package/skills/kaizen-ui-html-css/references/patterns/ranked-lists.md +60 -0
  291. package/skills/kaizen-ui-html-css/references/patterns/search.md +46 -0
  292. package/skills/kaizen-ui-html-css/references/patterns/settings.md +106 -0
  293. package/skills/kaizen-ui-html-css/references/patterns/stat-blocks.md +71 -0
  294. package/skills/kaizen-ui-html-css/references/templates/browse-page.md +92 -0
  295. package/skills/kaizen-ui-html-css/references/templates/dashboard.md +356 -0
  296. package/skills/kaizen-ui-html-css/references/templates/detail-page.md +424 -0
  297. package/skills/kaizen-ui-html-css/references/templates/detail-placement.md +68 -0
  298. package/skills/kaizen-ui-html-css/references/templates/error-page.md +82 -0
  299. package/skills/kaizen-ui-html-css/references/templates/form-page.md +256 -0
  300. package/skills/kaizen-ui-html-css/references/templates/layout-principles.md +152 -0
  301. package/skills/kaizen-ui-html-css/references/templates/list-view.md +229 -0
  302. package/skills/kaizen-ui-html-css/references/templates/page-modification.md +33 -0
  303. package/skills/kaizen-ui-html-css/references/templates/page-shell.md +225 -0
  304. package/skills/kaizen-ui-html-css/references/templates/workspace-page.md +427 -0
@@ -0,0 +1,96 @@
1
+ # Switch
2
+
3
+ Also known as: Toggle, ToggleSwitch
4
+
5
+ A two-state toggle for a binary setting whose change takes effect immediately.
6
+
7
+ ## When to use
8
+
9
+ Use Switch for an on/off setting that applies as soon as it is toggled, such as a preference or feature toggle. Use [Checkbox](./Checkbox.md) when the value is only applied on save or submit, and for consent such as "I agree to the terms". Use [Toggle Button](./ToggleButton.md) to turn an option on or off from a toolbar, and [Radio Group](./RadioGroup.md) or [Segmented Control](./SegmentedControl.md) to pick one of several options.
10
+
11
+ ## Usage guidelines
12
+
13
+ - Name every switch. Give it a visible label, or an `aria-label` that names the setting and its item when the surrounding layout already shows the name, such as a switch in a table row.
14
+ - Keep the size and label side the same across a group of switches so the controls line up.
15
+ - When a switch is disabled, show the reason as visible text next to it and point the input's `aria-describedby` at that text. A tooltip on a disabled switch is unreachable by keyboard because a disabled input cannot take focus.
16
+ - The control is a native `<input type="checkbox">`, so `name` and `value` submit with a form like a checkbox: `value` defaults to `"on"` and an unchecked switch submits nothing.
17
+ - Wrap an `input.nv-switch-input` with `role="switch"` and a `label.nv-label` linked by `for` in `div.nv-switch-root`. Set size with `nv-switch-root--size-small` or `nv-switch-root--size-large`, and put the label first with `nv-switch-root--side-start`.
18
+ - No script runs. Match the label's size class to the switch, add `nv-label--disabled` to the label of a disabled input, and listen for the input's `change` event to apply the setting.
19
+
20
+ ## Examples
21
+
22
+ ```html
23
+ <div class="nv-switch-root">
24
+ <input type="checkbox" role="switch" class="nv-switch-input" id="email-notifications" value="on" />
25
+ <label class="nv-label nv-label--size-medium" for="email-notifications">Email notifications</label>
26
+ </div>
27
+ ```
28
+
29
+ ### Size
30
+
31
+ Use `small` in dense layouts such as tables and toolbars. The label text scales with the switch.
32
+
33
+ ```html
34
+ <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">
35
+ <div class="nv-switch-root nv-switch-root--size-small">
36
+ <input type="checkbox" role="switch" class="nv-switch-input" id="switch-small" value="on" />
37
+ <label class="nv-label nv-label--size-small" for="switch-small">Small</label>
38
+ </div>
39
+ <div class="nv-switch-root">
40
+ <input type="checkbox" role="switch" class="nv-switch-input" id="switch-medium" value="on" />
41
+ <label class="nv-label nv-label--size-medium" for="switch-medium">Medium</label>
42
+ </div>
43
+ <div class="nv-switch-root nv-switch-root--size-large">
44
+ <input type="checkbox" role="switch" class="nv-switch-input" id="switch-large" value="on" />
45
+ <label class="nv-label nv-label--size-large" for="switch-large">Large</label>
46
+ </div>
47
+ </div>
48
+ ```
49
+
50
+ ### Label side
51
+
52
+ The label sits after the control by default. Put it first when a column of settings reads label, then control.
53
+
54
+ ```html
55
+ <div class="nv-switch-root nv-switch-root--side-start">
56
+ <input type="checkbox" role="switch" class="nv-switch-input" id="usage-analytics" value="on" />
57
+ <label class="nv-label nv-label--size-medium" for="usage-analytics">Usage analytics</label>
58
+ </div>
59
+ ```
60
+
61
+ ### Without a visible label
62
+
63
+ Use an `aria-label` that names both the setting and its item, so each switch in a list is distinct.
64
+
65
+ ```html
66
+ <div class="nv-switch-root">
67
+ <input type="checkbox" role="switch" class="nv-switch-input" id="autoscaling-cluster-a" aria-label="Autoscaling for cluster-a" value="on" />
68
+ </div>
69
+ ```
70
+
71
+ ### Disabled
72
+
73
+ A disabled switch keeps its state and explains why it cannot change in text linked by `aria-describedby`.
74
+
75
+ ```html
76
+ <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">
77
+ <div class="nv-switch-root">
78
+ <input type="checkbox" role="switch" class="nv-switch-input" disabled="" id="maintenance-mode" aria-describedby="maintenance-mode-reason" checked="" value="on" />
79
+ <label class="nv-label nv-label--disabled nv-label--size-medium" for="maintenance-mode">Maintenance mode</label>
80
+ </div>
81
+ <span class="nv-text nv-text--body-regular-sm" id="maintenance-mode-reason">Unavailable while jobs are running.</span>
82
+ </div>
83
+ ```
84
+
85
+ ## CSS classes
86
+
87
+ ### Elements
88
+
89
+ `nv-switch-input`, `nv-switch-root`
90
+
91
+ ### Modifiers
92
+
93
+ | Group | Classes |
94
+ | --- | --- |
95
+ | side | `nv-switch-root--side-start` |
96
+ | size | `nv-switch-root--size-large`, `nv-switch-root--size-small` |
@@ -0,0 +1,566 @@
1
+ # Table
2
+
3
+ Organizes sets of structured data into columns and rows so users can scan, compare, and analyze information.
4
+
5
+ ## When to use
6
+
7
+ Use a table to compare the same fields across many records. It is for tabular data only, never for laying out a page. Use a [List](./List.md) for items not compared field by field, and a [Key-Value Group](./KeyValueGroup.md) for one entity's fields. A table sorts by column header but has no filtering or paging; use a data grid component for advanced sorting and filtering, or [Pagination](./Pagination.md) for paging.
8
+
9
+ ## Usage guidelines
10
+
11
+ - Set `fullWidth` on every table. Use `background="none"` for a transparent table and keep the base background for [striped rows](#striped-rows). The next major version defaults to full width and no background.
12
+ - Name every table with a `<caption>`, an `aria-labelledby` that points at a visible heading, or an `aria-label`. Use `<th>` for column headings, and `<th scope="row">` for a row's identifier.
13
+ - Put each row's identifier in the first data column, with status and badges to its right.
14
+ - Left-align text and right-align numbers.
15
+ - Do not color rows or cells at rest. Hover, selected, and [striped](#striped-rows) rows are the exceptions, and hover belongs only on interactive rows.
16
+ - When a row opens details, put a native link in the identifier cell as the keyboard and screen-reader path. Do not add a "View" column. For two or three row actions, use a kebab [Dropdown](./Dropdown.md).
17
+ - A row-level click or key handler also receives events from buttons inside the row. Stop propagation for click and keydown, or ignore events whose target is not the row. Name each row action after its row, such as "Delete job nightly-build".
18
+ - For bulk selection, add a checkbox column with a name on each checkbox, such as "Select report.pdf", and a labelled select-all. Replace the toolbar's primary controls with bulk actions while rows are selected, and keep the count in a `role="status"` region that stays mounted.
19
+ - Let a wide table scroll horizontally in an `overflow-x-auto` container.
20
+ - Sort with clickable [column headers](#sortable-columns), not a toolbar sort dropdown as well. Set `aria-sort` only on the sorted column's header.
21
+ - Write native `<table>`, `<thead>`, `<tbody>`, `<th scope>`, and `<caption>` elements, and put the classes shown in the examples on the same elements.
22
+ - Wire row and cell activation yourself. The classes style hover and selected rows and add no behavior.
23
+
24
+ ## Examples
25
+
26
+ ```html
27
+ <table class="nv-table-root nv-table-root--layout-fixed nv-table--align-left nv-table-root--full-width nv-table-root--background-none" aria-label="Team members">
28
+ <thead class="nv-table-head">
29
+ <tr class="nv-table-row">
30
+ <th class="nv-table-header-cell">Name</th>
31
+ <th class="nv-table-header-cell">Role</th>
32
+ <th class="nv-table-header-cell">Status</th>
33
+ </tr>
34
+ </thead>
35
+ <tbody class="nv-table-body">
36
+ <tr class="nv-table-row">
37
+ <td class="nv-table-data-cell">
38
+ <div class="nv-flex nv-flex--align-stretch nv-flex--direction-col nv-flex--justify-start nv-flex--wrap-nowrap">
39
+ <span class="nv-text nv-text--body-bold-md">Alex Morgan</span>
40
+ <span class="nv-text nv-text--body-regular-sm text-secondary">Joined 2026-01-01</span>
41
+ </div>
42
+ </td>
43
+ <td class="nv-table-data-cell">Engineer</td>
44
+ <td class="nv-table-data-cell">
45
+ <span class="nv-badge nv-badge--kind-solid nv-badge--color-green">Active</span>
46
+ </td>
47
+ </tr>
48
+ <tr class="nv-table-row">
49
+ <td class="nv-table-data-cell">
50
+ <div class="nv-flex nv-flex--align-stretch nv-flex--direction-col nv-flex--justify-start nv-flex--wrap-nowrap">
51
+ <span class="nv-text nv-text--body-bold-md">Sam Rivera</span>
52
+ <span class="nv-text nv-text--body-regular-sm text-secondary">Joined 2026-01-01</span>
53
+ </div>
54
+ </td>
55
+ <td class="nv-table-data-cell">Designer</td>
56
+ <td class="nv-table-data-cell"><span class="nv-badge nv-badge--kind-solid nv-badge--color-gray">Away</span></td>
57
+ </tr>
58
+ </tbody>
59
+ </table>
60
+ ```
61
+
62
+ ### Alignment
63
+
64
+ Set `nv-table--align-left`, `nv-table--align-center`, or `nv-table--align-right` on the table, or on any `<thead>`, `<tbody>`, `<tr>`, `<th>`, or `<td>` to override one section, row, or cell. Right-align a numeric column by adding `nv-table--align-right` to its header and data cells.
65
+
66
+ ```html
67
+ <div class="nv-flex nv-flex--align-stretch nv-flex--direction-col nv-flex--justify-start nv-flex--wrap-nowrap nv-primitive--gap-density-xl">
68
+ <table class="nv-table-root nv-table-root--layout-fixed nv-table--align-left nv-table-root--full-width nv-table-root--background-none" aria-label="Users, left-aligned">
69
+ <thead class="nv-table-head">
70
+ <tr class="nv-table-row">
71
+ <th class="nv-table-header-cell">Name</th>
72
+ <th class="nv-table-header-cell">Email</th>
73
+ </tr>
74
+ </thead>
75
+ <tbody class="nv-table-body">
76
+ <tr class="nv-table-row">
77
+ <td class="nv-table-data-cell">Alex Morgan</td>
78
+ <td class="nv-table-data-cell">alex@example.com</td>
79
+ </tr>
80
+ </tbody>
81
+ </table>
82
+ <table class="nv-table-root nv-table-root--layout-fixed nv-table--align-center nv-table-root--full-width nv-table-root--background-none" aria-label="Users, centered">
83
+ <thead class="nv-table-head">
84
+ <tr class="nv-table-row">
85
+ <th class="nv-table-header-cell">Name</th>
86
+ <th class="nv-table-header-cell">Email</th>
87
+ </tr>
88
+ </thead>
89
+ <tbody class="nv-table-body">
90
+ <tr class="nv-table-row">
91
+ <td class="nv-table-data-cell">Alex Morgan</td>
92
+ <td class="nv-table-data-cell">alex@example.com</td>
93
+ </tr>
94
+ </tbody>
95
+ </table>
96
+ <table class="nv-table-root nv-table-root--layout-fixed nv-table--align-right nv-table-root--full-width nv-table-root--background-none" aria-label="Inventory, right-aligned">
97
+ <thead class="nv-table-head">
98
+ <tr class="nv-table-row">
99
+ <th class="nv-table-header-cell">Item</th>
100
+ <th class="nv-table-header-cell">Quantity</th>
101
+ </tr>
102
+ </thead>
103
+ <tbody class="nv-table-body">
104
+ <tr class="nv-table-row">
105
+ <td class="nv-table-data-cell">Widgets</td>
106
+ <td class="nv-table-data-cell">1,200</td>
107
+ </tr>
108
+ </tbody>
109
+ </table>
110
+ </div>
111
+ ```
112
+
113
+ The side of a cell away from its alignment, such as the end of a left-aligned cell, takes its padding from `--table-cell-far-inline-padding`, which defaults to the regular inline padding. Set it on a cell, row, or the table to let content run closer to the next column.
114
+
115
+ ### Hoverable rows
116
+
117
+ Add `nv-table-root--hoverable-rows` to the table and `nv-table-row--selected` to the current row.
118
+
119
+ ```html
120
+ <table class="nv-table-root nv-table-root--layout-fixed nv-table--align-left nv-table-root--hoverable-rows nv-table-root--full-width nv-table-root--background-none" aria-label="Team members">
121
+ <thead class="nv-table-head">
122
+ <tr class="nv-table-row">
123
+ <th class="nv-table-header-cell">Name</th>
124
+ <th class="nv-table-header-cell">Role</th>
125
+ <th class="nv-table-header-cell">Status</th>
126
+ </tr>
127
+ </thead>
128
+ <tbody class="nv-table-body">
129
+ <tr class="nv-table-row nv-table-row--selected" aria-selected="true" data-selected="true" tabindex="0">
130
+ <td class="nv-table-data-cell">Alex Morgan</td>
131
+ <td class="nv-table-data-cell">Engineer</td>
132
+ <td class="nv-table-data-cell">Active</td>
133
+ </tr>
134
+ <tr class="nv-table-row" tabindex="0">
135
+ <td class="nv-table-data-cell">Sam Rivera</td>
136
+ <td class="nv-table-data-cell">Designer</td>
137
+ <td class="nv-table-data-cell">Active</td>
138
+ </tr>
139
+ <tr class="nv-table-row" tabindex="0">
140
+ <td class="nv-table-data-cell">Jordan Lee</td>
141
+ <td class="nv-table-data-cell">Manager</td>
142
+ <td class="nv-table-data-cell">Inactive</td>
143
+ </tr>
144
+ </tbody>
145
+ </table>
146
+ ```
147
+
148
+ ### Custom content
149
+
150
+ ```html
151
+ <table class="nv-table-root nv-table-root--layout-fixed nv-table--align-left nv-table-root--full-width nv-table-root--background-none" aria-label="Users">
152
+ <thead class="nv-table-head">
153
+ <tr class="nv-table-row">
154
+ <th class="nv-table-header-cell">User</th>
155
+ <th class="nv-table-header-cell">Status</th>
156
+ <th class="nv-table-header-cell">Actions</th>
157
+ </tr>
158
+ </thead>
159
+ <tbody class="nv-table-body">
160
+ <tr class="nv-table-row">
161
+ <td class="nv-table-data-cell">
162
+ <div class="nv-flex nv-flex--align-center nv-flex--direction-row nv-flex--justify-start nv-flex--wrap-nowrap nv-primitive--gap-density-md">
163
+ <div class="nv-avatar-root nv-avatar-root--size-medium nv-avatar-root--kind-outline">
164
+ <div class="nv-avatar-fallback">AM</div>
165
+ </div>
166
+ <div class="nv-flex nv-flex--align-stretch nv-flex--direction-col nv-flex--justify-start nv-flex--wrap-nowrap">
167
+ <span>Alex Morgan</span>
168
+ <span class="text-12">alex@example.com</span>
169
+ </div>
170
+ </div>
171
+ </td>
172
+ <td class="nv-table-data-cell">
173
+ <span class="nv-badge nv-badge--kind-solid nv-badge--color-green">Active</span>
174
+ </td>
175
+ <td class="nv-table-data-cell">
176
+ <button class="nv-button nv-button--size-small nv-button--kind-secondary" type="button">Edit</button>
177
+ </td>
178
+ </tr>
179
+ </tbody>
180
+ </table>
181
+ ```
182
+
183
+ ### Full-cell content
184
+
185
+ Put `nv-table-cell-bleed` on a wrapper inside the `<td>`, not on the `<td>`, with the `<a href>` inside it. Add `nv-table-cell-bleed--padding-none` only when the child fills the cell, and do not rebuild the padding by hand.
186
+
187
+ ```html
188
+ <table class="nv-table-root nv-table-root--layout-fixed nv-table--align-left nv-table-root--full-width nv-table-root--background-none" aria-label="Instances">
189
+ <thead class="nv-table-head">
190
+ <tr class="nv-table-row">
191
+ <th class="nv-table-header-cell">Instance</th>
192
+ <th class="nv-table-header-cell">Region</th>
193
+ <th class="nv-table-header-cell">Status</th>
194
+ </tr>
195
+ </thead>
196
+ <tbody class="nv-table-body">
197
+ <tr class="nv-table-row">
198
+ <td class="nv-table-data-cell">
199
+ <div class="nv-table-cell-bleed"><a href="#build-runner-01">build-runner-01</a></div>
200
+ </td>
201
+ <td class="nv-table-data-cell">us-west</td>
202
+ <td class="nv-table-data-cell">Running</td>
203
+ </tr>
204
+ <tr class="nv-table-row">
205
+ <td class="nv-table-data-cell">
206
+ <div class="nv-table-cell-bleed"><a href="#build-runner-02">build-runner-02</a></div>
207
+ </td>
208
+ <td class="nv-table-data-cell">us-east</td>
209
+ <td class="nv-table-data-cell">Stopped</td>
210
+ </tr>
211
+ </tbody>
212
+ </table>
213
+ ```
214
+
215
+ ### Sortable columns
216
+
217
+ The sort icon follows `aria-sort` on the header cell, so the visual and the accessible state always agree. Only the sorted column carries `aria-sort`.
218
+
219
+ Wire the sorting yourself, and move `aria-sort` to the sorted `<th>` after each sort. Use `<a href>` in place of the `<button>` to sort by navigating instead.
220
+
221
+ ```html
222
+ <table class="nv-table-root nv-table-root--layout-fixed nv-table--align-left nv-table-root--full-width nv-table-root--background-none" aria-label="Models">
223
+ <thead class="nv-table-head">
224
+ <tr class="nv-table-row">
225
+ <th class="nv-table-header-cell" aria-sort="ascending">
226
+ <div class="nv-table-sort-button"><button type="button">Name</button></div>
227
+ </th>
228
+ <th class="nv-table-header-cell">
229
+ <div class="nv-table-sort-button"><button type="button">Status</button></div>
230
+ </th>
231
+ <th class="nv-table-header-cell">Region</th>
232
+ </tr>
233
+ </thead>
234
+ <tbody class="nv-table-body">
235
+ <tr class="nv-table-row">
236
+ <td class="nv-table-data-cell">Cosmos</td>
237
+ <td class="nv-table-data-cell">Pending</td>
238
+ <td class="nv-table-data-cell">us-east</td>
239
+ </tr>
240
+ <tr class="nv-table-row">
241
+ <td class="nv-table-data-cell">Nemotron</td>
242
+ <td class="nv-table-data-cell">Running</td>
243
+ <td class="nv-table-data-cell">us-west</td>
244
+ </tr>
245
+ <tr class="nv-table-row">
246
+ <td class="nv-table-data-cell">NIM</td>
247
+ <td class="nv-table-data-cell">Stopped</td>
248
+ <td class="nv-table-data-cell">eu-central</td>
249
+ </tr>
250
+ </tbody>
251
+ </table>
252
+ ```
253
+
254
+ ### Density
255
+
256
+ A table follows the surrounding [density theme](/guides/theming#density-themes); set `density` only to override it. Cells reserve a `40px` content box, so compact density has a floor, and dense cell height removes it. Use that only for short, single-line values.
257
+
258
+ Set `nv-density-compact`, `nv-density-standard`, or `nv-density-spacious` on the table to override the surrounding density, and add `nv-table--cell-height-dense` to let rows shrink to their content.
259
+
260
+ ```html
261
+ <div class="nv-flex nv-flex--align-stretch nv-flex--direction-col nv-flex--justify-start nv-flex--wrap-nowrap nv-primitive--gap-density-xl">
262
+ <table class="nv-table-root nv-density-compact nv-table-root--layout-fixed nv-table--align-left nv-table-root--full-width nv-table-root--background-none" aria-label="Instances, compact density">
263
+ <thead class="nv-table-head">
264
+ <tr class="nv-table-row">
265
+ <th class="nv-table-header-cell">Instance</th>
266
+ <th class="nv-table-header-cell">Region</th>
267
+ <th class="nv-table-header-cell">Utilization</th>
268
+ </tr>
269
+ </thead>
270
+ <tbody class="nv-table-body">
271
+ <tr class="nv-table-row">
272
+ <td class="nv-table-data-cell">build-runner-01</td>
273
+ <td class="nv-table-data-cell">us-west</td>
274
+ <td class="nv-table-data-cell">88%</td>
275
+ </tr>
276
+ <tr class="nv-table-row">
277
+ <td class="nv-table-data-cell">build-runner-02</td>
278
+ <td class="nv-table-data-cell">us-east</td>
279
+ <td class="nv-table-data-cell">93%</td>
280
+ </tr>
281
+ </tbody>
282
+ </table>
283
+ <table
284
+ class="nv-table-root nv-density-compact nv-table-root--layout-fixed nv-table--align-left nv-table-root--full-width nv-table-root--background-none nv-table--cell-height-dense"
285
+ aria-label="Instances, compact density with dense cells"
286
+ >
287
+ <thead class="nv-table-head">
288
+ <tr class="nv-table-row">
289
+ <th class="nv-table-header-cell">Instance</th>
290
+ <th class="nv-table-header-cell">Region</th>
291
+ <th class="nv-table-header-cell">Utilization</th>
292
+ </tr>
293
+ </thead>
294
+ <tbody class="nv-table-body">
295
+ <tr class="nv-table-row">
296
+ <td class="nv-table-data-cell">build-runner-01</td>
297
+ <td class="nv-table-data-cell">us-west</td>
298
+ <td class="nv-table-data-cell">88%</td>
299
+ </tr>
300
+ <tr class="nv-table-row">
301
+ <td class="nv-table-data-cell">build-runner-02</td>
302
+ <td class="nv-table-data-cell">us-east</td>
303
+ <td class="nv-table-data-cell">93%</td>
304
+ </tr>
305
+ </tbody>
306
+ </table>
307
+ <table class="nv-table-root nv-density-spacious nv-table-root--layout-fixed nv-table--align-left nv-table-root--full-width nv-table-root--background-none" aria-label="Instances, spacious density">
308
+ <thead class="nv-table-head">
309
+ <tr class="nv-table-row">
310
+ <th class="nv-table-header-cell">Instance</th>
311
+ <th class="nv-table-header-cell">Region</th>
312
+ <th class="nv-table-header-cell">Utilization</th>
313
+ </tr>
314
+ </thead>
315
+ <tbody class="nv-table-body">
316
+ <tr class="nv-table-row">
317
+ <td class="nv-table-data-cell">build-runner-01</td>
318
+ <td class="nv-table-data-cell">us-west</td>
319
+ <td class="nv-table-data-cell">88%</td>
320
+ </tr>
321
+ <tr class="nv-table-row">
322
+ <td class="nv-table-data-cell">build-runner-02</td>
323
+ <td class="nv-table-data-cell">us-east</td>
324
+ <td class="nv-table-data-cell">93%</td>
325
+ </tr>
326
+ </tbody>
327
+ </table>
328
+ </div>
329
+ ```
330
+
331
+ ### Striped rows
332
+
333
+ Give every other body row a surface-token background with a class, so the stripes follow the theme.
334
+
335
+ ```html
336
+ <table
337
+ class="nv-table-root nv-density-compact nv-table-root--layout-fixed nv-table--align-left nv-table-root--full-width nv-table--cell-height-dense [&amp;_tbody&gt;tr:nth-child(even)]:bg-surface-sunken"
338
+ aria-label="Build runners"
339
+ >
340
+ <thead class="nv-table-head">
341
+ <tr class="nv-table-row">
342
+ <th class="nv-table-header-cell">Name</th>
343
+ <th class="nv-table-header-cell">Region</th>
344
+ <th class="nv-table-header-cell">Status</th>
345
+ </tr>
346
+ </thead>
347
+ <tbody class="nv-table-body">
348
+ <tr class="nv-table-row">
349
+ <td class="nv-table-data-cell">build-runner-01</td>
350
+ <td class="nv-table-data-cell">us-west</td>
351
+ <td class="nv-table-data-cell">Running</td>
352
+ </tr>
353
+ <tr class="nv-table-row">
354
+ <td class="nv-table-data-cell">build-runner-02</td>
355
+ <td class="nv-table-data-cell">us-east</td>
356
+ <td class="nv-table-data-cell">Stopped</td>
357
+ </tr>
358
+ <tr class="nv-table-row">
359
+ <td class="nv-table-data-cell">build-runner-03</td>
360
+ <td class="nv-table-data-cell">eu-central</td>
361
+ <td class="nv-table-data-cell">Running</td>
362
+ </tr>
363
+ <tr class="nv-table-row">
364
+ <td class="nv-table-data-cell">build-runner-04</td>
365
+ <td class="nv-table-data-cell">ap-south</td>
366
+ <td class="nv-table-data-cell">Running</td>
367
+ </tr>
368
+ <tr class="nv-table-row">
369
+ <td class="nv-table-data-cell">build-runner-05</td>
370
+ <td class="nv-table-data-cell">us-west</td>
371
+ <td class="nv-table-data-cell">Stopped</td>
372
+ </tr>
373
+ </tbody>
374
+ </table>
375
+ ```
376
+
377
+ ### Sticky header
378
+
379
+ Put the table in a container with a fixed `max-height` and `overflow: auto`, then give the `<thead>` `position: sticky`, `top: 0`, and an opaque background. A transparent header, which `background="none"` gives you, lets scrolling rows show through.
380
+
381
+ The example uses Tailwind utilities. In plain CSS, write the same `position: sticky`, `top: 0`, and background rules against the `<thead>`.
382
+
383
+ ```html
384
+ <div class="max-h-64 overflow-auto">
385
+ <table class="nv-table-root nv-table-root--layout-fixed nv-table--align-left nv-table-root--full-width nv-table-root--background-none" aria-label="Build runners">
386
+ <thead class="nv-table-head sticky top-0 z-10 bg-surface-base">
387
+ <tr class="nv-table-row">
388
+ <th class="nv-table-header-cell">Name</th>
389
+ <th class="nv-table-header-cell">Region</th>
390
+ <th class="nv-table-header-cell">Status</th>
391
+ </tr>
392
+ </thead>
393
+ <tbody class="nv-table-body">
394
+ <tr class="nv-table-row">
395
+ <td class="nv-table-data-cell">build-runner-01</td>
396
+ <td class="nv-table-data-cell">us-west</td>
397
+ <td class="nv-table-data-cell">Stopped</td>
398
+ </tr>
399
+ <tr class="nv-table-row">
400
+ <td class="nv-table-data-cell">build-runner-02</td>
401
+ <td class="nv-table-data-cell">us-east</td>
402
+ <td class="nv-table-data-cell">Running</td>
403
+ </tr>
404
+ <tr class="nv-table-row">
405
+ <td class="nv-table-data-cell">build-runner-03</td>
406
+ <td class="nv-table-data-cell">us-west</td>
407
+ <td class="nv-table-data-cell">Running</td>
408
+ </tr>
409
+ <tr class="nv-table-row">
410
+ <td class="nv-table-data-cell">build-runner-04</td>
411
+ <td class="nv-table-data-cell">us-east</td>
412
+ <td class="nv-table-data-cell">Stopped</td>
413
+ </tr>
414
+ <tr class="nv-table-row">
415
+ <td class="nv-table-data-cell">build-runner-05</td>
416
+ <td class="nv-table-data-cell">us-west</td>
417
+ <td class="nv-table-data-cell">Running</td>
418
+ </tr>
419
+ <tr class="nv-table-row">
420
+ <td class="nv-table-data-cell">build-runner-06</td>
421
+ <td class="nv-table-data-cell">us-east</td>
422
+ <td class="nv-table-data-cell">Running</td>
423
+ </tr>
424
+ <tr class="nv-table-row">
425
+ <td class="nv-table-data-cell">build-runner-07</td>
426
+ <td class="nv-table-data-cell">us-west</td>
427
+ <td class="nv-table-data-cell">Stopped</td>
428
+ </tr>
429
+ <tr class="nv-table-row">
430
+ <td class="nv-table-data-cell">build-runner-08</td>
431
+ <td class="nv-table-data-cell">us-east</td>
432
+ <td class="nv-table-data-cell">Running</td>
433
+ </tr>
434
+ <tr class="nv-table-row">
435
+ <td class="nv-table-data-cell">build-runner-09</td>
436
+ <td class="nv-table-data-cell">us-west</td>
437
+ <td class="nv-table-data-cell">Running</td>
438
+ </tr>
439
+ <tr class="nv-table-row">
440
+ <td class="nv-table-data-cell">build-runner-10</td>
441
+ <td class="nv-table-data-cell">us-east</td>
442
+ <td class="nv-table-data-cell">Stopped</td>
443
+ </tr>
444
+ <tr class="nv-table-row">
445
+ <td class="nv-table-data-cell">build-runner-11</td>
446
+ <td class="nv-table-data-cell">us-west</td>
447
+ <td class="nv-table-data-cell">Running</td>
448
+ </tr>
449
+ <tr class="nv-table-row">
450
+ <td class="nv-table-data-cell">build-runner-12</td>
451
+ <td class="nv-table-data-cell">us-east</td>
452
+ <td class="nv-table-data-cell">Running</td>
453
+ </tr>
454
+ </tbody>
455
+ </table>
456
+ </div>
457
+ ```
458
+
459
+ ### Sticky rows
460
+
461
+ Pin a totals row to the bottom of the scroll area: put it in a `<tfoot>` with `position: sticky`, `bottom: 0`, and an opaque background. Remove the last body row's bottom border and add a top border to the footer cells, since the table uses separate borders.
462
+
463
+ ```html
464
+ <div class="max-h-64 overflow-auto">
465
+ <table class="nv-table-root nv-table-root--layout-fixed nv-table--align-left nv-table-root--full-width nv-table-root--background-none">
466
+ <caption>
467
+ Build runners
468
+ </caption>
469
+ <thead class="nv-table-head bg-surface-base sticky top-0 z-10">
470
+ <tr class="nv-table-row">
471
+ <th class="nv-table-header-cell">Name</th>
472
+ <th class="nv-table-header-cell">Region</th>
473
+ <th class="nv-table-header-cell">Jobs</th>
474
+ </tr>
475
+ </thead>
476
+ <tbody class="nv-table-body [&amp;&gt;tr:last-child&gt;*]:border-b-0">
477
+ <tr class="nv-table-row">
478
+ <td class="nv-table-data-cell">build-runner-01</td>
479
+ <td class="nv-table-data-cell">us-west</td>
480
+ <td class="nv-table-data-cell">3</td>
481
+ </tr>
482
+ <tr class="nv-table-row">
483
+ <td class="nv-table-data-cell">build-runner-02</td>
484
+ <td class="nv-table-data-cell">us-east</td>
485
+ <td class="nv-table-data-cell">4</td>
486
+ </tr>
487
+ <tr class="nv-table-row">
488
+ <td class="nv-table-data-cell">build-runner-03</td>
489
+ <td class="nv-table-data-cell">us-west</td>
490
+ <td class="nv-table-data-cell">5</td>
491
+ </tr>
492
+ <tr class="nv-table-row">
493
+ <td class="nv-table-data-cell">build-runner-04</td>
494
+ <td class="nv-table-data-cell">us-east</td>
495
+ <td class="nv-table-data-cell">6</td>
496
+ </tr>
497
+ <tr class="nv-table-row">
498
+ <td class="nv-table-data-cell">build-runner-05</td>
499
+ <td class="nv-table-data-cell">us-west</td>
500
+ <td class="nv-table-data-cell">7</td>
501
+ </tr>
502
+ <tr class="nv-table-row">
503
+ <td class="nv-table-data-cell">build-runner-06</td>
504
+ <td class="nv-table-data-cell">us-east</td>
505
+ <td class="nv-table-data-cell">8</td>
506
+ </tr>
507
+ <tr class="nv-table-row">
508
+ <td class="nv-table-data-cell">build-runner-07</td>
509
+ <td class="nv-table-data-cell">us-west</td>
510
+ <td class="nv-table-data-cell">9</td>
511
+ </tr>
512
+ <tr class="nv-table-row">
513
+ <td class="nv-table-data-cell">build-runner-08</td>
514
+ <td class="nv-table-data-cell">us-east</td>
515
+ <td class="nv-table-data-cell">10</td>
516
+ </tr>
517
+ <tr class="nv-table-row">
518
+ <td class="nv-table-data-cell">build-runner-09</td>
519
+ <td class="nv-table-data-cell">us-west</td>
520
+ <td class="nv-table-data-cell">11</td>
521
+ </tr>
522
+ <tr class="nv-table-row">
523
+ <td class="nv-table-data-cell">build-runner-10</td>
524
+ <td class="nv-table-data-cell">us-east</td>
525
+ <td class="nv-table-data-cell">12</td>
526
+ </tr>
527
+ <tr class="nv-table-row">
528
+ <td class="nv-table-data-cell">build-runner-11</td>
529
+ <td class="nv-table-data-cell">us-west</td>
530
+ <td class="nv-table-data-cell">13</td>
531
+ </tr>
532
+ <tr class="nv-table-row">
533
+ <td class="nv-table-data-cell">build-runner-12</td>
534
+ <td class="nv-table-data-cell">us-east</td>
535
+ <td class="nv-table-data-cell">14</td>
536
+ </tr>
537
+ </tbody>
538
+ <tfoot class="bg-surface-base [&amp;&gt;tr&gt;*]:border-base sticky bottom-0 z-10 [&amp;&gt;tr&gt;*]:border-t">
539
+ <tr class="nv-table-row">
540
+ <th class="nv-table-header-cell">Total</th>
541
+ <td class="nv-table-data-cell"></td>
542
+ <td class="nv-table-data-cell">102</td>
543
+ </tr>
544
+ </tfoot>
545
+ </table>
546
+ </div>
547
+ ```
548
+
549
+ ## CSS classes
550
+
551
+ ### Elements
552
+
553
+ `nv-table-body`, `nv-table-bulk-action-toolbar`, `nv-table-cell-bleed`, `nv-table-data-cell`, `nv-table-head`, `nv-table-header-cell`, `nv-table-root`, `nv-table-row`, `nv-table-sort-button`, `nv-table-sort-button-end`, `nv-table-sort-button-label-end`, `nv-table-toolbar`, `nv-table-toolbar-bulk-actions-section`, `nv-table-toolbar-content`
554
+
555
+ ### Modifiers
556
+
557
+ | Group | Classes |
558
+ | --- | --- |
559
+ | align | `nv-table--align-center`, `nv-table--align-left`, `nv-table--align-right` |
560
+ | background | `nv-table-root--background-none`, `nv-table-root--background-raised` |
561
+ | cell | `nv-table--cell-height-dense` |
562
+ | full | `nv-table-root--full-width` |
563
+ | hoverable | `nv-table-root--hoverable-rows` |
564
+ | layout | `nv-table-root--layout-auto`, `nv-table-root--layout-fixed` |
565
+ | padding | `nv-table-cell-bleed--padding-none` |
566
+ | state | `nv-table-root--compact`, `nv-table-row--selected` |