StoicBuilder

HandbookVI the AtriumResponsive design

VIthe Atrium, Design the experience

Responsive design

1 min readUpdated 28 November

In plain words

Responsive design means one layout that rearranges itself for the screen it's on, stacking into a single column on phones and spreading out on wider screens.

Where you see it

QuickBite's menu shows three columns of dishes on a laptop, two on a tablet and one on a phone. In Tailwind code, prefixes like md: and lg: mark the widths where the layout changes.

components/MenuGrid.tsxbrowser
<div className="grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3"> {dishes.map((d) => <DishCard key={d.id} dish={d} />)}</div>
Unprefixed classes are the phone layout. md: applies from 768px wide, lg: from 1024px.

What goes wrong

  1. Reading sm: as "on small screens"

    Tailwind starts from the phone, and sm: means 640px and wider. This line gives phones the large text and laptops the small.

    <p className="text-lg sm:text-sm">
  2. A wide table on a narrow screen

    A ten-column orders table either squashes into unreadable slivers or pushes the whole page sideways. On phones, show each row as a card, or let only the table scroll.

  3. Tap targets sized for a mouse

    Links that are easy to click are hard to tap. Aim for about 44 pixels square for anything a thumb has to hit.

What to tell your agent

Copy this into Lovable, Bolt, Cursor or any agent
Rework this page mobile-first: design the phone layout first, then add changes for wider screens at our existing breakpoints. Turn wide tables into stacked cards on phones, and make every tap target at least 44 pixels tall.

Quick check

Sign in to earn +10 XP for it

Quill's editor looks fine on a laptop, but on phones the sidebar squeezes the note into a strip 100 pixels wide. What's the usual fix?

Got a prompt that touches responsive design?

Paste it. You get a better prompt first, then the cards that explain it.

Check your own prompt

Free, no sign-up.