Skip to main content
Pricing

Responsive Layout

Responsive layout patterns ensure your interface works across all screen sizes — from 320px mobile to 2560px ultrawide. The approach is mobile-first: start with the smallest layout and progressively enhance as viewport width increases.

Components used

Anatomy

1
Breakpoints sm: 640px, md: 768px, lg: 1024px, xl: 1280px
2
Grid 12 columns at lg+, 8 at md, 4 at sm, 1 (stacked) at xs
3
Container max-width 1280px with auto margins, 16px padding on mobile, 24px on tablet, 48px on desktop
4
Content max-width prose content capped at 720px for readable line lengths
5
Sidebar + content sidebar becomes overlay on mobile, fixed on desktop

Best practices

Breakpoints

Use four breakpoints: 640px (sm — large phones), 768px (md — tablets), 1024px (lg — small desktops), 1280px (xl — standard desktops). Design mobile-first and add complexity at larger breakpoints.

Grid behaviour

12 columns on desktop (lg+), collapsing to 8 on tablet (md), 4 on mobile (sm), and full-width stacking below 640px. Use the Grid System component with responsive column classes.

Stack direction

Horizontal Stacks become vertical on mobile. A row of 3 cards becomes a single column. Metric Row wraps to 2×2 on tablet and stacks vertically on mobile.

Data Tables

On mobile, Data Tables use horizontal scroll with a sticky first column. The header row remains fixed. Avoid hiding columns — users need the data. Alternatively, switch to a card-based layout for each row.

Typography scaling

Heading sizes scale down on mobile. Display 2XL (48px) becomes XL (32px). Body text remains 14–16px across all sizes. Line length should stay between 45–75 characters for readability.

Cards

Card grids follow the breakpoint pattern: 3-up on desktop (lg+), 2-up on tablet (md), 1-up on mobile (sm). Cards should have consistent heights within a row — use min-height or stretch alignment.

Responsive behaviour

These patterns are inherently responsive — the whole page is about responsive behaviour.
Test at 320px, 375px, 768px, 1024px, 1280px, and 1440px.
Use CSS container queries for component-level responsiveness where supported.
Always test with real content — placeholder text hides layout issues.

Accessibility

Content reflow must work at 400% zoom (WCAG 1.4.10) — no horizontal scrolling for text content.
Touch targets must be at least 44×44px on mobile (WCAG 2.5.8).
Focus order must follow visual order — do not use CSS order or flex-direction: row-reverse to rearrange content.
Hidden content (e.g., collapsed sidebar) must also be hidden from screen readers with aria-hidden or display: none.
Ensure text remains readable at all viewport sizes — minimum 16px body text on mobile.