Icons

From JetBrains/intellij-community · View interactive version

Icons is an AI agent skill from the GitHub repository JetBrains/intellij-community. Add or review SVG icons, dark variants, Icons classes, icon-robots.

How to use this skill

Skill file

IntelliJ Platform New UI Icons

This skill tells how to draw New UI SVG icons and their theme variants.

To generate the *Icons classes, to change an icon-robots.txt rule, or to update the API dumps after an icon change, read icon-resources.md.

Golden rules

  1. Always ship two SVGs — one for the light theme (e.g. addFile.svg) and one for the dark theme with the _dark suffix (addFile_dark.svg). Geometry must be identical between them; only the palette swaps.
  1. Only use colors from the canonical palette. See palette.md. Picking a one-off color breaks theming and contrast.
  2. One canvas size per icon role. See Icon roles. Do not invent new sizes or pad with empty space — IntelliJ scales the canvas as a single unit.
  3. No raster, no gradients, no filters, no embedded fonts. Path geometry only (<path>, <rect>, <circle>, <line>, <polyline>, <polygon>). Text must be converted to outlines.
  4. Use fill="none" on the root <svg> and set fill / stroke explicitly per shape — never rely on CSS or currentColor.
  5. Strokes use stroke-width="1", stroke-linecap="round", stroke-linejoin="round" (or stroke-miterlimit="10" for hard joins). Heavier strokes are reserved for hero glyphs inside a circle badge (e.g. status checkmarks) and use stroke-width="1.5" or "2".
  6. Pixel-grid align: keep stroke axes on half-pixel centers (x.5) and fills on whole pixels so the icon stays crisp at 1× rendering.
  7. Preserve the Apache 2.0 copyright comment as line 1. Match the year of contribution.
  8. File names use camelCase matching the action/node ID and stay ASCII-only.

Icon roles

| Role | Canvas | Filename pattern | Reference dir |

|-----------------------------------------|-----------|----------------------------------------|-------------------------------------------------|

| Action icons (menus, popups, toolbars) | 16×16 | name.svg + name_dark.svg | expui/actions/, expui/general/ |

| Tree node icons (PSI, structure view) | 16×16 | name.svg + name_dark.svg | expui/nodes/ |

| Tool-window stripe icons (legacy/16) | 16×16 | name.svg + name_dark.svg | expui/toolwindows/ |

| Tool-window stripe icons (New UI) | 20×20 | name@20x20.svg + name@20x20_dark.svg | expui/toolwindows/ |

| Main toolbar (New UI) | 20×20 | name@20x20.svg + name@20x20_dark.svg | expui/general/, expui/run/, expui/toolbar/ |

| Editor gutter icons | 14×14 (small marks 12×12, 9×9) | name.svg + name_dark.svg | expui/gutter/ |

| Status bar / inline status | 16×16 | name.svg + name_dark.svg | expui/status/, expui/inline/ |

| Breakpoint marks | 14×14 | name.svg + name_dark.svg | expui/breakpoints/ |

| Run-config tags & disclosure chevrons | 16×16 (chevron*.svg may be 9×9 to 16×16) | name.svg + name_dark.svg | expui/run/, expui/general/ |

| Welcome/onboarding & logos (system) | 16, 20, 28, 48 (per surface) | name.svg + name_dark.svg | expui/ide/, expui/welcome/ |

When in doubt, find a sibling icon in the same folder and copy its width / height / viewBox.

Where the SVGs live

Pick the placement by whether a Classic-UI icon already exists:

Mapping-file shape (excerpt from community/platform/icons/src/PlatformIconMappings.json):

{
  "expui": {
    "actions": {
      "addFile.svg": "actions/addFile.svg",
      "checked.svg": ["actions/checked.svg", "actions/setDefault.svg"]
    }
  }
}

Key = path relative to the expui/ root (the New UI file). Value = the Classic path(s) that should resolve to it. A single New UI icon may back multiple Classic paths.

SVG skeleton

<!-- Copyright 2000-2026 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
  <!-- shapes, ordered back-to-front -->
</svg>

Composition rules

Generation workflow

  1. Pick the role and canvas size from the table above. Find at least two visually similar siblings under community/platform/icons/src/expui/<role>/ and read their SVG sources. Mirror their stroke/fill mix.
  2. Lay out geometry on the pixel grid (whole-pixel fills, half-pixel stroke centers). Optical-center the glyph.
  3. Apply the canonical light palette from palette.md. Never invent colors.
  4. Save the light SVG with the Apache 2.0 header, width/height/viewBox matching the role, and fill="none" on <svg>.
  5. Duplicate to the _dark filename and swap each color for its dark-theme partner from the palette mapping. Keep paths byte-identical otherwise.
  6. Place and wire the file as Where the SVGs live says. Then generate the icon class again as icon-resources.md says.
  7. Verify visually in both themes in the IDE image preview, or run the IDE with and without the Classic UI plugin (com.intellij.classic.ui) to compare. Check selection states for stripe icons.

Common mistakes

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.