Skip to content
Alea0.1

Foundations

Icons

Lucide icons at the kit sizes and stroke, through one Icon component you can point at another set.

import { Icon } from '@alea/ui';
import { Search } from 'lucide-react';

Examples

Sizes and tones

sm 16, md 20, lg 24, or any number. Tones come from the tokens.

Stroke

Strokes are 2 in the 24 px grid by default, like Lucide's default. Thinner reads lighter.

Another icon set

Icon takes any component with size and strokeWidth, so a set of your own drops in.

Props

Icon props

An icon from the set (Lucide by default) at the kit's sizes and stroke.

PropTypeDefaultDescription
iconrequiredIconComponent-The icon, e.g. `Search` from lucide-react. The set can be swapped for any component with the same props.
labelstring-Name it for screen readers when the icon means something on its own. Without it, the icon is hidden from them.
sizeIconSize'md'sm 16, md 20, lg 24, or a number of px.
strokeWidthnumber2Stroke width in the 24 px grid (it scales with the icon). Default 2, Lucide's own.
tone"danger" | "success" | "warning" | "accent" | "info" | "current" | "muted"'current'Color from the tokens: currentColor (default), muted, accent, success, warning, danger, info.

Accessibility

  • Decorative icons are hidden from screen readers (aria-hidden).
  • Give an icon a label only when it carries meaning on its own; a button with only an icon gets its name from aria-label on the button.

Do and don't

Do

  • Use 16 px in dense UI and buttons, 20 px in fields, 24 px on their own.
  • Label icon-only buttons with aria-label.

Don't

  • Don't mix icon sets in one screen.
  • Don't use an icon as the only way to say something important.

In Figma

The Figma kit uses the same Lucide icons as components with a size property.

Tested with axe, keyboard and screen reader roles