INTERMEDIATE · CHAPTER 15 OF 30

Responsive UI Components & Layout

What makes a UI component reusable?

A reusable component has a clear content structure, defined variants, interaction states and layout behaviour. It can adapt within its intended contexts without breaking the task. I test longer labels, empty content and narrow containers before adding it to a shared library.

We’ll create a small UI library and use it across responsive screens. I’ll focus on layout constraints, content hierarchy and component composition so you can build new screens without recreating every decision.

Components respond to their container. The same content model supports both views. Define spacing, wrapping and stacking rules rather than prescribing a single screenshot.
FIGURE I05 Components respond to their container

The same content model supports both views. Define spacing, wrapping and stacking rules rather than prescribing a single screenshot.

Open full-size diagram ↗
  • Wide container: Details and summary sit together
  • Narrow container: Content stacks without losing priority

The principles I want you to understand

A component is a reusable interface element. A variant changes a controlled property such as emphasis or state. A constraint describes behaviour when space changes. A design token names a reusable value such as spacing or colour; a small project can start with documented styles before adopting a larger system.Reference: Figma: create and use variants

Use semantic roles for colour: text-primary, surface-default, action-primary, and feedback-error. That is clearer than telling someone to use “the third green.” Define a modest spacing scale, for example 4, 8, 12, 16, 24, and 32, then use it with judgment.

Let’s build it, step by step

  1. Create text styles for page title, section title, body, label, and help text.
  2. Build buttons with content-driven width, consistent padding, and a minimum practical height.
  3. Build a product card with image, title, description, price, availability, and action. Test long text.
  4. Create a content container that can grow until a chosen maximum width.
  5. Build a multi-column layout, then reduce width until the content becomes uncomfortable. Place a breakpoint because the layout needs it, not solely because a device category exists.
  6. Stack or reorganise content while preserving reading and task order.
  7. Test narrow widths, enlarged text, long labels, missing images, and different item counts.
  8. Annotate the intended behaviour so implementation is not based on screenshots alone.

How I would approach this example

A product grid can show three columns on a wide screen and one on a narrow screen. The product name should wrap rather than disappear. A longer name must not push essential price or availability information outside the card. If uniform card heights are required, decide which content may vary and how actions align.

Your studio exercise

For this exercise, I want you to deliver a component page and three responsive screen states. Include the same screen with deliberately long content. I would consider this exercise ready when text remains usable and the hierarchy survives variation. A prototype is evidence of intended behaviour, not proof that the implemented website behaves correctly; repeat the checks after development.

Ask AI to list potential content edge cases, then choose realistic ones and test them. Keep the resulting rules in your component notes.

✦The brand note

One useful idea about building better brands.

A short weekly note on branding, logo design, UI/UX, visual identity and the real decisions that make a business clearer, more distinctive and easier to trust.