Design system

Iconography

Phosphor icons, in the regular weight, sized to the text beside them.

Petavue uses Phosphor. Every icon is a React component.

import { ChartBar, Funnel, Megaphone } from "@phosphor-icons/react";

<Megaphone size={16} />

Some older screens import from lucide-react. New code uses Phosphor only, so one screen never mixes two icon styles.

Size

Match the icon to the text next to it.

TextIcon size
12px (buttons, labels, pills)14px
14px (body, menu items, inputs)16px
16px and up (titles, empty states)18 to 24px

Weight

  • regular everywhere by default.
  • fill for the active item in navigation, and for a selected toggle.
  • bold only for tiny glyphs that disappear at regular weight, such as a 12px check.

Colour

Icons inherit the text colour unless they mean something on their own.

StateColour
Resting--color-icon-default
Hover or active row--color-icon-active
Disabled--color-icon-disabled
Selected, or part of a primary action--color-primary-500
StatusThe status colour, such as --color-green

Rules

  • An icon on its own needs an accessible name: aria-label on the button, or a Tooltip with describeChild.
  • An icon next to a label is decoration. Leave it out of the accessible name.
  • One icon per idea across the product. If Library uses Shapes, nothing else uses Shapes for something different.

On this page