Skip to content
IconSearch logoIconSearch

Design systems

How to build a consistent icon system for your UI

Build a consistent UI icon system with a shared SVG library, a size scale, semantic names, and a migration checklist for designers and developers.

Six engraved icon tiles arranged on graph paper in a two-row grid

Build an icon system around a shared set of actions, one primary library, and a few rules for size, color, and state. Start with an interface that already has icons, such as a dashboard toolbar. List each action and the symbol it uses. If search, filters, or settings have different symbols elsewhere in the product, resolve those differences before adding new icons.

Choose a baseline and test it in context

Pick a primary library and style. Compare a few common symbols at the size they will actually appear, alongside your text and controls. A calendar and a settings gear may share a 24 px viewBox but still feel uneven if one uses more whitespace or a heavier stroke.

A practical starting scale is 16 px for table toolbars, 20 px next to body text, and 24 px for navigation. Adjust the drawn icon independently of the button or link that contains it. Keep the spacing to labels and the focus treatment consistent within each component.

Compare the same tasks across libraries

Choose five common actions and compare the matching icons in each candidate library. Inspect stroke weight, corner shape, visible padding, small-size clarity, and whether you can find a coherent variant for active and inactive states. Render each candidate beside the font the product already uses. The comparison should include the actions your product repeats and the symbols it rarely needs.

Review the library’s maintenance, source, and license alongside the artwork. A large collection is useful only if it covers the team’s actual interface. Start the comparison with the Lucide and Heroicons guide or browse the full library directory.

Give each action a stable name

Document the action name, the icon and library that represent it, and any exceptions. For example:

  • Search uses a magnifying glass. The search field or button provides the label.
  • Filter uses a funnel. A count or visible label conveys when filters are active.
  • Delete item uses a trash can next to a visible label in menus. An icon-only button needs an accessible name that makes the action clear.

Use the same action names in your design components and code. This lets teams change the icon library later without renaming every component or rethinking every symbol.

Keep a small registry

Record the action, source icon, and any rules about where it appears. A lightweight registry can live next to the shared components. For example:

// icon-registry.ts
export const iconRegistry = {
  search: { source: 'Lucide', icon: 'search', label: 'Search' },
  filter: { source: 'Lucide', icon: 'funnel', label: 'Filters' },
  deleteItem: { source: 'Lucide', icon: 'trash-2', label: 'Delete item' },
} as const

The label here is a default. The actual control may need context, such as “Search orders” or “Delete draft invoice.” Teams can map the registry’s action keys to named component imports and keep the same identifiers in design documentation. For shared UI, review new additions in both places before adopting them across screens.

Define rules for states and exceptions

Write down the roles your team uses for the standard sizes. For example, a table may use a 16 px drawn icon inside a larger target, while a top-level navigation item uses 24 px. Set the icon color from the surrounding text or a semantic design token so theme changes apply to the symbol. Use a separate rule for multicolor artwork or product marks.

Keep focus visible around the control. Selected states can pair a filled glyph with a clear visual treatment and a semantic state such as aria-current or aria-pressed, depending on the component. When you add a custom icon, document why the primary library did not cover the action, align its artwork with your existing icons, and keep its source and license record with the asset.

Align the design library with the React components

Give each entry three identifiers where the team needs them. The semantic key describes the action, for example removeFromList. The design library has a matching searchable name, such as “Remove from list.” The registry points to the current SVG or upstream component. With that mapping in place, a team can replace artwork without renaming the action across dozens of screens.

A common mistake is exposing a library’s entire catalog as the product’s design system. Designers may pick trash, trash-2, and circle-x for similar jobs while code imports all three. Start the shared library with the symbols the team has reviewed. Give each variant a role. For example, a bookmark may have outline and selected artwork, while a warning uses one drawing plus a message and status token. Store icon size, icon-to-label spacing, and focus treatment with the control component so the same icon behaves consistently wherever it appears.

Decide what belongs in the shared icon library

The work of owning an icon includes reviewing source changes and testing it at small sizes. Promote an icon to the shared library when multiple features need the same action or when an important pattern should stay consistent. Leave one-off artwork, product illustrations, and partner marks with the feature or brand assets unless there is a reason to share them.

For custom SVGs, keep the source file and record who maintains it. Check the output for a preserved viewBox, intended stroke and fill values, and unique IDs if it uses a gradient or clip path. A simple decorative icon can inherit text color. A partner mark may need its original colors and a specific name. Record where exceptions apply so someone updating a theme can see which assets to review.

Migrate a settings screen in stages

Suppose a product has a gear next to the Settings navigation item, another gear in a user menu, and sliders beside the Preferences page. Open those screens with realistic content and decide which controls lead to the same place. If Settings and Preferences are different destinations, give them distinct shared keys and labels. If they lead to the same screen, choose one label and one mapping before changing the artwork.

  1. Map old uses to supported keys. Record screens, the previous symbol, the intended action, and how the control is labeled. Note problematic cases, such as a gear that opens permissions or security instead of general settings.
  2. Update one component first. Change the shared navigation item and review its default, current, keyboard-focus, and disabled states where applicable. Capture the 16, 20, and 24 px sizes in the themes your product supports.
  3. Move callers in small batches. Confirm that each feature still uses the right label and behavior. For an icon-only action, verify that the component still supplies the accessible name and any selected state.
  4. Check for remaining imports. Search the codebase and design file for the old name before marking it deprecated or removing its asset. Tell users of your component library which key replaced it.

Teams can add a focused test to confirm every approved key points to an available component. A visual review or screenshot comparison also helps catch alignment changes when an upstream library version changes. Use the React SVG guide for code and the accessibility guide for interactive states.

Review new icons with the same checklist

Before accepting a new icon, answer four questions with its intended screen open:

  • Does the action already have an icon? If so, reuse it and clarify the label before adding another variant.
  • Does the symbol match the neighboring icons? Compare the smallest intended size, stroke weight, padding, and light or dark theme.
  • How will people know what it does? Identify the text label, status message, or accessible name that provides meaning.
  • Can someone maintain the asset next quarter? Keep a source link, package or file version, relevant license record, and a named owner or team. Use the icon license guide to find the source terms for a library.

If one team needs an exception, record the context and choose a review date or a condition for reuse. This gives future contributors a reason they can evaluate when the pattern appears on a second screen.

Audit one workflow before rolling out

Take the toolbar through its default, hover, focus, disabled, and selected states. Check it on light and dark backgrounds, at the narrowest supported layout, and with keyboard navigation.

  1. Inventory the existing actions and note cases where the same action has different icons.
  2. Migrate one toolbar or settings screen. Compare before and after with realistic content.
  3. Check small-size legibility, click targets, accessibility names, and keyboard order.
  4. Migrate other screens that use the same actions and remove duplicates when they have no consumers.
  5. Document new library versions or asset replacements alongside your design-system changes.

Use the IconSearch library browser to compare styles in context. For help deciding which symbols need a label, read how to choose UI icons.

Search the SVG icon catalog