@org-design-system/icons
v0.1.16
Published
Icon components for the @org-design-system
Readme
@org-design-system/icons 🛰️
A specialized icon library for the Antaris Design System. This package transforms raw SVGs into optimized, type-safe React components.
🚀 Features
- Icon Suffix: All components follow the
[Name]Iconconvention (e.g.,SatelliteIcon) for clarity and to avoid collision with standard HTML tags. - Dynamic Styling: uses
currentColorfor fills/strokes, allowing icons to be styled with standard CSScoloror Tailwindtext-*utilities. - Sizing Control: Standardized
widthandheightprops with sensible defaults. - Performance: Fully tree-shakable ES modules.
🛠️ Build Process
We use a custom automated pipeline to handle icons:
- SVG Optimization: Raw SVGs are processed to remove hardcoded colors, unnecessary metadata, and standard styling.
- SVGR Transformation: optimized SVGs are converted into React components.
- Component Generation: Components are written to
src/components/with proper React and TypeScript boilerplate. - Index Generation: A central export file is created to facilitate clean imports.
Adding New Icons
Simply drop your .svg file into the svg/ directory and run:
npm run build📦 Usage
import { RocketIcon, SatelliteIcon } from "@org-design-system/icons";
function Dashboard() {
return (
<div className="text-zinc-50 flex gap-2">
<RocketIcon className="text-blue-500" width={24} height={24} />
<span>Mission Control</span>
</div>
);
}Precision tools for visual communication.
