Skip to main content

Drag resize

You can allow user to resize table columns using the resizable prop of <Table />.

function DragResize() {
return (
<Table<Person>
indexKey='id'
data={people.slice(0, 6)}
columnConfigs={peopleColumns}
baseHeaderClasses='font-bold'
baseRowClasses={index => {
let baseClasses = 'cursor-pointer';
return index % 2 !== 0 ? baseClasses : `${baseClasses} bg-gray-100 dark:bg-stripe`;
}}
baseCellPadding={{
vertical: '10px',
horizontal: '10px'
}}
resizable // enable column resize
/>
);
}
info

Hover on the vertical lines of the Live Example and start dragging.

caution

This feature is experimental.