Autosize columns

api.autosizeColumn(id) and api.autosizeAllColumns() snap columns to the widest visible cell via canvas-based text measurement. The column header menu has an "Autosize" item that calls the same code. Manual drag-resize still works.

A live, editable Svelte 5 data grid example. Open the interactive demo or read the documentation.