Iconography
Matrix uses Lucide, 1,800+ crisp stroke icons drawn on a 24×24 grid. One Icon component sets the size and the stroke, so every icon matches. Click any icon to copy its import name.
Setup
pnpm add lucide-reactCopy components/ui/icon.tsx into your app. It wraps Lucide with the Matrix sizes and stroke rule. Lucide is also shadcn's default icon set, so shadcn components already use it.
Usage
import { Mail } from 'lucide-react';
import { Icon } from '@/components/ui/icon';
// Decorative, next to a text label: hidden from screen readers automatically
<Icon icon={Mail} />
// Icon-only: give it a name
<button aria-label="Open inbox">
<Icon icon={Mail} size="lg" />
</button>
// Color follows the text
<Icon icon={Mail} className="text-muted-foreground" />Never use unicode characters or emoji as icons; how they look depends on the font and the device. The Matrix rabbit is a logo, not an icon: it has its own page, Logo.
Sizes
| Size | Pixels | Example |
|---|---|---|
| 12px · paints 1.25 (floored) | ||
| 14px · paints 1.25 (floored) | ||
| 16px · paints 1.33 | ||
| 20px · paints 1.67 | ||
| 24px · paints 2.0 |
The stroke is drawn at 2 on the 24 grid, so it scales with the icon, and never paints thinner than 1.25px: below 16px the component raises it to hold that floor. You never set strokeWidth yourself. Inside buttons, badges and inputs the component will pick the icon size; standalone, pass size.
Icons
Loading icons…
Guidelines
- Always render icons through
Iconwith a size from the scale:xxs,xs,sm,md(default) orlg. - Let the surrounding component size the icon; pass
sizeonly when the icon stands alone. - Start with the icons under Used in Matrix, so the same idea always gets the same icon.
- Icon-only controls need an
aria-label. Decorative icons stay hidden from screen readers. - Color icons with text utilities (
text-foreground,text-muted-foreground,text-destructive-text), never with a hex value. - Don't pass a pixel
sizeor astrokeWidthby hand; the product's old 11–28px sizes are replaced by the five steps above. - Don't mix in icons from other sets (Hugeicons, emoji, custom SVG) next to Lucide.