Day 02 Core Concepts

Responsive Design

Tailwind is mobile-first. Start with mobile styles, then add breakpoint prefixes to override for larger screens. This lesson covers the breakpoint system and common responsive patterns.

~1 hour Hands-on Precision AI Academy

Today’s Objective

Tailwind is mobile-first. Start with mobile styles, then add breakpoint prefixes to override for larger screens. This lesson covers the breakpoint system and common responsive patterns.

Add a breakpoint prefix before any utility to apply it at that screen size and above. No breakpoint = applies to all sizes (mobile first).

Breakpoints
BREAKPOINTS
sm: 640px+
md: 768px+
lg: 1024px+
xl: 1280px+
2xl:  1536px+
Mobile-first pattern
MOBILE-FIRST PATTERN


Main content
Sidebar

Big Heading

Card
Always design mobile first. Start without a prefix. Then add md: or lg: to adjust for larger screens. Adding breakpoints to 'undo' mobile styles is a sign you started desktop-first.

Common Responsive Patterns

Responsive navbar
RESPONSIVE NAVBAR
Card grid
CARD GRID

Card Title

Description text here.

📝 Day 2 Exercise Build a Responsive Dashboard
  1. Build a full-page layout: sticky navbar, sidebar that collapses on mobile, main content area.
  2. The sidebar should be hidden on mobile and visible on lg: screens.
  3. Build a stats row: 1 column on mobile, 2 on sm, 4 on lg.
  4. Build a data table that's scrollable horizontally on mobile (overflow-x-auto).
  5. Test by resizing the browser window through all breakpoints.

Supporting Resources

Go deeper with these references.

Tailwind CSS
Tailwind CSS Documentation Complete class reference, configuration guide, and responsive design docs.
→
Tailwind UI
Tailwind UI Component Library Official component library showing production patterns for common UI elements.
→
GitHub
Awesome Tailwind CSS Community collection of Tailwind plugins, tools, and starter templates.
→

Day 2 Checkpoint

Before moving on, make sure you can answer these without looking:

Continue To Day 3
Components and Reuse
→