Skip to content
IndexRequest a UIAboutContact

Responsive Breakpoint Preview

Drag a width slider and watch one layout change from one to two to three columns and from a menu icon to a full nav.

Open alone ↗

AI prompt

PROMPT: PASTE INTO YOUR AI CODING TOOL
Responsive design diagram showing the same web page at three widths side by side: a narrow phone layout with a hamburger icon and one stacked column of six cards, a medium tablet layout with two columns, and a wide desktop layout with a full navigation bar and three columns, consistent card content and colours, labelled Narrow, Medium and Wide, flat vector style, light theme. Negative: different content per layout, device mockup frames, gradients, text errors. Reduced motion: static diagram.

About this pattern

Definition

A responsive layout rearranges itself as the available width changes. At narrow widths content stacks and navigation collapses to an icon; as space grows, columns appear and the full navigation shows. Container queries let a component respond to its own width, not just the window.

Purpose & UX principles

  • Design the narrow layout first and add columns as space allows (mobile first).
  • Choose breakpoints where the content breaks, not at fixed device widths.
  • Keep reading order the same in every layout.

Interaction states

  • A Width slider and three quick buttons (Narrow, Medium, Wide) with the current layout named.

Motion specification

  • The layout reflows as you drag; no animation.
  • Reduced motion: nothing to change.

Responsive behaviour

  • Test the in-between widths, not just three named sizes.
  • Never hide essential content at small sizes; reorder or collapse it.

Code

HTML
<div class="bx"><div class="pre" id="pre" role="group" aria-label="Preset"><button data-p="0" aria-pressed="true">Narrow</button><button data-p="1" aria-pressed="false">Medium</button><button data-p="2" aria-pressed="false">Wide</button></div><label class="rw">Width <b id="wv">262px</b><input id="wd" type="range" min="200" max="316" value="262"></label><div class="fr" id="fr"><div class="pg" id="pg"><header><b>Brand</b><button type="button" class="bg" aria-label="Menu">&#9776;</button><nav><a>Docs</a><a>Pricing</a><a>About</a></nav></header><div class="gd"><i></i><i></i><i></i><i></i><i></i><i></i></div></div></div><p class="out" id="out" aria-live="polite"></p></div>

Related patterns

Split Pane Resizer

↗
Split Pane ResizerLayout & Scrolling

Bento Grid

↗
Bento GridLayout Structures

Modular Grid, Gutters & Margins

↗
Modular Grid, Gutters & MarginsLayout Structures