The most basic – but also most overlooked element of a design is spacing. This article explains how the different spacing utilities like padding, margin and space work in Tailwind CSS and when to use them.

These elements create space between elements and make it easy to only add space if there are more elements within a group. The gap utility works with Tailwind grids only and makes it even easier to add space between elements of a grid.

So whenever you design grids, use the gap utility instead of manually positioning the elements with margin, padding or space.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners