Job board

Interactive icon

An interactive icon is an icon that acts as a control, with the target size and the states a plain icon has none of. Icon swap supplies the glyph.

Design
Finished
Level
Stable
Audit
Nothing openat the audit of
Last changed

Preview

Interactive icon, default variant as designedInteractive icon, default variant as designed
Default variant as designed, light modedark modeOpen in Figma

Usage

Do

  • Use wherever an icon is clickable and no label sits beside it
  • Give it an accessible name in code — the glyph carries no text
  • Use a plain icon from the ❖ Icon page when the mark is decorative or already labelled

Don't

  • Make a bare icon from the ❖ Icon page clickable: that is what this component exists for
  • Use where a label would fit: use Button with its Icon boolean

Behaviour

  • State (Focus, Hover, Press) and Disabled are managed by code and not applied in static designs

Composition

  • The glyph is supplied through the Icon swap prop; import the icon component rather than redrawing it

Dependencies in Figma

Used byInteractive iconInteractive icon_Modal - dialog_Modal - dialog

Places 1 component from another library: Icon/x / Size=20. This snapshot does not hold them, so this page cannot link to them or describe them.

Level checks

Stable

The ladder's checks for Interactive icon
CheckLevelResult
AuditedReadyPasses
No errors openReadyPasses
Has a descriptionReadyPasses
Usage and Don't writtenReadyChecked at the next audit
Every layer namedReadyPasses
In codeReadyPasses
No warnings openStablePasses
Code gen notes writtenStableChecked at the next audit
Auto layout throughoutStableChecked at the next audit
Matches the designStablePasses

Anatomy

1
Every option switched on: what the component can contain, not how it is usually used
#PartShownComponent
1xAlwaysx

Properties

Interactive icon: each property, its type, values and default
PropertyTypeValuesDefault
DisabledVariant
FalseTrue
False
StateVariant
RestFocusHoverPress
Rest
1 instance swap (icons and parts a designer can replace)
  • Icon swap

States

StateSet by
FocusInteraction
HoverInteraction
PressInteraction
DisabledThe Disabled property

Implementation

What code builds differently from the drawing, and why
FigmaCodeWhy
Focus ring, a layer 4px outside the boxoutline on :focus-visible, outline-offset 4px less the ring's widthFigma has no focus state, so it draws the ring as a layer; in code it is not an element.
Disableddisabled, or aria-disabled where it must stay focusableThe element's own state: the browser keeps it out of the tab order and out of form submission.
State: Focus, Hover, Press:focus-visible, :hover, :activePseudo-classes the browser sets, so a template cannot claim a state the control is not in.

Changes on 19 Sept
ChangeTypeFigma filesCodeDetails
DescriptionDocsPatchPatch

Changes on 21 Aug
ChangeTypeFigma filesCodeDetails
Nested component renamed (5 layers)Not gradedNot gradedNot graded
Its values movedRestyledMinorMinor
ComponentAddedMinorMinor