Skip to content

Grid Layout System

The grid layout system is a responsive grid system that provides a consistent and predictable way to layout content on the page.

ContextContainer sizeColumnsGapIntended use
Page content
default
md1224pxPrimary page layouts, dashboards
Card listingsmd3-424pxApplications, services, events
Dense listingslg4-624pxAdmin tables, dense dashboards
Forms / settingssm1-216pxForms, configuration pages
Marketing / widexl4-632pxMarketing-style sections
Full-width sectionsnone1232pxEdge-to-edge content
RuleDescription
Default column countMust be selected from approved presets
SpanningItems may span columns only in predefined patterns
Fractional columnsCustom fr math is discouraged
NestingGrids may be nested only when layout complexity requires it
OverflowGrids must collapse to fewer columns on smaller screens
Target deviceScreen widthsColumns
Mobile<639px1
Tablet640px-1366px2
Standard desktop1367px-1920px3-4
Wide desktop1921px+4-6

Also check out the TailwindCSS responsive design.

RuleDescription
Line lengthGrid must not create overly long text columns
Card widthCards must remain readable at all breakpoints
Focus orderGrid order must match DOM order
DensityAvoid exceeding 4 columns for content-heavy cards
DeviceScreen widthContainer widthBreadpoint prefixColumns
Small mobiles<639pxauto1
Large mobiles and less640px-767px40remsm1
Small tablets768px-1023px48remmd2
Small desktops and large tablets1024px-1280px80remlg3
Desktops1281px-1440px96remxl4
Wide desktops1536px+96rem2xl4
<div class="container mx-auto px-4">
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-2">
<div>
<!-- Col 1 -->
</div>
<div>
<!-- Col 2 -->
</div>
<div>
<!-- Col 3 -->
</div>
<div>
<!-- Col 4 -->
</div>
</div>
</div>