@pierre/icons is an open source icon library designed first and foremost for
Diffs.com by
The Pierre Computer Company. Available as source SVGs
exported from Figma and as compiled React components.
npm i- Drop SVG files into
svg/ - Run
npm run icons:build - Commit the generated
src/icons/*.tsxfiles - Import from
@pierre/icons
import { IconArrow, IconCheck } from '@pierre/icons';
<IconArrow size={20} color="red" />;| Command | Description |
|---|---|
npm run icons |
Build components, sprite, and preview |
npm run icons:build |
Generate React components from SVGs |
npm run icons:sprite |
Generate SVG sprite |
npm run icons:preview |
Generate HTML preview |
npm run build |
Clean dist, generate components, compile TS |
npm run clean |
Remove dist folder |
npm run lint |
Run ESLint |
npm run format |
Run Prettier |
interface IconProps {
size?: number | string; // default: 16
color?: string; // default: 'currentcolor'
style?: CSSProperties;
className?: string;
}After building, open dist/index.html in a browser to browse all icons.