Glossary · Web Development

Component

kum-POH-nuntnoun

A component is a self-contained, reusable piece of a user interface, such as a button, form, or card.

Part of speech
noun
Pronunciation
kum-POH-nunt
Origin
From Latin 'componere,' to put together. In software it names a self-contained, reusable building block of an interface.

What is Component?

A component is a self-contained, reusable piece of a user interface. It is a discrete building block, such as a button, a form, a navigation bar, a search box, or a product card, that bundles together everything it needs to look and work correctly, and can then be dropped into a page wherever it is required. Rather than building each screen as one large, undifferentiated block of markup and code, developers assemble interfaces from many of these smaller parts, much like constructing something from standardized bricks.

What makes a component powerful is that it packages structure, appearance, and behavior into a single unit. A button component, for instance, might contain the markup for its shape, the styling that gives it its look, and the logic that defines what happens when it is clicked, all in one place. Components can accept inputs, often called props, which customize how they render: the same button component can display different text, colors, or actions depending on the values passed to it. Components can also contain other components, so a checkout form might be built from input field components, a button component, and a summary component, each nested inside the larger whole. This composition lets teams build complex interfaces out of simple, well understood pieces.

The word traces back to the Latin componere, meaning to put together, and in software it names exactly that: a self contained part assembled into a larger whole. The idea of building software from reusable components is decades old, but it became central to front end web development with the rise of component based frameworks, which organize entire applications around this pattern and made it the default way modern interfaces are built.

For a business, the component model translates directly into speed, consistency, and lower maintenance cost. Because a component is written once and reused everywhere, teams build faster and avoid reinventing the same elements on every page. Consistency comes almost for free: if every call to action uses the same button component, the whole product looks and behaves uniformly, which strengthens brand and improves usability. Maintenance becomes far cheaper too. When a change is needed, such as updating a color or fixing a bug in how a form validates, it is made once in the component and takes effect everywhere that component appears, instead of hunting down dozens of duplicated copies across the site.

The main nuances involve getting the boundaries right. A common mistake is making components too large and monolithic, so they try to do too much and lose their reusability, or conversely splitting them so finely that the codebase becomes a maze of tiny fragments. Good components have a clear, single responsibility and a clean interface for the inputs they accept. Well designed components are also ideally kept free of assumptions about where they will be used, so they remain genuinely portable. Components relate closely to several adjacent ideas. They are frequently written using JSX, they rely on state management to track and update their changing data, they render through a framework's virtual DOM, and a curated collection of shared components forms the basis of a design system that keeps an entire product visually and functionally coherent.

Why it matters

Components speed up development and keep an interface visually consistent, which lowers cost and improves the user experience.