Breakpoints
Current breakpoints are Tailwind CSS defaults — mobile-first min-width. No custom values yet; these are not official DavinciUI tokens, they are the implementation defaults used today.
Introduction#
Breakpoints adapt layout to viewport width. DavinciUI currently uses Tailwind's default sm / md / lg / xl / 2xl scale — mobile-first, min-width only. Use them via prefix (md:grid-cols-2). No custom breakpoints are created here; Phase 4 will decide if DavinciUI needs its own.
Info
@tailwindcss/postcss). Verified — no screens override in the repo. Values mirror tailwind.config defaults.Responsive system#
Mobile-first
Unprefixed utilities apply to all widths; prefixed utilities override at that min-width and above. There is no max-width breakpoint — build up from mobile.
Base
grid-cols-1
0 – 639px · single column
md:
md:grid-cols-2
≥ 768px · two columns
lg:
lg:grid-cols-4
≥ 1024px · four columns
Breakpoint scale#
Reference — minimum widths. These are current Tailwind defaults, not custom DavinciUI tokens.
| Breakpoint | Minimum width | Typical usage |
|---|---|---|
| sm | 640px | Phones landscape, small tablets |
| md | 768px | Tablets |
| lg | 1024px | Laptops |
| xl | 1280px | Desktops |
| 2xl | 1536px | Wide screens |
| base | 0px | All devices — no prefix |
Do not call these --breakpoint-* tokens — they are Tailwind's defaults.
Container behavior#
Containers constrain width and center content. DavinciUI docs currently use max-w-* (not container) for prose and layout — documented as current usage.
max-w-sm — 384px · forms
centered · mx-auto
max-w-2xl — 672px · prose
prose measure ~65ch
max-w-6xl — 1152px · docs content (current)
full within content shell (220px sidebar + content)
Docs shell: max-w-6xl mx-auto — used in sizing & docs layout today.
Centered type: max-w-2xl mx-auto — cards, prose.
Narrow: max-w-sm mx-auto — forms, auth.
Tailwind's container is not used in docs today — prefer explicit max-w-*.
Responsive layout#
Live specimen — resize the viewport (or drag the window) to see columns and padding adapt. All classes are real Tailwind.
grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4
Narrow the window below 640px → single column; widen to 640 → two; 1024 → four.
Responsive padding & typography
Responsive heading
Padding: p-4 → sm:p-6 → lg:p-8 · Text: text-base → sm:text-lg → lg:text-xl
Stack on mobile
flex-col sm:flex-row
Gap scale
gap-4 sm:gap-6
Visibility#
Show/hide at breakpoints — use hidden + prefixed block/flex.
| Pattern | Result |
|---|---|
| hidden md:block | Hidden <768, visible ≥768 |
| hidden lg:flex | Hidden <1024, flex ≥1024 |
| md:hidden | Visible <768, hidden ≥768 |
hidden md:block · Resize to see
className="hidden md:block"
block md:hidden · Mobile only
className="block md:hidden"
Current breakpoint indicator — live
Classes: sm: md: lg: xl: 2xl: · Background changes at each breakpoint
Practical examples#
Responsive card grid
Card
1 col → 2 → 3
Card
md is the sweet spot
Responsive container width
w-full max-w-6xl mx-auto px-4 sm:px-6 lg:px-8
Full width on mobile, centered with gutters on desktop — current docs pattern.
Responsive typography
text-3xl md:text-4xl lg:text-5xl
Hero scales with viewport — 30 → 36 → 48px.
DavinciUI
Code pattern · Sidebar + content shell (current)
<div className="flex">
<aside className="hidden lg:block w-[220px] shrink-0">Sidebar</aside>
<main className="flex-1 min-w-0 max-w-6xl mx-auto">Content</main>
</div>
Docs shell pattern — 220px sidebar, hidden below lg, visible at lg+.
Guidelines#
- Mobile-first — start without prefix, add
sm:md:lg:as needed. Base is 0. - Prefer
md(768) for layout shifts (single → two columns);lg(1024) for three/four columns and exposing the 220px sidebar. - Use
hidden md:blockfor progressive disclosure — avoid JS breakpoint listeners for layout. - Containers:
max-w-smforms,max-w-2xlprose,max-w-6xldocs — no customcontainerneeded. - Do not create custom breakpoints now — use Tailwind defaults. Custom values belong to Phase 4 Tokens if needed.
- Test at 640, 768, 1024, 1280, 1536 — and on a real phone width (~375px) where base applies.

