Column resizing

Dragging a column wider with resizableColumns, resizeMode, and columnSizeDefaults.

Last updated August 3, 2026

resizableColumns turns on dragging a header's trailing edge to resize, unless a column sets its own resizable to override the grid. Double-clicking the edge fits the column to its content instead. resizeMode decides what happens to the rest of the grid: "fit" (the default) redistributes the space a resize gives up or takes among the other columns; "fixed" leaves every other column exactly where it was.

fit vs. fixed

resizableColumns

Live example
Resize mode
IdServiceEnvironment NameEnvironment RegionStatusCost
1checkout-apiproductionus-east-1healthy1240.5
2billing-workerproductioneu-west-1degraded860.2
3search-indexstagingus-east-1healthy92.75
4notificationsproductionus-west-2down305.4
5analytics-pipelinestagingeu-west-1healthy145
  1. Interact with the grid above to see its callbacks fire.
<DataGridComponent
  columns={columns}
  dataSource={rows}
  resizableColumns
  resizeMode="fit"
  onColumnResize={({ columnId, width, phase }) => {
    if (phase === "end") persist(columnId, width);
  }}
/>;

Props

PropTypeDefaultDescription
resizableColumnsbooleanfalseWhether columns can be dragged wider, unless a column says otherwise.
resizeMode"fit" | "fixed""fit"Whether columns fill the grid's width or sit at their own.
columnSizeDefaultsPartial<ColumnSizeDefaults>Width, minWidth, maxWidth applied to a column that sets none of its own.
defaultColumnSizingColumnSizingStateColumn widths to start from, keyed by column id. Uncontrolled.
onColumnResize(event: ColumnResizeEvent) => voidCalled as the user resizes a column: continuously with phase "move", once with "end".
column.resizablebooleanPer-column override of resizableColumns — a column can opt out of an otherwise resizable grid, or in on one that is not.
column.width / minWidth / maxWidthnumberThis column's own starting width and resize bounds.

Keyboard & pointer interactions

  • Drag a header's trailing edge to resize; double-click it to size the column to its content.
  • With the trailing edge focused, Alt+ArrowLeft / Alt+ArrowRight nudge the width; Escape cancels an in-progress resize.
Edit this page on GitHub