The Components Layer: UI Patterns and Widgets
You'll learn how to define complete, styled UI components like buttons, cards, and navigation in the ITCSS Components layer.
What Are Components?
In ITCSS, the Components layer is where you build the recognizable, reusable pieces of your user interface. Think of components as the "finished products" of your design system—complete UI patterns that users actually interact with, like buttons, cards, navigation menus, modals, and forms.
Unlike the Objects layer (which provided unstyled layout primitives), components are fully designed. They have colors, borders, typography, spacing, and states (hover, active, disabled). They're the visual building blocks your users see and click.
Why This Layer Matters
Components sit near the tip of the inverted triangle in ITCSS, meaning they're highly specific and can override earlier layers. This is exactly where you want your branded, opinionated design decisions to live.
Analogy: If the Objects layer gave you blank Lego bricks in different shapes, the Components layer gives you pre-decorated pieces—a red fire truck door, a pirate flag, a castle window. They're complete, purpose-built elements.
Naming Components
Using BEM conventions (from earlier lessons), you'd name component classes like:
.button,.button--primary,.button--large.card,.card__header,.card--featured.nav,.nav__item,.nav__item--active
Each component is a self-contained block with its own elements and modifiers.
Key Takeaway: The Components layer defines complete, designed UI patterns with specific styles, bringing together all previous ITCSS layers to create the interactive pieces users recognize and interact with.