Responsive Components

A component drawn at one width usually breaks at the others. Imagine a booking card designed at 375 px that looks finished in Figma. On a 320 px phone the price slides under the Book button. On a 1440 px desktop the same card stretches into a long row with a wide gap in the middle.

Learn on the move: press play and turn your commute, walk or drive into time that grows your design career.

· Updated November 2026 · Reviewed by Olesia Borysova, lead product designer
Share
Share

So a responsive component carries its own rules for size. It knows how wide it may get, which content must stay, and what it does when space runs out. The page decides where the card sits, and the component decides how it behaves inside that space.

What a Component Decides About Size

Page layout and component behavior answer different questions. The Responsive & Web Layout module in UX Design owns the page: its columns, its breakpoints and where each region goes. A component only knows the space its parent gives it, and that space can change for reasons the page never announces.

That's why a card needs the same rules whether it sits in a phone list, a tablet sidebar or a desktop grid. Apple's Human Interface Guidelines tell iOS designers to base layout on size classes. An iPad app in Slide Over runs at compact width, the same class as an iPhone.

Anatomy of a Responsive Component

A component without size rules gets its behavior by accident. Imagine the bookings app's booking card dropped into three places: a phone list, a 280 px sidebar and a desktop grid. Each time an engineer guesses what should wrap, shrink or disappear, and the three guesses differ.

So a responsive component names its parts in advance. It has a container that sets the space, a resizing rule for each child, a content priority and breakpoints of its own. Together they tell anyone placing the card what happens at any width. Here are those parts on the booking card:

The booking card with its parts named: the container is the space the parent gives the card, the photo is Fixed at 48 px, the price hugs its contents, the name and service fill the container, the details wrap to a new line, and the Book button has a minimum width of 96 px.

The Container Sets the Space

A component responds to the box it sits in. CSS container queries made this possible in code, and web.dev's Baseline tracker lists them in every major browser since February 2023. Before that, a card could only react to the width of the whole window.

That difference matters as soon as the same card appears twice. A 1440 px window can hold a 280 px card in a sidebar and a 640 px card in the main column at once. A window breakpoint treats both as desktop, while a container rule sees the sidebar card as narrow and stacks it.

Here is the booking card at two container widths in one desktop window:

A desktop page of open slots. In the 640 px main column the booking card sits in one row with the price and Book button on the right. In the 280 px sidebar the same card stacks, with its details wrapped and the price and button on their own row.

Resizing Rules for Each Part

Each child inside the component needs its own resizing rule. Figma's auto layout names three: Fixed keeps a size, Hug contents shrinks a frame to what it holds, and Fill container takes the space that is left. Figma also lets you add a minimum and a maximum width to any frame.

In practice the booking card mixes all three. The 48 px provider photo stays Fixed, the price hugs its text, and the column with the name and service fills the middle. The Book button gets a minimum width of 96 px so its label never squeezes. The whole card gets a maximum width of 560 px, so it stops stretching on a wide screen.

So the most common mistake is a card built only from Fixed frames. It looks right at the width it was drawn and clips its content or leaves gaps at every other width. Here is the same card at 320 px, built both ways:

Two phones at 320 px. Wrong: a card built from Fixed frames keeps its 375 px width, so the Book button is cut off at the screen edge. Right: a card built with resizing rules stacks, and everything fits.

Content Priority

Space runs out eventually, so the component has to know what it can give up. A content priority ranks every piece by how much the person needs it to decide. On a booking card the time, the price and the Book button rank highest, because nobody books a slot without them.

So the lower-ranked content gives way first. The rating can drop to a second line, the service title can shorten, and the photo can shrink from 48 to 32 px. Apple's guidelines set the limit on this: keep functionality the same as size classes change. A narrow card may show less text, but it still lets people book.

Here is the booking card's content ranked from must stay to can shorten:

A narrow booking card next to its content priority. Must stay at every width: time and date, price, Book button. Can move to a new line: provider name, duration and rating. Can shorten: the description, cut at two lines, and the photo, from 48 to 32 px.

Breakpoints of Its Own

A component breakpoint is the container width where the component's layout changes. It comes from the content: the card stacks at the width where the name, time, price and button stop fitting on one line. For the booking card that happens at about 420 px.

That's why component breakpoints rarely match the page's. Material 3 sets window size classes at 600 and 840 dp, and IBM Carbon's grid steps at 320, 672 and 1056 px. A card in one column of those grids sees only part of that width, so its own threshold is the number to document.

Here is the booking card on each side of its 420 px breakpoint:

The booking card in a 440 px container sits in a single row. Below a breakpoint at 420 px, the card in a 400 px container stacks, with the price and Book button on their own row.

Pro tip: Write the breakpoint into the component's description in Figma, for example “Stacks below 420 px”. Anyone who selects an instance sees the description, so nobody has to measure the card to find out.

Found this useful? Pass it on.
Share

Why Follow DesignPath for Short Design Lessons?

Following DesignPath gives you short UX lessons, new free guides and course picks in your feed, from the team behind this page.