CSS components that another person can maintain

By Gyata Tabiri · Revised November 2, 2026

Two cards can look alike and still need different rules. One may introduce a project; another may collect a decision. I would understand that difference before deciding they belong to the same component.

Compare a second real use

The first instance tells us what one page needs. A second shows which choices recur. A longer title, a missing image, or an extra action can reveal that the original pattern relied on content being unusually cooperative. Those variations are useful evidence before an abstraction becomes a rule.

Share the parts that mean the same thing

A repeated radius or spacing value may belong in a common style. A project cover and a product photograph may need different image treatment. Sharing everything can make each exception harder to express; sharing nothing leaves ordinary changes scattered across the site.

Include behavior in the definition

A navigation item has more than its resting appearance. Focus, expanded state, and the current destination can all change what it communicates. I want those states considered alongside the layout, with names that help another developer see what is meant to change.

Keep the component open to real content

Before calling a pattern reusable, try an awkward heading, a narrow width, and a missing optional element. If those ordinary changes require unexplained overrides, I would revisit the boundary. The component should describe the repeated need rather than preserve one fortunate screenshot.

A useful abstraction removes repeated decisions while leaving the important differences visible. That balance is more interesting to me than how many components a project can claim to have.

Read alongside: Naming shared design decisions · Introducing a pattern into existing CSS.