Responsive Grid

A 12-column grid with six breakpoints. Columns, gutters, and margins scale by viewport width. The grid is Tailwind-native — no additional configuration is needed.

Breakpoints

NameValueTailwind prefixContext
xs360pxSmall mobile
sm640pxsm:Large mobile / small tablet
md768pxmd:Tablet portrait
lg1024pxlg:Tablet landscape / small desktop
xl1280pxxl:Desktop
2xl1536px2xl:Wide desktop

Grid specification

BreakpointColumnsGutterMarginUse case
xs (360–639px)416px16pxSingle-column mobile layouts
sm (640–767px)416px24pxWide mobile, compact grid
md (768–1023px)820px24pxTablet — 2–3 column patterns
lg (1024–1279px)1224px32pxDesktop — full 12-col available
xl (1280–1535px)1224px48pxWide desktop
2xl (1536px+)1224pxauto (max-width: 1440px)Capped layout

Common span patterns

PatternTailwindDescription
Full widthcol-span-12Page-level containers, heroes
Two thirdscol-span-8Main content + narrow sidebar
Halfcol-span-6Paired cards, split layouts
Thirdcol-span-4Three-column card grids
Quartercol-span-3Four-column stat tiles
Sidebarcol-span-3 / col-span-9Classic sidebar + content

Code examples

Responsive card grid
<div className="
  grid
  grid-cols-1
  sm:grid-cols-2
  lg:grid-cols-3
  xl:grid-cols-4
  gap-4 lg:gap-6
  px-4 lg:px-8
">
  {items.map(item => (
    <Card key={item.id} {...item} />
  ))}
</div>
Sidebar + content layout
<div className="
  grid
  grid-cols-1 lg:grid-cols-12
  gap-6
  max-w-[1440px] mx-auto
  px-4 lg:px-8
">
  <aside className="lg:col-span-3">
    <Nav />
  </aside>

  <main className="lg:col-span-9">
    {children}
  </main>
</div>

Guidelines

  • Always start with the mobile layout first (grid-cols-1) and layer up with breakpoint prefixes.
  • Use gap-4 (16px) as the baseline gutter. Increase to gap-6 on lg+ for breathing room.
  • Cap page-level containers at max-w-[1440px] to prevent over-wide content lines on ultra-wide monitors.
  • Never mix fixed-pixel widths with grid-based columns — let the grid control horizontal sizing.
  • 12 columns gives even splits for 2 (6), 3 (4), 4 (3), and 6 (2) items without remainder columns.