Icons

Icons help people scan, but they mean different things to different people. Lily treats an icon as decoration that sits beside a name, and gives every icon one drawing contract so a set reads as a family.

When to use icons

  • To reinforce a label people already read, such as an arrow on “Continue”.
  • To make a familiar, repeated action quick to find in a tool people use daily.
  • To mark a status that is also written in words.

When not to

  • Do not let an icon be the only carrier of meaning, or replace a text label.
  • Do not use one icon for two meanings in the same service.
  • Do not add an icon for decoration alone.

The set

These sixteen icons are drawn from the same contract. They take the colour and size of the text beside them, so they follow the theme, the text size and forced-colours mode.

The contract

What every Lily icon must be
PropertyRuleWhy
GridviewBox="0 0 16 16"One grid keeps optical size equal across the set.
Strokestroke="currentColor", width 1.6, round caps and joinsThe icon inherits the text colour, so contrast and themes just work.
SizeIn rem, about 1.05remIt grows with the reader’s text size.
Rolearia-hidden="true", focusable="false"An icon is decoration; the control’s name is the label.
Fillfill="none"Strokes only, so a high-contrast theme can recolour them.

A script checks all 80 bundled picker icons against this contract on every build.

Always give the control a name

With a visible label, the label is the name. The icon beside it is hidden from assistive technology.

<button type="button" class="button">
  <svg viewBox="0 0 16 16" width="1.05rem" height="1.05rem"
       aria-hidden="true" focusable="false" fill="none"
       stroke="currentColor" stroke-width="1.6"
       stroke-linecap="round" stroke-linejoin="round">
    <path d="M2.5 8h11M9 3.5 13.5 8 9 12.5" />
  </svg>
  Continue
</button>

Where space allows only an icon, put the name in aria-label and show a tooltip that appears on hover and on keyboard focus.

<button type="button" class="button" aria-label="Close">
  <svg viewBox="0 0 16 16" … aria-hidden="true">…</svg>
</button>

Placement and size

  • Place an icon before its label in left-to-right text; mirror it in right-to-left only when its direction means something (an arrow does; a magnifier does not).
  • Keep icons at one size within a control group, and give touch targets at least 44 by 44 CSS pixels on coarse pointers.
  • Never animate an icon to attract attention; honour prefers-reduced-motion when you must.

Bring your own

Lily ships no icon library and no imagery. Replace a bundled icon through the component’s children, following the same contract, or use your own set. A new icon should earn its place with evidence that it helps people finish a task.