Marcus Andrey Study
Ler em português Library

Design Systems · Step 4 · 7 min read

Icons and illustration in the system

Icons are a component family with their own grid, sizes and names; illustrations are a voice in pictures. How Harbour draws icons on one grid, picks three sizes, names them by meaning, marks them up for screen readers, and keeps illustration for the moments that need it.

An icon is the smallest component in the system, and the easiest one to get wrong in public. Three designers draw three ticket icons in a week, each on a different grid, with a different stroke. Each one is fine on its own. Side by side in a toolbar, they look like three products. Icons need the same things as any component: rules, names, sizes, states and accessibility, written down once.

What you'll be able to do after reading:

  • Set the drawing rules for an icon family: grid, live area, stroke
  • Choose a small set of icon sizes, each with a job
  • Mark up decorative, meaningful and icon-only uses correctly
  • Decide where illustration belongs in a product, and where it doesn't

1. One grid, one family

The Ticket icon on a 24 by 24 grid, drawn inside a 20 by 20 live area with a 2 pixel stroke.
Four icons, one family, three sizes
16 px · inside compact buttons and tables
20 px · next to 16 px text
24 px · alone, in a 44 px target
Harbour's icon rules, drawn. Every icon sits on a 24 px grid, inside a 20 px live area (the shaded square), with a 2 px stroke and round joins, so a ticket, a ship, a clock and an alert look like one family. Three sizes cover the product, each with a job; IBM Carbon makes the same kind of choice with 16, 20, 24 and 32 px.

Harbour's icon rules fit in one sentence: a 24 px grid, a 20 px live area, a 2 px stroke with round joins and caps. The live area is where the drawing sits; the 2 px around it is breathing room, so icons line up with each other and with text. Round joins match Harbour's 8 px control radius. These are Harbour's choices, not a standard: what matters is that there's one set of choices and every icon follows it.

Public systems publish theirs. IBM Carbon: "Carbon components typically use icons on 16px artboards. Icons on 20px, 24px, and 32px artboards can also be used within the UI", and "All touch targets for interactive icons need to be 44px or larger" (Carbon, Icons). Atlassian asks for icons that work "as a cohesive system by adhering to consistent size, shape, and style guidelines across the entire set" (Atlassian, Iconography).

Sizes are tokens. Harbour has three, icon.size.sm (16), md (20) and lg (24), each with a job: compact buttons and tables, next to body text, alone in a 44 px target. A fourth size needs a reason.

Material Symbols shows another approach: one variable font with four axes, fill, weight, grade and optical size, where optical size runs from 20 to 48 dp and adjusts the stroke so an icon looks the same at every size (Google Fonts, Material Symbols guide). If you use a ready-made set like that, your system's job is to pick the settings and write them down as tokens.


2. Names by meaning

An icon library is searched by name, so names are its API.

  • Name what it shows: ticket, ship, clock, alert. Not icon-37 or blue-ticket.
  • Document what it means in your product. clock might mean "departure time" in the app and "history" somewhere else. NN/g found that "universal" icons are rare: home, print and the magnifying glass for search are among the few most people recognise (Harley, Icon Usability, NN/g, 2014).
  • One icon, one meaning. If alert means "warning" on one screen and "cancelled" on another, people learn nothing from it.

NN/g's conclusion is the rule Harbour follows: "a text label must be present alongside an icon to clarify its meaning". Atlassian says the same: "Use text labels to support icons wherever possible". An icon-only button is the exception, kept for a few well-known actions like close, and it still has a name for screen readers.


3. Three jobs, three kinds of markup

Decorative, next to its wordsThe label already says it; the icon is hidden from screen readers
<button>
  <svg aria-hidden="true" …>
  Show ticket
</button>
Meaning, with words beside itThe status is in the text, so colour and shape only support it
Cancelled
<span>
  <svg aria-hidden="true" …>
  Cancelled
</span>
Icon only: needs a nameThe name says what it closes; the target is 44 px
<button aria-label="Close ticket">
  <svg aria-hidden="true" …>
</button>
Three jobs an icon can have, and the markup each one needs. Most icons in a product are the first kind. The third is the one that breaks: without aria-label, a screen reader announces only "button".
  • Decorative, next to its words. The label already says everything, so the icon gets aria-hidden="true". MDN lists "purely decorative content, such as icons" as what aria-hidden is for (MDN, aria-hidden). Most icons in a product are this kind.
  • Meaningful, with text. The status "Cancelled" is in words; the icon and colour support it. A meaningful icon still needs 3:1 contrast against its background (W3C, Understanding 1.4.11).
  • Icon only. The button needs an accessible name, here aria-label="Close ticket", that says what it does, not what it shows: "Close ticket", not "X". W3C's tutorial on functional images makes the same point: the text alternative "should convey the action that will be initiated", "rather than a description of the image" (W3C, Functional images). Without it, a screen reader says only "button" (W3C, Understanding 1.1.1).

The Icon component should make the first case the default: hidden unless you give it a label. That way the safe choice is the easy one.


4. Delivering icons

  • One source. The icons live in one place, as SVG, and both the Figma library and the code package are built from it. Two sets drawn separately will drift.
  • As a component. <Icon name="ticket" size="md" />, with the colour from currentColor, so it follows the text or the button it sits in, in every mode.
  • Reviewed like components. A new icon goes through the same request as a new component: what it means, where it's used, does an existing one already do the job.
  • Retired properly. A renamed or removed icon is a breaking change for everyone who used it (Deprecation and breaking changes).

5. Illustration: a voice in pictures

Illustration is where a system's voice becomes visible. Atlassian describes it well: "Illustrations help convey complex ideas in a simple way. They should be meaningful and reflect a user's context and emotional state", and points to empty and error states as typical places (Atlassian, Illustrations).

Harbour's rules for illustration:

  • Few places, on purpose. Empty states, onboarding, the "sailing cancelled" screen. Not on every card.
  • Never the only instruction. The words and the button carry the message; the picture supports the tone.
  • Tone follows the moment, like the words in Content and voice in the system: a calm sea for a cancelled sailing, not a cartoon storm.
  • Built from the system: Harbour's colour tokens, in both modes, with alt text written like any other content, or empty alt when it's decorative (W3C, Decorative images).

Photography and generated images have their own rules. The Photography and Imagery course covers them, and An image style guide in your design system shows how to make them part of the system.


6. Common mistakes

  • Icons from three sources, on three grids, in one toolbar.
  • New icon sizes for every screen.
  • Icon-only buttons without an accessible name, or named after the drawing ("X", "hamburger").
  • Decorative icons read aloud next to their own label: "ticket, Show ticket".
  • One icon meaning different things in different places.
  • Illustration used as decoration everywhere, until nobody notices it where it matters.

7. Vocabulary

Term Meaning
Icon grid The square every icon is drawn on, like 24 by 24 px
Live area The part of the grid where the drawing sits, inside the padding
Optical size Adjusting an icon's stroke to its size, so it looks the same small and large
Decorative icon An icon that repeats what the text says; hidden from screen readers
Accessible name What a screen reader calls a control; for icon-only buttons, an aria-label
Spot illustration A small illustration for one moment, like an empty state

8. Try it (no tools needed)

  1. Take a screenshot of one screen in a product you know, and circle every icon.
  2. For each one, write: what it shows, what it means here, and whether there's a label.
  3. Mark any icon whose meaning you had to guess.

Reflection questions: How many different stroke weights or styles can you see? Which unlabelled icon would you give a label first?


9. If you already practise

  • Publish the icon grid and the size tokens on the system site, with a downloadable template.
  • Build Figma and code icons from one SVG source, and check in CI that every icon has a name and a size.
  • Make the Icon component hidden by default and require a label for icon-only buttons.
  • Keep a short list of where illustration is allowed, with an example of each.

Checklist

Learn more

Books, courses and videos to go deeper

Book links go to Amazon. As an Amazon Associate I earn from qualifying purchases, at no extra cost to you.

Content and voice in the system · Building a Figma library · An image style guide in your design system · Photo, illustration or nothing · Alt text that helps · Accessible components · Deprecation and breaking changes

Saved only on this device.

↑ ↓ to move · Enter to open · Esc to close