Skip to content
Web Development

Figma Breakpoints to Tailwind CSS: How to Map Them

Learn how to turn Figma breakpoints to Tailwind CSS classes: map mobile, tablet and desktop frames to mobile-first prefixes without fighting your layout.

Keshur Gojiya

5 min read

Figma Breakpoints to Tailwind CSS: How to Map Them

To turn Figma responsive breakpoints into Tailwind CSS, build the mobile layout first with no prefixes, then add md: and lg: classes only where the Figma frames differ from the smaller one. Tailwind is mobile-first, so a prefix like md: means "from this width and up", not "only at this width". The mapping is simple once you read your Figma frames as a list of changes between sizes rather than as separate pages.

How do Figma frame sizes map to Tailwind breakpoints?

Designers usually deliver three frames: mobile (often 375 or 390 px wide), tablet (around 768 px) and desktop (1280 to 1440 px). Tailwind's default breakpoints are:

  • sm: 640px and up
  • md: 768px and up
  • lg: 1024px and up
  • xl: 1280px and up
  • 2xl: 1536px and up

A common mapping in my projects is: the mobile frame becomes the unprefixed base styles, the tablet frame becomes md:, and the desktop frame becomes lg: or xl:. A frame's width is a sample, not a rule. A 1440 px desktop frame does not mean the layout changes at 1440 px; it means the layout should look right at that width.

Ask the designer one question before you start: at what width does the layout stop working? If they don't know, you decide from the content, and you tell them what you chose.

Should you build mobile-first even if the design started on desktop?

Yes. Write the smallest layout as your base and add changes upward, even when the designer started on desktop. This produces less CSS, because most properties stay the same across sizes, and it matches how Tailwind's prefixes work.

Avoid this common mistake: writing the desktop layout as the base and then trying to undo it on mobile.

<!-- Avoid: desktop-first thinking, then fighting it -->
<div class="flex-row gap-12 max-md:flex-col max-md:gap-4">

<!-- Do: mobile base, enhance upward -->
<div class="flex flex-col gap-4 md:flex-row md:gap-12">

The second version reads in the same order as the Figma frames: the small layout first, then what changes.

How do you read a Figma frame as a list of changes?

For each section, compare the mobile and desktop frames and write down only what is different. Typical differences:

  1. Direction: a column of cards becomes a row or a grid.
  2. Column count: one column becomes two, then three.
  3. Spacing: section padding grows (for example 48 px to 96 px).
  4. Type size: headings scale up.
  5. Visibility: an element is shown at one size and hidden at another.

Everything that is the same in both frames needs no prefix at all. Here is a section with a heading and three cards, translated this way:

<section class="px-4 py-12 md:px-8 md:py-20">
  <h2 class="text-2xl font-semibold md:text-4xl">Our services</h2>
  <div class="mt-8 grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3">
    <article class="rounded-lg border p-6">...</article>
    <article class="rounded-lg border p-6">...</article>
    <article class="rounded-lg border p-6">...</article>
  </div>
</section>

The tablet frame might show two columns and the desktop frame three, so the grid has md:grid-cols-2 and lg:grid-cols-3. The card styling is identical everywhere, so it carries no prefixes.

What if your Figma breakpoints don't match Tailwind's defaults?

Change Tailwind to fit the design only when the design has a genuine reason, such as a layout that must switch at exactly 900 px. Otherwise, stay with the defaults, because they are familiar to every developer who will touch the code later.

In Tailwind v4 you define custom breakpoints in your CSS:

@import "tailwindcss";

@theme {
--breakpoint-3xl: 120rem;
}

In Tailwind v3 you do the same in tailwind.config.js under theme.extend.screens. Check which version your project uses before copying either snippet.

How do you turn Figma spacing and type into Tailwind values?

Responsive layouts only stay consistent if the numbers come from a system. Figma spacing values usually sit on a 4 or 8 px grid, and Tailwind's spacing scale is built on 4 px steps, so p-4 is 16 px and p-8 is 32 px. When a Figma value has no matching class, don't invent an arbitrary value like p-[37px]. First ask whether the design really needs 37 px or whether it is a drifted 36 px.

Put brand colours, fonts and any real design tokens in the theme once, then use named classes. This is what makes a design update a one-line change instead of a search through every file.

Should the container width change between breakpoints?

Usually yes, but the cleanest approach is one wrapper component with a maximum width and responsive horizontal padding, reused on every section:

<div class="mx-auto w-full max-w-6xl px-4 md:px-8">
  ...
</div>

In React or Next.js this becomes a small Container component. Reusable components are the other half of responsive handoff: if each section has its own width logic, the layouts drift apart. If you are preparing the design side first, see my guide on preparing a Figma file for developer handoff. The Figma to Next.js service page explains how I build these pages from a design.

How do you check the result against Figma?

Don't only compare at the three frame widths. Drag the browser from 320 px to 1600 px and watch for:

  • text that wraps awkwardly just before a breakpoint
  • cards that become too narrow between 768 and 1024 px
  • images that stretch or leave empty space
  • touch targets that are too small on mobile

The in-between widths are where most responsive bugs live, because designers rarely draw them. Fix them by adjusting the breakpoint where a layout changes, not by adding extra frames.

FAQ

Does Tailwind have a mobile-first approach by default?

Yes. Unprefixed classes apply at every width, and prefixed classes like md: apply from that breakpoint upward. To style only a range, combine a min-width prefix with a max variant such as md:max-lg:.

What Figma frame width should I design for Tailwind's breakpoints?

There is no required width. Common choices are 375 or 390 px for mobile and 1280 to 1440 px for desktop. What matters is that the design is built with flexible layouts (auto layout in Figma) so the developer can see how it should stretch.

Can I use Tailwind arbitrary breakpoints like min-[900px]:?

Yes, Tailwind supports arbitrary values such as min-[900px]:flex. It is fine for a one-off exception, but if you use the same value in many places, define it as a named breakpoint in your theme instead.

Do I need a separate tablet design?

Not always. If the desktop layout simply collapses well, the developer can derive the tablet view. A tablet frame helps most when the navigation, grids or sidebars change significantly.

Key takeaways

  • Build the Figma mobile frame as your base styles and add md: and lg: classes only for what changes.
  • Treat frame widths as examples; choose breakpoints from where the layout actually breaks.
  • Stay with Tailwind's default breakpoints unless the design has a real reason to differ.
  • Test every width between the frames, not just the three the designer drew.

Tags

  • Figma
  • Tailwind CSS
  • Responsive Design
  • Next.js

About Keshur Gojiya

Web developer and HTML email specialist with 6+ years of experience, building websites and emails for businesses, startups and agencies.

Get to know me
Keep Reading
View All Articles
  • Web Development

    7 min read

    WordPress to Next.js Migration Checklist: 6 Stages in Order

    A WordPress to Next.js migration checklist in six stages: audit, build, redirects, staging QA, launch day and the first weeks, so nothing gets lost.

    • WordPress Migration
    • Next.js
    Keshur Gojiya
  • Web Development

    6 min read

    How to Hire a Next.js Developer: What to Check and Ask

    How to hire a Next.js developer: what to check in their work, questions to ask before you sign, red flags, freelancer vs agency, and how to write a clear brief.

    • Next.js
    • Best Practices
    Keshur Gojiya
  • Web Development

    7 min read

    Is a Headless CMS Good for SEO? What to Set Up

    Is a headless CMS good for SEO? Yes, if the site is built right. The checklist: rendering, SEO fields, URLs, sitemaps, redirects, images and page speed.

    • SEO
    • Sanity CMS
    Keshur Gojiya

Need help with an email or website?

If an email is breaking in Outlook or dark mode, or you have a design that needs building, tell me about it and I’ll reply with next steps.

Email me