NV Elements Catalog Starters Repo System Themes About Getting Started Changelog Metrics Support Accessibility Contributions Requests Migration Deprecations Integrations Installation MCP CLI Lint Angular Bundles Extensions Go Hugo Import Maps Lit NextJS Nuxt Preact React SolidJS Svelte TypeScript Vue Foundations Typography Iconography Themes Design Tokens Size & Space Objects Interactions Support Status Color Animation Fonts Layers Custom Layout Horizontal Vertical Grid Popovers i18n Visualization View Transitions Elements Accordion Alert Avatar Badge Breadcrumb Button Button Group Card Chat Message Checkbox Color Combobox Copy Button Datagrid Integrations Column Action Column Alignment Column Fixed Column width Container Card Display Settings Footer Heatmap Keynav Multi Select Pagination Panel Detail Panel Grid Performance Placeholder Row Action Row Groups Row Sort Scroll Height Single Select Stripe Date Datetime Dialog Divider Dot Drawer Dropdown Dropdown Group Dropzone File Forms Validation Actions Control Icon Icon Button Input Input Group Logo Menu Month Notification Page Page Header Page Loader Pagination Panel Progressive Filter Chip Progress Bar Progress Ring Password Preferences Input Pulse Radio Range Resize Handle Search Select Skeleton Sort Button Sparkline Star Rating Steps Switch Tabs Tag Textarea Time Toast Toggletip Toolbar Tooltip Tree Week Patterns Authentication Browse Dashboard Editor Empty States Heatmap Keyboard Shortcut Logging Media Onboarding Panel Responsive Search Subheader Trend Code Codeblock Monaco Input Diff Input Editor Diff Editor Problems Markdown Markdown CSS Utility Labs Responsive Layout Viewport Container Patterns Forms API Design Properties & Attributes Slots Registration CustomEvents Stateless Composition Styles Packaging Glossary Logs Internal Guidelines Agent Harness Documentation Examples TypeScript Testing Unit Testing Accessibility Testing Lighthouse Testing SSR Testing Visual Testing Troubleshooting Component Creation Internal Examples All Examples

Data Grid

stable:   Coverage: 100.00% Bundle: 23.07kb Lighthouse: 97 Axe Core Released: 0.11.0
Overview API Examples
DefaultKeynavMultiSelectBulkActionsSingleSelectRowActionRowGroupsFooterPaginationScrollScrollPositionFullHeightColumnActionColumnWidthContentColumnFixedColumnMultiFixedColumnStackFixedColumnDynamicFixedColumnAlignCenterColumnAlignEndColumnAlignStartDisplaySettingsRowSortCSSAnchorRowSortInteractivePerformanceInfiniteScrollPerformancePerformanceVirtualScrollStripeCardCardTabsPlaceholderFullFlatFocusTypesPanelDetailPanelGridInvalidDOMAuditInvalidColumnCountValidColumnCountSortVisibility

Default

A versatile table/datagrid component with built-in keyboard navigation for displaying and interacting with structured data. Use it for anything from simple read-only tables to fully interactive, spreadsheet experiences.

Keynav

The datagrid follows the ARIA Authoring Practices Guide for standardized keyboard navigation.

Multi Select

Multi-select rows with checkboxes for bulk operations. Use multi-select when users need to perform actions on many items at once (like delete, export, or bulk edit), placing checkboxes as the first column and setting the selected attribute for proper accessibility.

Bulk Actions

Use bulk actions for operations on many items. Display only when rows have a selection. Closing bulk actions deselects all selected rows.

Single Select

A single select datagrid allows users to choose exactly one row from a data table by providing radio buttons in the first column, ensuring only one item has a selection at a time. To enable single select, place nve-radio input as the first grid cell of each row. Set name attribute on each radio to ensure to associate the same radio group.

Row Action

Row actions enable extra user actions specific to a given row. Place a nve-icon-button at the end of the grid row for actions.

Row Groups

Expandable row groups for hierarchical data organization. Use row groups when items have parent-child relationships or nested details (like sessions with uploads, orders with line items), allowing users to progressively disclose details and maintain compact views of large hierarchies.

The footer displays contextual information or extra user actions such as pagination.

Pagination

Use the pagination pattern when working with large data sets that need incremental loading or filtering for performance or useability.

Scroll

test-case

Fixed-height scrollable grid with persistent header and footer. Use scrollable grids when displaying large datasets where users need to maintain context of column headers and footer controls (like pagination) while scrolling through many rows, improving navigation without losing orientation.

Scroll Position

Programmatic scroll control using the grid scrollTo API. Use for scroll-to-top buttons, jump-to-row navigation, or restoring scroll position after data refreshes in large datasets.

Full Height

test-case

Using nve-layout="column" the grid to fill any remaining space of a parent containing element. This is helpful for preserving the grid height/fill while dynamic content above can freely change.

Column Action

Create column actions by using the nve-icon-button to trigger dropdowns or panels that reveal more actions to the user.

Column Width

Column width control for responsive grid layouts, enabling flexible content sizing and optimal space usage across different screen sizes.

Content

test-case

Basic grid content display with evenly distributed columns, including standard data presentation and cell content wrapping behavior.

Column Fixed

Fix columns to any given side, but keep fixed columns from spanning past the half way point of the grid.

Column Multi Fixed

Fix many columns to any given side, but keep fixed columns from spanning past the half way point of the grid.

Column Stack Fixed

Stack and fix many columns to any given side, but keep fixed columns from spanning past the half way point of the grid.

Column Dynamic Fixed

Dynamic column management with programmatic addition and positioning, for flexible grid configuration with evolving data requirements.

Column Align Center

test-case

Center-aligned column content for improved visual balance and data presentation, enhancing readability for numeric and centered data types.

Column Align End

test-case

Right-aligned column content for numeric data and values, providing consistent visual alignment and improved data scanning for financial or metric displays.

Column Align Start

test-case

Left-aligned column content for text data and labels, providing consistent visual alignment and improved readability for textual information.

Display Settings

Users can customize their data view through a dropdown menu above the grid, allowing them to show/hide columns and restore default settings for a personalized experience.

Row Sort

Sortable columns with visual indicators for data organization. Use sort buttons on columns where sorting is meaningful (dates, numbers, names) to help users find patterns, identify outliers, or locate specific data points, supporting three states: none, ascending, and descending.

C S S Anchor

test-case

CSS anchor positioning for tooltips within grid cells, with proper tooltip placement and content visibility in constrained grid environments.

Row Sort Interactive

test-case

Row sort sorts the rows of the grid.

Performance Infinite Scroll

test-caseperformance

Infinite scroll loads data as the user scrolls down the grid.

Performance

performance

Datagrid performance is heavily dependent on the content within the grid as well as the host environment.

Performance Virtual Scroll

test-caseperformance

Performance virtual scroll tests the performance of the grid.

Stripe

test-case

Determine style variant stripe rows

Stripe Description true false

Card

Nest Grid in Cards for UI patterns such as card tab groups. Use the container="flat" attribute to enable proper styling of the grid when nested within a card.

Card Tabs

test-case

Grid integrated with tabs for organized data presentation, enabling many data views within a single interface for comprehensive information display.

Placeholder

Loading placeholder state with progress indicator. Use grid placeholders during initial data fetching or while loading large datasets, providing visual feedback that content is coming and preventing layout shift when rows populate, improving perceived performance.

Full

Full-width grid container for max space use, providing edge-to-edge data display for comprehensive information presentation.

Flat

Flat container styling for minimal visual weight, providing subtle grid presentation that integrates seamlessly with surrounding content.

Focus Types

test-case

Different focusable element types within grid cells, with keyboard navigation and accessibility support for interactive content.

Panel Detail

Use a right aligned nve-page-panel when displaying advanced filtering or display settings for the grid. Item detail panels should be open using a action button placed at the end of the grid row.

Panel Grid

Panel Grid displays key value type data sets for details of a given item in a collection.

Invalid D O M

anti-pattern

Examples of invalid grid usage patterns for testing and documentation purposes, showing what not to do when implementing grids.

Audit

anti-pattern

Examples of invalid grid usage patterns for testing and documentation purposes, showing what not to do when implementing grids.

Invalid Column Count

anti-pattern

Do not set the column count to a value that does not match the number of cells in the row.

Valid Column Count

test-case

Ensure column count matches the number of cells in the row to preserve keyboard navigation.

Sort Visibility

Use the nve-sort-button to add grid row sort. The grid follows the ARIA sort spec and automatically sets the appropriate accessibility related attributes to convey the current sorting state.