Skip to content
tezvyn:
Menu

Component versus pattern in a design system

Source: interviewEasyHow cards are made

Summary

vocabulary precision.

Key points

a component is a single reusable UI building block; a pattern is a documented way of composing components to solve a recurring problem.

Watch out for

using the two terms interchangeably.

What's really being asked

Whether you use design system terminology precisely, separating an atomic building block from a reusable approach to a recurring problem.

The full answer

A component is a discrete, reusable unit of UI, usually shipped as code, with a defined API and states. Examples are a Button, an Input, an Avatar, or a Tooltip. A pattern is a documented, repeatable way of combining components and behaviors to solve a recurring design problem. Examples are a form-validation pattern, an empty-state pattern, or a search-filter-results pattern. Components answer what you build with; patterns answer how to assemble those parts and what UX rules apply. A pattern is often guidance and a recommended composition rather than a single importable file, though some patterns crystallize into higher-order components over time.

The mistakes people make

Using component and pattern as synonyms erases a useful distinction teams rely on. Claiming a pattern is just a larger component misses that patterns include behavior, sequencing, and guidance, not only markup. Saying every pattern must be coded ignores that many live as documentation.

What usually comes next

Can a pattern become a component? Yes, when a composition is common enough it gets packaged. Where do patterns live? Usually in documentation with do and don't examples. Why does the distinction matter? It keeps the component library focused while still guiding composition.

A concrete example

A Button and a TextInput are components, each a coded unit with props and states. A login pattern documents how to compose those components: layout, error placement, validation timing, focus order, and accessibility guidance. The pattern reuses the same components but adds the rules for combining them, which is knowledge the individual components cannot encode on their own. If many teams keep rebuilding the same login arrangement, the team may later package it as a higher-order component, at which point the pattern graduates into a shippable component while its guidance still lives in the documentation.

Interview question

Which best captures the difference between a component and a pattern in a design system?

  • a.A pattern is always smaller than a component
  • b.A component is documentation, a pattern is code
  • c.They are interchangeable terms
  • d.A component is a discrete UI building block; a pattern is a reusable way to compose components to solve a recurring problemCorrect
Why?

Components are atomic, coded building blocks; patterns are reusable compositions and guidance for combining them. The other options invert or conflate the terms.

Just read this? Test yourself on what you have been reading.

Read the original → uxpin.com

Put your scrolling time to good use

Learn one idea, try a quiz and save useful cards for revision. Tezvyn makes it easy to learn and stay current in your tech field, a few minutes at a time.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon

We are hiring for this. Open roles that interview on design-systems — each one lists the topics its interview covers.

See open roles