DocsBlog
  • 1.2.1

  • light

    dark

    system

    Switch mode
  • Cerberus

    Acheron

    Elysium

Get Started
Components
Data Grid
Signals
Styling
Theming

Get Started

OverviewQuick StartColumnsContextTheme

Layout

DimensionsSizingSlotsOverlaysNewToolbarFooterPagination

Features

PinningSortingFilteringNew

Reference

API

On this page

Loading...

Loading...

Loading...

Loading...

Data Grid API

The API reference for the Data Grid component.

  • source

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.

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

  • Edit this page on Github