Skip to content
NewTemplates & toolkits are on the way — join the waitlist
Hecham Gazhi

UI Design · Lesson 08 / 12

Icons & imagery

How to choose, size and use icons consistently, when to add labels, icon accessibility and RTL mirroring — plus choosing photos and illustrations, aspect ratios, alt text and image performance.

5 min read · 5 quiz questions

What icons are for

Icons are small symbols that represent actions, objects or ideas. Used well, they speed up recognition, save space and add visual rhythm. Used badly, they become a guessing game.

Icons work best when they're familiar (a magnifying glass for search), paired with text when meaning isn't obvious, and consistent in style across the whole product.

Icon styles

StyleDescriptionGood for
Outline (line)Drawn with strokes of equal widthMost UI; light, modern feel
Filled (solid)Solid shapesSelected states, small sizes, strong emphasis
DuotoneTwo tones or opacitiesMarketing pages, feature illustrations
Rounded / sharpCorner and stroke-end styleMatching the brand's shape language

A common pattern in tab bars: outline icons for unselected tabs and filled icons for the selected one. It adds a second cue besides colour.

Consistency rules

  • Use one icon set throughout (e.g. Lucide, Phosphor, Material Symbols, SF Symbols, Heroicons). Mixing sets creates subtle inconsistencies in stroke, corners and proportion.
  • Keep the same stroke width (commonly 1.5 or 2px at 24px) and corner style.
  • Design on a pixel grid with a set of sizes: 16, 20, 24 and sometimes 32px.
  • Icons in a set are drawn inside a bounding box with padding (e.g. a 24px box with a 20px live area), so circular and square icons look the same size.
  • Align icons with text: vertically centre them with the text's cap height or x-height, not just the box.

Icons and labels

Very few icons are understood by almost everyone without a label: search, home, close (×), menu (☰), settings (gear), share, print. Even these vary across cultures and platforms. Many others — like a star (favourite? rating? featured?) or a heart — are ambiguous.

Do

  • Add a visible text label when meaning isn't certain.
  • Use labels in navigation (tab bars, sidebars).
  • Test unlabelled icons with users before relying on them.
  • Use tooltips on desktop for icon-only toolbar buttons — as a backup, not the only label.

Don't

  • Invent new metaphors for common actions.
  • Use the same icon for different actions.
  • Rely on hover-only tooltips on touch devices.
  • Use icons as decoration next to every heading.

Icon accessibility

  • Icon-only buttons need an accessible name: aria-label="Close" or visually hidden text.
  • Decorative icons next to text should be hidden from screen readers with aria-hidden="true", so the label isn't read twice.
  • Meaningful icons (like a warning icon with no text) need a text alternative.
  • Contrast: icons that convey information need at least 3:1 contrast with the background.
  • Touch targets: a 24px icon button still needs a 44–48px tappable area.
Examplehtml
<!-- Icon-only button -->
<button type="button" aria-label="Close dialog">
  <svg aria-hidden="true" width="24" height="24">…</svg>
</button>

<!-- Icon + visible text: hide the icon from screen readers -->
<button type="button">
  <svg aria-hidden="true">…</svg> Download
</button>

Icons in right-to-left layouts

When the interface is mirrored for Arabic, some icons must be mirrored and others must not:

MirrorDon't mirror
Back / forward arrowsPlay, pause (media controls follow the timeline convention)
Chevrons in navigation and listsClocks and refresh icons that show clockwise motion
Undo / redo (depending on context)Checkmarks, plus, close
Text alignment, indent, list iconsLogos, brand marks and real-world objects (a phone, a camera)
Send / reply arrowsIcons containing Latin text or numbers

Choosing imagery

Images — photos, illustrations, 3D renders — set the mood and can explain things faster than text. They should always support the content.

Photography

  • Prefer real photos of your product, team and customers (with permission) over generic stock.
  • If you use stock, avoid clichés (handshakes, people laughing at salads) and choose images that reflect your real audience.
  • Keep a consistent treatment: colour grading, crop style, lighting.

Illustration

  • Great for empty states, onboarding and explaining abstract ideas.
  • Define a style (line weight, palette, level of detail) and stick to it.
  • Represent people diversely and respectfully.

Product screenshots and mockups

  • Show the real product, cropped to the relevant part.
  • Use real-looking data, not lorem ipsum.

Image sizing and performance

  • Define a few aspect ratios and reuse them: 16:9 (video, hero), 4:3, 1:1 (avatars, products), 3:4 or 4:5 (portraits, social).
  • Use object-fit: cover with focal points so important parts aren't cropped out.
  • Serve images in modern formats (WebP, AVIF) and at the right size for the screen — a 4000px photo in a 300px card wastes data.
  • Use SVG for icons and simple illustrations — they're sharp at any size and tiny.
  • Lazy-load images below the fold and always set width and height to avoid layout shift.
  • Write alt text for informative images (describe what matters, not "image of"); use alt="" for decorative images.

Example · Writing alt text

Decorative background pattern → alt="".

Product photo → "Black leather backpack with two front pockets and brown straps".

Chart → summarise the insight: "Sales grew from 120 to 340 orders per month between January and June".

Key takeaways

  • Use one consistent icon set with fixed sizes, stroke width and corner style.
  • Pair icons with text whenever meaning could be unclear; test unlabelled icons.
  • Icon-only buttons need accessible names and large touch targets; hide decorative icons from screen readers.
  • Mirror directional icons in RTL, but not media controls, clocks or logos.
  • Choose imagery that supports content, use consistent ratios, optimise formats and write meaningful alt text.

Exercise

Audit icons in an app

  1. Screenshot every icon in one app you use.
  2. Check whether they come from one consistent set (stroke, corners, size).
  3. List the icons whose meaning isn't obvious without a label.
  4. Decide which icons would need mirroring in an Arabic version.
  5. Write alt text for three images in the app.

Test yourself

Icons & imagery quiz

5 questions. Score 70% or more to complete the lesson.

  1. 1.When should an icon have a visible text label?
  2. 2.Why use a single icon set?
  3. 3.An icon sits next to the visible text 'Download'. What should the icon have?
  4. 4.In an Arabic (RTL) interface, which icon should be mirrored?
  5. 5.A purely decorative image should have…