Density Toggle
A toolbar control switches the grid between compact, standard, and comfortable density, which changes row height, header height, and padding. Different users and tasks need different information density, and the choice can be saved.
Planned. This page shows the specification from issue #202. The live example, source for every framework and the API reference replace it when the feature ships.
Live example
A grid at standard density.
Expected behavior
Row and header heights change instantly. Scroll position is kept relative to the first visible row. The setting survives a reload when persistence is enabled.
Planned API surface
toolbar item 'density'gridOptions.density: 'compact'|'standard'|'comfortable'gridOptions.densityTokensapi.setDensity(value)onDensityChangeAcceptance criteria
- Each density applies the documented CSS custom property values. (pending)
- The first visible row stays in view after a density change. (pending)
- onDensityChange fires with the previous and new values. (pending)
- Fixed per-column row heights still scale with density, or the exception is documented. (pending)