Using icons

Consistently using iconography and pairing with our other foundations like typography can greatly improve usability, recognition, and perception. These guidelines outline how we craft, interact with, and use iconography.

Overview

Icons should be utilized to enhance user experience by providing intuitive visual cues, aiding in navigation, and improving usability, especially for commonly understood actions or concepts. They shouldn't be overused or substituted for clear text in scenarios where it might cause ambiguity or confusion. Icons should be avoided when they introduce unnecessary complexity or ambiguity, especially if they don't clearly represent associated actions or concepts, hinder accessibility for text-dependent users, or carry meanings that may vary across different cultural or demographic contexts, potentially leading to misunderstandings or user frustration.

Three phone screens showcasing iconography in use. The first is a home page with icons used in the top navigation, category filter pills, and bottom navigation. The second is a My eBay landing page with a list of navigation items each with an icon. The third is a search results page with item tiles and icons being used for programs.

Grid

Iconography should be used when it enhances the user experience by providing intuitive visual cues, aiding in navigation, and improving usability, especially for commonly understood actions or concepts. However, it shouldn't be used excessively or in place of clear text when it risks ambiguity or confusion, particularly for complex or less familiar functionalities where text labels may be more informative.

Pixel grid

Icons should be aligned to the pixel grid to avoid aliasing and maintain sharpness across screen sizes and densities.

Lines that are not snapped to the pixel grid will be appear gray. A line that slightly enters a pixel will create a “fuzzy” appearance. This is especially noticeable on devices with lower pixel densities.

When creating an icon, always check the grid and conduct a pixel preview to view how it would appear on low-density screens.

Two mail icons over pixel grids. The left is aligned to the grid and is crisp in detail. The right is misaligned and appears aliased and fuzzy.

Keylines

Keylines are available as a starting point for designers contributing icons to the system. These keylines guide the placement of common shapes to maintain consistency between icons.

Start by aligning to the keylines, then go outside of the keylines when necessary to make an icon clearer.

Detailed keyline grids overlapping pixel grids showcasing common shapes for 24 and 16px icons.

Icons and text

Size relationship

For visual hierarchy, proper icon and text sizes should be maintained when placing these elements together on a single line. In most cases, a single line of text will be placed next to 16px and 24px icons as these icon sizes are most common within our badging system.

Caption and body text may be used next to 16px icons, while subtitle 2 and subtitle 1 text may be used with 24px icons.

A detailed spec highlighting how to pair icon sizes with type sizes. From top to bottom are 16px with Caption - 12/16, 16px with Body - 14/20, 24px with Subtitle 2 - 16/24, and 24px with subtitle - 20/28.

Space between

Icons and text should be aligned to the vertical centers for this treatment. Use 6px of spacing between 16px icons and text and 8px between 24px icons and text.

A detailed spec highlighting how much space goes between icons and text. The top example is a 16px icon with 6px of space between the icon and text with vertical centers aligned. The bottom example is a 24px icon with 8px of space between the icon and text with vertical centers aligned.

Color

Default

Icons are monochromatic by default. The majority will use our primary foreground color token unless in a disabled state within a button.

Two icon buttons with a cart icon inside. The left uses the foreground primary token, and the right uses the foreground disabled token.

Paired with text

If an icon is paired with a label or body of text, the icon will match the color of the text.

A tertiary icon button with the text “Add to watchlist” in black. The save icon is also black.

Semantic

Icons that convey semantic meaning, like attention, information, or confirmation, can use semantic colors over primary or secondary backgrounds. If the icon is over a background container using a semantic color, the icon will use an inverse color scheme instead.

Two stacked alert notices. The top uses a blue icon over a neutral background. The bottom uses a white icon over a blue background.

Fills

Some icons have an outlined and a filled version. The filled versions are used to indicate a selected state or to increase their prominence within a hierarchy.

Two rows of icons. The top are all outlined. The bottom are filled. The icons consist of home, search, selling, notification, and save.

Alignment

Icons can be aligned center or top with a body of text. The alignment depends on the height and density of the paired content. Icons align center for text that spans 1-2 lines and align top for 3 or more lines.

Two examples of icons next to lines of text. The top is a single line with an icon aligned vertically at the top. The bottom has three lines of text with the icon aligned to the top of the first line.

Best practices

Culture and demographics

Do use icons that are either universally understood across countries, or are specific to a country’s currency or culture.

An education notice asking to choose a payment method. A euro currency icon is in the upper left with the description “Get quick, free delivery across Europe” beneath.

Don’t use icons that fail to align with cultural representation or norms. Be mindful that icons may portray different meanings across cultures.

An education notice asking to choose a payment method. A dollar sign currency icon is in the upper left with the description “Get quick, free delivery across Europe” beneath.

Scaling

Do align icons to the pixel grid at their provided size and use them at 100%.

Four grid icons in a row. All are 24px in size.

Don’t scale icons to arbitrary sizes. This leads to aliasing and mismatched stroke widths. Contact the design system team if an icon needs a new size.

Four grid icons in a row. They have all been resized to the arbitrary sizes: 18, 28, 32, 13px.

Size in relationship to text

Adhere to sizing and alignment rules for single-line lockups as used within the badging system.

Two icons paired with text.
The large icon is paired with large text, and the small icon is paired with small text.

Don’t use icons that are visually too small or large for available text sizes, and don’t align icons to only the cap height of text.

Two icons paired with text.
The large icon is paired with small text, and the small icon is paired with large text.

Alignment

Do align icons to the top of the text box if paired with 3 or more lines of text.

Three lines of text with an icon aligned to the top of the first line.

Don’t center icons when paired with 3 or more lines of text.

Three lines of text with an icon aligned to the top of the second line.

Resources

To discuss icon needs, reach out to the OneExperience (OX) team or sign up for office hours.

Change log

DateNotes
Jun, 2024
  • Updated to eBay Evo
Feb, 2023
  • Updated icons and buttons on page
Aug, 2022
  • Added section for “Icon buttons”