lucky.graphics

guides

Icon Design Principles for Modern Interfaces

Icon design principles for interfaces: grid and keyshapes, stroke vs fill, optical sizing, consistency across a set, SVG production, and accessibility rules for icons in UI.

Published
October 1, 2026
Updated
October 22, 2026
Topic
guides
Reading time
16 min
Review
Reviewed against the primary source

Icon Design Principles for Modern Interfaces

Good interface icons come from a written spec, not taste: one canvas size, one stroke weight, one corner rule and one level of detail for every glyph, simplified until each icon reads at the smallest size you ship. Then make every icon that carries meaning accessible: give it a text name, and give it at least 3:1 contrast against its background under WCAG 2.2.

The consistency part is not just our opinion. Apple's Human Interface Guidelines ask that all interface icons in an app use "a consistent size, level of detail, stroke thickness (or weight), and perspective", and adjust individual icon sizes so they look equal. This guide works through what that means in practice: a concrete grid spec, how to handle small sizes, how outline and fill should divide the work, a worked drawing example, the markup decisions for accessibility, and when to stop drawing and use a library.

What Turns a Collection Into a Set

A set is a group of icons that a viewer cannot tell apart by author. That only happens when the variables that make icons look different are fixed in writing before anyone draws:

VariableWhat to fixWhat goes wrong if it floats
Canvas and paddingOne canvas size and a minimum marginSome icons look cramped, others float
Stroke weightOne width, centered on the pathThin icons look disabled next to heavy ones
Caps and joinsRound or square, chosen onceMixed caps read as two families
Corner radiusA rule by shape sizeSome icons look soft, others sharp
Level of detailA maximum number of interior elementsA detailed printer beside a minimal trash can
PerspectiveFlat front view, or a single consistent angleA 3D box next to a flat folder
Metaphor worldObjects from one domain (office, home, abstract)"Archive" as a box, "delete" as an abstract arrow

The first five are geometry and can be checked mechanically. The last two need a reviewer, which is why every serious set has a review step before a new icon ships.

A Documented Grid Spec to Start From

Rather than inventing numbers, it helps to start from a set that publishes its rules. Lucide, an open-source icon set under the ISC license, documents its drawing rules in its contribution guide. They make a good reference spec because each rule is concrete:

Rule (Lucide icon design guide)Value
Canvas24 x 24 pixels
PaddingAt least 1 pixel between strokes and the canvas edge
Stroke width2 pixels, centered on the path
Joins and capsRound joins; round caps on open paths
Corner radius, shapes 8 px or larger2 pixels
Corner radius, shapes under 8 px1 pixel
Diagonals meeting at a right angleAbout 2.41 px radius (1 + the square root of 2) to stay on the grid
Spacing between distinct elementsAt least 2 pixels
Inner gapsMost at least 2 pixels wide
AlignmentCoordinates, arc centers and diagonals on the pixel grid where possible

You do not have to copy these values. Material Symbols, for example, is a variable icon font with a weight axis from 100 to 700 and a separate grade axis, so its "stroke" is not a single number at all. The useful habit is the format: write the spec as a table of numbers, put it in the design file, and review new icons against it.

Two rules in the table are easy to underrate. The 2-pixel minimum spacing and inner gap rules are what keep icons from closing up into blobs at small sizes, and the corner-radius rule by shape size stops small details from turning into dots.

Optical Size and Optical Centering

Geometrically equal shapes do not look equal. A circle and a square drawn to the same bounding box do not carry the same visual weight, so a set needs keyshapes: a small family of reference outlines (typically a circle, a square and portrait and landscape rectangles) sized so that they look equal, which each icon is then drawn to fill. Apple's guidance says the same thing from the other direction: depending on an icon's visual weight, you may need to adjust its dimensions so it looks consistent with the others.

Optical centering is the companion problem. Apple's HIG uses a download icon as the example: it carries more weight at the bottom, so when centered geometrically it looks too low. The fix Apple describes is to nudge the glyph up slightly and bake that adjustment into the asset as padding, so that developers can center the asset geometrically and get optical centering for free. Apple describes the adjustments as typically very small, a matter of moving the icon a few pixels, which is why they are easy to skip and noticeable when skipped.

Common candidates for optical adjustment:

  • Play triangles, which look left-heavy when centered by bounding box.
  • Download and upload arrows with a base line on one side.
  • Speech bubbles with a tail.
  • Bells and pins with weight concentrated at one end.

Outline, Fill and When Each One Wins

Apple's SF Symbols guidance gives a clear division of labor, and it maps well to web interfaces too:

  • Outline is the most common variant. Apple describes an outlined symbol as having no solid areas, so it resembles text, and it works best in toolbars, lists and anywhere the icon sits beside a label.
  • Fill gives more visual emphasis, which suits tab bars, swipe actions and places where an accent color marks selection.
  • Enclosed variants (a symbol inside a circle or square) can improve legibility at small sizes.

The pattern most interface sets use follows from this: outline for the default state, fill for the selected state. The weight change signals selection without relying on color, which also helps with the WCAG use-of-color rule covered below.

Match icon weight to text weight. Apple's HIG recommends matching the weights of interface icons and adjacent text unless you want to emphasize one of them. SF Symbols makes this systematic with nine weights that correspond to the system font's weights, and three scales defined relative to the font's cap height. On the web, the equivalent is choosing a stroke width that visually matches the body text weight at the size the icon appears, and keeping that pairing fixed.

Never mix outline and fill within the same state of the same component. If a toolbar shows four outline icons and one filled one, users will read the filled one as selected.

Designing for Small Sizes

Detail that survives at 48 pixels disappears at 16. Three tools help.

Optical size variants. Material Symbols has an optical size axis that runs from 20dp to 48dp, so the glyph drawn for a 20dp slot is not just the 48dp glyph scaled down. A custom set can do the same thing by hand: draw a dedicated small version of the icons that fail at the smallest size, rather than scaling the main artwork.

Remove detail as size drops. Apple's guidance for macOS document icons shows the principle with a heart-monitor icon: the 32 x 32 version uses fewer, thicker grid lines, the 16 x 16 @2x version drops the grid lines, and the 16 x 16 @1x version drops the EKG line as well. Interface icons need the same discipline.

Adjust for dark backgrounds. Material Symbols handles this with its grade axis: Google recommends a low grade (its example is -25) for a light symbol on a dark background to reduce glare, and notes that grade changes are finer than weight changes and barely affect symbol size. In a hand-drawn SVG set, the nearest equivalent is a slightly thinner stroke variant for dark mode, compared side by side with the light version before you adopt it.

Small-size checks to run on every icon:

  1. Render at the smallest shipped size on a standard-density screen, not only on a high-density one.
  2. Check that every counter (the enclosed space in a magnifier, a padlock shackle, a gear center) is still open.
  3. Check that no two elements are closer than the set's minimum spacing.
  4. Squint at a row of the new icon beside four existing ones. They should blur to roughly equal gray shapes.

Meaning, Metaphor and Localization

An icon is a word that has to be recognized instantly. Apple's HIG recommends familiar visual metaphors directly related to the action or content, simple designs most people will recognize, and gender-neutral human figures.

Two edge cases the HIG calls out that many sets miss:

  • Characters inside icons. If an icon contains a letter (a bold "B", a text-size "A"), it needs localized versions for other scripts.
  • Reading direction. An icon that suggests a passage of text, or a direction of progress, needs a flipped version for right-to-left languages.

Avoid drawing specific hardware. Apple's guidance warns that replicas of its devices date quickly; the same is true of any branded product, and some brand owners restrict how their products can be depicted.

Worked Example: A Settings Gear on a 24-Pixel Grid

An illustration with stated inputs, using the reference spec above (24 x 24 canvas, 1-pixel minimum padding, 2-pixel centered stroke, 2-pixel minimum gaps):

  1. Live area. With 1 pixel of padding on each side and a 2-pixel stroke centered on the path, the outermost path can sit 2 pixels in from the edge, so the outer edge of the stroke lands on the 1-pixel padding line. Path coordinates therefore run from 2 to 22.
  2. Body. Draw the gear body as a circle of radius 7 centered at (12, 12). Its stroke spans radius 6 to 8.
  3. Teeth. Add teeth that extend the outline to about radius 10, so the stroke's outer edge reaches radius 11, inside the padding. Choose the tooth count by measuring, not by habit: the gap between neighboring teeth, measured between stroke edges, must stay at 2 pixels or more. If it does not, use fewer teeth.
  4. Center hole. Draw the hole as a circle of radius 3. Its stroke spans radius 2 to 4, leaving a 2-pixel gap to the body stroke's inner edge at radius 6, which meets the 2-pixel gap rule exactly.
  5. Weight check. Place the gear beside search, bell and user icons from the same set. Teeth add visual mass, so if the gear looks heavier, shrink the body radius by half a pixel before touching stroke width, which must stay fixed across the set.
  6. Small-size check. Render at 16 pixels. If the teeth merge into a ring, draw a dedicated small variant with fewer, broader teeth rather than shipping the scaled version.
  7. Filled state. For a selected state, fill the body and teeth but keep the center hole as a real cut-out in a compound path. A white circle laid on top would show as a white dot on any non-white background.

Run the same sequence for any new icon and the gaps and padding stay consistent with the rest of the set without anyone eyeballing them.

Icons that become app icons need a different canvas and safe zone, listed per platform in the app icon sizes guide.

Production Notes for SVG Icons

The details of cleaning up and shrinking SVG exports are covered in our guide to slimming SVG files without breaking them. The design-side decisions that affect production:

  • Keep the viewBox. MDN describes viewBox as four numbers (min-x, min-y, width, height) that map the drawing's coordinate system onto the element's viewport. A consistent viewBox="0 0 24 24" across the set is what lets every icon scale to any size. Why a 24-unit icon looks softer at 32 pixels than at 48 is worked out in how the viewBox scales an icon.
  • Color with currentColor. The CSS currentColor keyword takes the element's color value, so an icon whose stroke or fill is currentColor follows the surrounding text color, including hover and dark-mode states, with no extra CSS.
  • Decide on width and height deliberately. Leaving them off a reusable icon component lets CSS set the size. MDN's own accessible-button example sets width and height on the SVG. Either is fine; what matters is that the whole set follows one convention.
  • Outline strokes or keep them live. Live strokes let you ship weight variants from one source. Outlined (expanded) strokes guarantee identical rendering everywhere. Choose based on whether you need variants.
  • Ship as components or a sprite for larger sets, so pages load only the icons they use. Our image format decision guide covers when SVG is not the right format at all, and the favicon sizes and formats guide covers the one icon that follows different rules.

Accessibility: Pick the Markup From the Icon's Job

Every icon has one of four jobs, and each job has a different markup pattern:

Icon's jobExampleMarkupRequirement it meets
Decorative, next to visible textA trash can beside the word "Delete"aria-hidden="true" on the SVGAvoids redundant announcements; MDN's example hides the icon inside a labelled button
The only content of a controlAn icon-only close buttonaria-label="Close" on the button; aria-hidden="true" on the SVGGives the control an accessible name (MDN aria-label example)
A standalone meaningful graphicA status badge with no textA title element as the SVG's first child, or visible text referenced with aria-labelledbyMDN prefers aria-labelledby when visible text exists
A status or stateAn error icon next to a fieldIcon plus visible text, not color aloneWCAG 1.4.1 Use of Color

Three rules sit on top of the table:

  • Never put aria-hidden on a focusable element or on a parent of one. MDN warns against it directly, because the element stays in the tab order with no name.
  • Prefer visible labels. MDN recommends aria-labelledby over aria-label when visible text exists, and notes that aria-label content is not shown to sighted users. For icons whose meaning is not obvious, a visible label or tooltip helps everyone.
  • The control, not the glyph, needs to be big enough. WCAG 2.2 Success Criterion 2.5.8 (Level AA) asks for pointer targets of at least 24 by 24 CSS pixels, with a spacing exception for smaller targets. A 16-pixel icon inside a 24-pixel button passes; a bare 16-pixel icon with no padding usually does not. Our minimum touch target size comparison works out the gaps a row of bare 16-pixel icons needs, and when to pad to 44 or 48 instead.

Contrast: worked numbers

WCAG 2.2 Success Criterion 1.4.11 Non-text Contrast (Level AA) asks for at least 3:1 against adjacent colors for graphical objects needed to understand the content, and the Understanding document applies it explicitly to standalone icons and to text characters used as symbols, such as an "X" for close. The threshold is strict: 2.999:1 fails.

The editorial team computed these ratios with the WCAG relative-luminance formula:

Icon colorBackgroundRatioMeaningful icon?
#9CA3AF (light gray)#FFFFFF2.54:1Fails 1.4.11
#949494#FFFFFF3.03:1Passes, barely
#6B7280 (mid gray)#FFFFFF4.83:1Passes
#4B5563#111827 (near black)2.35:1Fails
#6B7280#1118273.67:1Passes

The light gray in the first row is a common default for "secondary" icons, and it fails. Exemptions exist for purely decorative icons, for icons whose information is also given in visible text, and for inactive (disabled) controls, so a light gray decorative icon beside a label is allowed. Our WCAG 2.2 practical guide covers the rest of the contrast rules, and the accessible color systems guide shows how to build icon colors into a palette that passes by default.

Library, Custom, or Both

SituationChoiceWhy
Standard UI actions (search, close, chevrons, menu)LibraryThese metaphors are settled; custom versions add cost and risk recognition
Domain concepts the library lacksCustom, drawn to the library's specKeeps the set consistent while filling gaps
Icons are part of the brand identityCustom setDistinctiveness is the point
Native Apple appSF Symbols plus custom symbolsWeight matching with system text is built in
Very small team, no illustratorLibrary onlyA consistent borrowed set beats an inconsistent original one

Licenses differ. Lucide is ISC, Heroicons and Phosphor are MIT, and Google's Material icons are Apache 2.0, all of which allow commercial use with the license notice kept. SF Symbols are a special case: Apple's HIG points to their terms and notes the prohibition on using symbols, or confusingly similar images, in app icons, logos or other trademarked uses. Our free icons for commercial use guide compares sets and their terms in detail.

The hybrid approach is the common one: a library for standard actions, plus custom icons for the product's own concepts, drawn to the library's published spec so they sit together.

Mistakes That Break Icon Sets

MistakeSymptomCorrection
Scaling the 24 px drawing down for a 16 px slotCounters close, teeth and serifs turn to noiseDraw a small-size variant with less detail
Centering asymmetric glyphs by bounding boxPlay and download icons look off-centerBake the optical nudge into the asset's padding
A light gray "secondary" color for meaningful iconsFails 3:1 against whiteDarken until the pair reaches 3:1, or add text
aria-hidden on the button instead of the SVGThe control loses its name but stays focusableHide only the glyph; name the button
A white circle faking a cut-outWhite dot on colored or dark backgroundsUse a compound path with a real hole
Library icons mixed with custom ones at another stroke widthTwo families on one toolbarDraw custom icons to the library's published spec
Letters inside icons with no plan for other scriptsIcons that only work in one languageAbstract the text, or plan localized versions
An icon-only control sized to the glyphHit area under 24 by 24 CSS pixelsPad the control, not the drawing

Review Checklist for a New Icon

  • Drawn on the set's canvas with the set's padding.
  • Stroke width, caps and joins match the spec.
  • Corner radii follow the size rule.
  • No gap or spacing under the minimum.
  • Optically sized against keyshapes and optically centered.
  • Readable at the smallest shipped size on a standard-density screen.
  • Metaphor fits the set's world; no text that would need localizing, or localized versions planned.
  • Right-to-left version if the icon implies direction.
  • Filled or selected variant uses real cut-outs.
  • Meaningful uses reach 3:1 contrast in both light and dark themes.
  • Markup pattern chosen from the icon's job, with an accessible name where needed.

Frequently Asked Questions

What size grid should I draw interface icons on?

A 24-pixel canvas is the common starting point; Lucide specifies it, and Material Symbols uses 24px as its preferred size in its self-hosting example. Dense interfaces often show icons at 16 or 20 pixels, and those sizes deserve their own checks or drawings rather than a straight scale-down.

How do I stop custom icons looking different from my library icons?

Copy the library's published spec, not its look. Use the same canvas, padding, stroke width, caps and corner rule, then compare the new icon side by side with library icons at the real display size before shipping.

Does a decorative icon need alt text?

No. A purely decorative icon should be hidden from assistive technology, typically with aria-hidden="true", so screen readers do not announce it. It also falls outside the 3:1 non-text contrast requirement. The text next to it carries the meaning.

Should icons be outline or filled?

Use outline beside text and in toolbars, and fill for emphasis and selected states. Many sets ship both and use the switch from outline to fill to show selection, which signals state without relying on color.

How do I handle icons in dark mode?

Recheck contrast against the dark background, because a gray that passes on white can fail on near black. Then compare stroke weight on both backgrounds; Material Symbols recommends a lower grade for light symbols on dark backgrounds to reduce glare. Our dark mode design guide covers the surrounding palette.

Reference Pages Behind This Guide

The contrast ratios in the table were calculated by the editorial team from the hex values shown; the gear coordinates are an illustration built on Lucide's published rules.

Other topics on drawing and shipping graphics are on the Lucky Graphics learn hub. If your icons live inside a larger component library, the design system from scratch guide is the next step: it shows where an icon spec like the one above sits alongside type, color and spacing tokens so the rules survive new contributors.