Your first layout Guide
VD3 UI's layout system is plain CSS — a 12-column responsive grid inside a container, with mobile-first breakpoints and a constant 13px gutter. This guide builds a real page step by step: container, rows and columns, breakpoints, then a full app shell with VdNavbar and VdFooter.
Anatomy of a layout
.vd-container-*— Centers the page and caps its width; adds side padding..vd-row— A flex line that cancels the outer column gutters..vd-col-*— Takes 1–12 of the row's 12 tracks; padding is the gutter.Your content— Cards, text, media — styled freely inside the column.
1 Pick a container
Every page starts with a container. It centers your content, caps the line length on big screens, and adds side padding so text never touches the viewport edge.
| Class | Behaviour |
|---|---|
.vd-container | Fixed 987px max-width, centered (does not step down) |
.vd-container-responsive | 987px, widening to 1364px at xl and 1597px at 2xl (used across these docs) |
.vd-container-fluid | Full width, edge to edge, with side padding |
.vd-container-sm … -2xl | Fluid below their breakpoint, capped above it — see Grid system |
2 Add rows and responsive columns
Columns stack on phones, go two-up on tablets, and three-up on desktops. Resize the window to watch them reflow.
You're viewing at base
<div class="vd-container-responsive">
<div class="vd-row">
<div class="vd-col-12 vd-col-md-6 vd-col-lg-4">Column A</div>
<div class="vd-col-12 vd-col-md-6 vd-col-lg-4">Column B</div>
<div class="vd-col-12 vd-col-md-12 vd-col-lg-4">Column C</div>
</div>
</div>3 Know your breakpoints
Breakpoints are mobile-first minimum widths: a vd-col-md-6 applies from 768px up until a larger class overrides it. The current one is highlighted.
| Name | Min width | Column class |
|---|---|---|
| base | < 576px | vd-col-* — stacks on phones |
| sm | ≥ 576px | vd-col-sm-* |
| md | ≥ 768px | vd-col-md-* |
| lg | ≥ 992px | vd-col-lg-* |
| xl | ≥ 1200px | vd-col-xl-* |
| 2xl | ≥ 1400px | vd-col-2xl-* |
4 Compose a real page
Navbar, a sidebar column, a main column with its own nested row of cards, and a footer. Nested rows work exactly like top-level ones.
Main content lives here — it takes 9 of 12 columns from lg up and the full width below.
Common layout recipes
Sidebar + content
A 3/9 split that stacks on phones.
Centered reading column
8 columns, offset by 2 — comfortable line length.
Responsive card grid
1 → 2 → 3 → 4 cards per row as the screen widens.
Golden split
38.2% / 61.8% — content and aside at a natural ratio.
Common pitfalls
Columns line up side by side only when their direct parent is a .vd-row. A wrapper div in between stacks them instead.
Rows use negative side margins to cancel the column gutters; the container's padding is what absorbs them.
VD3 UI's CSS ships in @layer vd3, so a width or padding you set on a column in your own CSS silently wins over the grid. Wrap content in a card or div and style that instead.
Write vd-col-12 first, then add vd-col-md-* / vd-col-lg-* only where the layout should change.
The gutters and container widths follow the same Fibonacci spacing as the rest of the system — see Fibonacci scale.