I’m working on a Vaadin Grid, and I’ve already applied GridVariant.LUMO_COMPACT to make it more compact. However, I was wondering if there are any other methods or techniques I can use to further reduce the size of the grid or its elements.
Has anyone experimented with additional customizations or CSS styles that might help achieve a more compact look for the Grid?
Most sizes (e.g. of fonts, elements and whitespace) in the Grid (and other Vaadin components) is determined by Lumo style properties. By tweaking those (either globally, or just for a specific Grid) you can make things more compact.
As an example, applying these tweaks on a particular Grid that already has the COMPACT variant applied makes things a lot more compact:
In case you have buttons in your grid, they bring a lot of space around them. In my case I used theme variant ButtonVariant.LUMO_TERTIARY_INLINE to make them more compact.