Answer 02 of 50
Why Component-Based Design Has Become the Industry Standard
Among front-end frameworks, component-based tools lead the rankings. In the 2025 Stack Overflow Developer Survey, 44.7% of respondents to the web frameworks question had done extensive work in React over the past year, more than any other front-end framework; only Node.js, a JavaScript runtime, ranked higher at 48.7%. Angular (18.2%) and Vue.js (17.6%), both built around components, followed. Older approaches have not disappeared: jQuery still stood at 23.4%.
The reasons are practical. Components break a large interface into pieces that can be built, tested, changed, and shipped separately, and that matters more as an interface grows.
What “standard” means here
The survey numbers come from the 2025 Stack Overflow Developer Survey technology results, for all respondents who answered the question about web frameworks and technologies. A survey of its respondents is not a census of the web, so read “standard” as the default for new front-end work among surveyed developers, not as universal. jQuery, which its own site describes as a library that makes “HTML document traversal and manipulation, event handling, animation, and Ajax much simpler”, still appears in 23.4% of answers.
What a component is
React’s documentation says: “React apps are made out of components.” It defines a component as “a piece of the UI (user interface) that has its own logic and appearance” and adds that “A component can be as small as a button, or as large as an entire page.” Vue’s guide makes the same move: “Components allow us to split the UI into independent and reusable pieces, and think about each piece in isolation.” In Angular, every component combines a TypeScript class, an HTML template, and a CSS selector.
The sources are React’s Quick Start, Vue’s Components Basics, and Angular’s anatomy of a component. Outside any framework, browsers support Web Components, a set of technologies for creating reusable custom elements whose functionality is kept separate from the rest of the page’s code.
Four engineering reasons teams moved to components
Decomposition. A five-page site can be designed and built page by page. An application with hundreds of screens cannot: nobody holds the whole interface in their head, and a change in one place has effects nobody predicted. Components divide the interface into units with defined inputs and outputs. React’s guide to thinking in React applies separation of concerns: “a component should ideally only be concerned with one thing. If it ends up growing, it should be decomposed into smaller subcomponents.”
Testing in isolation. A button component can be tested on its own in every state it supports, such as default, hover, focus, disabled, and loading. Unit tests cover single components; integration tests check that components work together. Tools such as Storybook, which describes itself as “a frontend workshop for building UI components and pages in isolation”, exist for this workflow. When a button misbehaves, the button component is the first place to look, though not the only one: wrong props, overriding CSS, or the code around it can produce the same symptom. Testing every state only works if every state was designed, which is why a complete handoff lists them, as covered in the states and details a design handoff has to specify.
Parallel work. Component boundaries let several people work at the same time without editing the same files. One person builds the header while another builds the card, and their work does not collide as long as they agreed first on what each component accepts and produces. The interface is the contract. More people working at once shortens delivery only when that agreement comes first; without it, the coordination cost moves to the moment the pieces are joined.
Performance control. Component boundaries are natural places to split code, so with code splitting in place, a visitor who does not open the settings page does not download the settings components, and components outside the first screen can load later. Rendering can also be decided per component: React’s documentation describes Server Components as “a new type of Component that renders ahead of time, before bundling, in an environment separate from your client app or SSR server.” Abstraction has a cost too, and on a performance-critical path a deeply nested structure may need flattening.
Consistency: the default, not a guarantee
Component-based consistency is the default, not a guarantee. Use the button component and you get the same button, as long as its props allow only the variations you intend and every product stays on a supported version. The organizational side, meaning tokens, documentation, governance, and the business case for funding it all, is covered in the long-term benefits of design systems.
Atomic Design as a shared vocabulary
Brad Frost’s Atomic Design methodology gave designers and developers common names for levels of an interface:
| Stage | What it is | Frost's example |
|---|---|---|
| Atoms | The smallest interface elements | A label, an input, a button |
| Molecules | Simple groups of elements working as a unit | A search form made of a label, a search input, and a button |
| Organisms | Larger sections combining molecules and atoms | A header with a logo, primary navigation, and a search form |
| Templates | Page-level structures that place components into a layout | A homepage template that includes the header organism |
| Pages | Templates with real representative content in place | The homepage template filled with representative text, images, and media |
The label in the search form is not a detail to drop. W3C’s tutorial on labeling form controls explains that associating a label with its control “ensures that assistive technology can refer to the correct label when presenting a form control.” Frost is explicit that “Atomic design is not a linear process, but rather a mental model to help us think of our user interfaces as both a cohesive whole and a collection of parts at the same time.” You do not have to use his names. React’s thinking guide suggests splitting a design the way you would split code into functions, styles into CSS classes, or a design file into layers, and each route leads to a similar hierarchy.
Designing component APIs
A component’s props are its interface, and their design decides whether people can use it correctly:
- Too rigid, and the component cannot handle legitimate variations. A button that accepts only a text label cannot hold an icon.
- Too flexible, and the component becomes hard to understand. A button that accepts any configuration invites every team to invent its own.
- Composition can replace configuration. A button that accepts children can contain text, an icon, or both, without a special prop for each case.
Start from use cases: which variations exist legitimately, and which ones should be separate components rather than options. Give simple uses sensible defaults, and document what is possible and what is not.
Versioning without breaking everyone
When hundreds of screens use a component, changing its API can break hundreds of screens. Semantic Versioning gives a shared way to signal the size of a change: increase the major version “when you make incompatible API changes”, the minor version when you add functionality in a backward compatible manner, and the patch version for backward compatible bug fixes. Deprecation gives users a transition period, with the old API still working but marked for removal. A changelog explains what changed and why, and a migration guide shows how to update.
Moving an existing codebase to components
Move incrementally. Build new features as components, and extract components from legacy code when you touch it for other reasons. Over time the component-based share grows and the legacy share shrinks. A complete rewrite is a separate and much larger decision, and it is not required to get started.
When components are more than you need
A five-page marketing site can work fine with a few templates and a shared style sheet. A formal component library, with documented APIs, versioning, and tests, starts to make sense when a second product or team begins reusing the same parts.
Questions teams ask
How do we know if a component is too small or too big?
Use reuse and responsibility as the guide. A component used in several places, or one that represents a coherent concept, is probably sized well. One used once that represents nothing on its own may be artificially small. One that does several unrelated things is too big and, in React’s words, “should be decomposed into smaller subcomponents.”
Should we share components between web and mobile apps?
Share what is the same on both platforms. Design tokens for color, spacing, and type can be shared, and some logic can be. Visual components differ more, because web and native platforms have different conventions and building blocks. Compare the cost of keeping shared code working on both platforms with the cost of maintaining two versions.
Different people on our team design component APIs differently. What helps?
Write API guidelines that fix the common conventions: how props are named, how defaults are handled, and when to use composition. Review component APIs as part of code review. Explicit standards make components more predictable for everyone who uses them.
Adopt components where an interface is large enough that separate building, testing, and shipping save more than they cost, agree on each component’s API before parallel work starts, and treat versioning as part of the component, not an afterthought.