🍋
Menu
Best Practice Beginner 2 min read 309 words

Icon Design and Usage Best Practices

Choose, implement, and maintain icon systems for web applications with consistent sizing, spacing, and accessibility.

Key Takeaways

  • Icons communicate faster than text when used correctly.
  • ## Icon Best Practices Icons communicate faster than text when used correctly.
  • ### Icon + Text is Almost Always Better Research consistently shows that icons alone are slower to interpret than icon + text labels, except for universally understood icons (close/X, play/pause, search magnifying glass, home).
  • Never rely on the title attribute for accessibility — screen readers handle it inconsistently, and it requires hover (not available on touch devices).

Icon Best Practices

Icons communicate faster than text when used correctly. They fail when they're ambiguous, inconsistent, or used without text labels to clarify their meaning.

Icon + Text is Almost Always Better

Research consistently shows that icons alone are slower to interpret than icon + text labels, except for universally understood icons (close/X, play/pause, search magnifying glass, home). The hamburger menu icon, despite decades of use, still confuses some users. When in doubt, add a text label — it costs a few pixels but eliminates ambiguity.

Consistency Rules

Use a single icon library throughout your application. Mixing outlined icons with filled icons, or different stroke weights, creates visual dissonance. Establish a standard size (16px inline, 20px in buttons, 24px standalone) and stick to it. All icons should share the same visual weight — a thin-lined icon next to a bold one looks inconsistent.

SVG Implementation

Use inline SVG for icons that need to be colored with CSS (currentColor inherits the parent's text color). Set width and height attributes for proper sizing, and include a viewBox for scaling. Add aria-hidden="true" when the icon is decorative (accompanied by text), or role="img" with an aria-label when it's the only content.

Icon Accessibility

Every functional icon needs an accessible name. For icon buttons, use aria-label on the button element. For icon links, use visually hidden text inside the link. Never rely on the title attribute for accessibility — screen readers handle it inconsistently, and it requires hover (not available on touch devices).

Performance

An SVG icon sprite (symbols referenced by use) loads all icons in one HTTP request. For large icon sets, consider loading icons on demand using dynamic imports. Icon fonts (like Font Awesome) are falling out of favor due to rendering issues, FOUT (flash of unstyled text), and the inability to use multiple colors.

관련 도구

관련 포맷

관련 가이드