Icons

On this page

The kit uses inline SVG line icons, such as Lucide or Material Design Icons. Give the <svg> the .ph-icon class and it's sized to sit in text and buttons and takes the colour of the text around it.

Icons in three sizes and three status coloursIcons in three sizes and three status colours

Figure 1: Small, default and large icons, then success, warning and danger colours

<svg class="ph-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
     stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
  <path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" /><circle cx="12" cy="7" r="4" />
</svg>

<span class="ph-text-success"><svg class="ph-icon" ...>...</svg></span>
ClassSize
.ph-icon--sm14px
.ph-icon16px
.ph-icon--lg20px

Icons use stroke="currentColor", so they follow the text colour. Colour one with a text class (.ph-text-success, .ph-text-warning, .ph-text-danger, .ph-muted) on it or its parent.

Where to get icons

Copy the SVG for any 24 × 24 line icon from Lucide or Material Design Icons into the page. There's no icon font to load. React apps use lucide-react, or MdiIcon from ph-app-kit-react for Material Design Icons.

Accessibility

  • Decorative icons next to text get aria-hidden="true".
  • An icon that's the only content of a button needs an aria-label on the button.
  • Colour is never the only signal: pair status icons with words.

Guidelines

  • Use line icons, not filled ones, so they match Performance Hub.
  • Never use emoji in titles, buttons, labels, tabs or statuses.
  • One icon per meaning across the app: the same icon for "Export" everywhere.