DocsBlog

Get Started

Components

Data Grid

Signals

Styling

Theming

↑↓Navigate
↵Select
EscClose
  • 1.8.0

  • Day

    Night

    Preview

    Switch mode
  • cerberus

    acheron

    elysium

    oceanus

Get Started
Components
Data Grid
Signals
Styling
Theming

Get started

Overview Quickstart Columns Context Theme

Layout

Dimensions SizingSlotsOverlaysToolbarFooterPagination

Features

Column PinningColumn SortingFilteringColumn Visibility

Reference

API

Data Grid API

The API reference for the Data Grid component.

  • source
View as Markdown
Open this page in Markdown
Anthropic
Open in Claude
Ask questions about this page
OpenAI
Open in ChatGPT
Ask questions about this page

API

The Data Grid API provides the following props:

ParamsRequiredDescription
datatrueThe full set of data to display in the grid.
columnstrueThe list of defined columns using the column helper.
initialStatefalseThe initial state of the grid for pagination settings.
rowSizefalseThe size of each row in pixels or one of the predefined sizes.
toolbarfalseThe component to render in the grid toolbar slot.
overlaysfalseOptional overlays to render within the viewport.
footerfalseThe component to render in the grid footer slot.
themefalseCustom style options to apply to the grid layout.

Overlay Slots

The overlays prop expects an Object of the following optional properties in the table below. Each property expects a ReactNode value:

NameDescription
noContentDisplays when there are no rows present in the data or if the data has filtered out all rows to an empty state.
pendingDisplays when the data grid is still loading.
initialDisplays when the data grid has finished the initial pending phase.

Slot Attributes

Each slot layer is assigned a unique data-part attribute for styling and targeting specific slot layers.

NameValueDescription
data-scopedata-gridThe scope of the components.
data-parttoolbarThe container of the toolbar slot.
data-partrootThe container Data Grid family.
data-partviewportThe container of the viewport slot.
data-parthead-cellThe container of the head cell slot.
data-partrowThe container of the row slot.
data-partrow-cellThe container of the row cell slot.
data-partfooterThe container of the footer slot.

Note

Any other slot part displayed in the Grid is inherited from the Cerberus React component API for that item.

On this page

  • API
    • Overlay Slots
  • Slot Attributes
Edit this page on Github