MindeesUI
ComponentsDisplay

DataGrid

A scrollable data table with sortable column headers and optional zebra striping.

DataGrid builds on the Table layout with per-column sorting and alternating row backgrounds. Marking a column sortable makes its header tappable, cycling ascending, descending, and unsorted. Sorting is text/number aware and leaves custom node cells stable.

Import

import { DataGrid } from '@mindees/ui';

Usage

<DataGrid
  columns={[
    { key: 'name', title: 'Name', sortable: true },
    { key: 'score', title: 'Score', sortable: true, width: 80 },
  ]}
  data={rows}
  zebra
/>

Props

PropTypeDefaultDescription
columnsreadonly DataGridColumn[]Column definitions ({ key, title, width?, sortable? }).
datareadonly DataGridRow[]Row records keyed by column key.
zebrabooleantrueEnable alternating row backgrounds.
styleStyleProp<ViewStyle>Style applied to the scroll container.

Each DataGridColumn width defaults to 120. Inherits the remaining ScrollView props (except style and children).

Accessibility

Sortable headers are header pressables exposing a selected state and a Tap to sort by this column hint; non-sortable headers are static header views. Body rows and cells are marked none.

On this page