Naming components so the level is obvious
Suffixes and patterns that tell you whether a component is a foundation, a group, a layout or a feature.

Zander Whitehurst
8 min read
The level of a component should be obvious from its name. If you have to open the file to find out whether something is a button, a group, a region or a wallet, the library is already harder to use than it needs to be. Naming is the part of a component audit that people treat as polish. It is the part that keeps the structure intact after you leave.
Each of the four levels gets its own suffixes and its own pattern. Mixing them is how WalletCardGroup ends up in the composite folder when it is plainly a feature.
Foundation: name what it renders
A foundation name is a concrete noun. It describes what the thing draws, and it stays silent about where the thing is used.
CurrencyFlag works in any product that shows a currency. WiseBadge only works at one company, so the badge is a foundation and “Wise” belongs in the content. DashboardFlag names a destination. SmallButton names a size, which is a prop. GreenPill names a colour, which is a token. Sizes and colours are arguments, and they belong in the prop list, written size="sm" and tone="success".
Pattern: [ConcreteNoun]. If you cannot say the name in a product that is not yours, move the component up a level and give the foundation its generic name back.
Composite: name the group
A composite groups foundations into a pattern. The name says what is being grouped, and it stays domain free.
AvatarGroup tells you the pattern and nothing about the screen. WalletCardGroup only makes sense if you know what a wallet card is, so it is a feature. ButtonRow describes a direction. Rows, stacks and bars are layout. A composite can sit in a row. It is not itself a row.
Pattern: [ConcreteNoun]Group, or cluster, set, pair. The noun is the foundation it groups. If the noun is a product concept, you have named a feature.
Layout: name the region
A layout name describes a region of the page. It should still be accurate if you swapped every child for a grey box.
SideNav, TopBar and MainContent name regions. You can use them on a marketing site and in a banking app. TransactionList is the edge. A list is a layout, and “transaction” is a domain. I keep TransactionList only when the list itself has transaction behaviour, such as a date grouping that no other list shares. If it is a stack of rows with a gap, call it List and let the feature decide what the rows are.
NavWrapper uses a word that means “I did not decide”. TransactionContainer hides a feature inside a layout suffix. SidebarDiv names the HTML element, which is an implementation detail and a hint that the component may not need to exist.
Pattern: [Region]Layout, [Region]Section, [Region]List, or a known region word such as SideNav and TopBar. Wrapper, container and div are banned. They are how empty components survive an audit.
Feature: name the domain, then the form
A feature is allowed, finally, to use the product’s nouns. The name is the domain plus the form it takes on screen.
WalletCard tells you the subject and the form. Card could be anything, so it is not a feature name. It is also a weak foundation name unless your system truly has one generic card. TransactionItem is one transaction in a collection. BalanceHeader is the balance, presented as a header. NavItem is a navigation entry that knows it is navigation in this product. RecipientRow is one recipient, laid out as a row.
WalletComponent adds the word component, which every file in the folder already is. TxnWidget shortens the domain until only the original author can search for it, and widget is not a form anyone can draw.
Pattern: [Domain][Noun], [Domain]Card, [Domain]Item. Pick the suffix from the form the user sees. A header that is secretly a card will be filed and found as the wrong thing.
A rename is a migration, so do it properly
Renaming is cheap in a design file and real in a codebase. Treat it as a change with call sites.
- Decide the level first, using the placement questions. The name follows the level.
- Add the new name as an export alongside the old one.
- Move call sites, highest traffic first. The usage counts from the audit are the order.
- Delete the old export in the same release if the list is short, or in the next one if it is not.
Leave a one line note in the component docs: “Previously GreenPill. Use Badge with tone=\"success\".” People and agents both search for the old name. The note is what makes the search succeed.
I keep the suffix lists in the contribution guide, next to the folders. Foundation, composite, layout, feature, each with the words it may end in and three names it may not. New components get reviewed against that list. The audit built the structure. The names are what stop it drifting back.
Memorisely