Iconography
Icon library, sizing conventions, and usage patterns.
Icon Library
The FRAYT Design System uses Lucide React as its icon library, configured in components.json.
Installation
Lucide React is already included as a dependency:
pnpm add lucide-reactUsage
Import icons individually for tree-shaking:
import { Truck, Package, Clock, MapPin } from 'lucide-react';
function StatusBar() {
return (
<div className="flex gap-2">
<Truck className="h-5 w-5" />
<Package className="h-5 w-5" />
<Clock className="h-5 w-5" />
<MapPin className="h-5 w-5" />
</div>
);
}Sizing
| Size | Class | Use |
|---|---|---|
| 16px | h-4 w-4 | Inline with small text, badges |
| 20px | h-5 w-5 | Default — buttons, nav items, form labels |
| 24px | h-6 w-6 | Section headers, emphasis |
| 32px | h-8 w-8 | Empty states, feature callouts |
Guidelines
- Always use
h-andw-Tailwind classes for sizing — never inlinewidth/heightprops - Color icons with
text-*utilities:text-muted-foregroundfor secondary,text-primaryfor emphasis - Icon-only buttons must include an
aria-labelfor accessibility - Prefer outlined (default) icons over filled variants for consistency