A lightweight icon library delivering Font Awesome's high-quality icons via a framework-agnostic Web Component, with perfect, icon-level tree-shaking.
- π¦ Minimal Bundle Size: Your final bundle only includes the icons you actually import. Over 80% smaller than traditional component libraries in our benchmarks.
- π³ Perfect Tree-shaking: The architecture ensures that unused icons are always eliminated from your production build.
- π§© Framework Agnostic: Built with a native Web Component. Works in React, Svelte, Vue, Astro, or simple HTML without wrappers.
- π¨ Intuitive Styling: Style icons directly with your favorite utility classes. No new APIs to learn.
- π Simple API: No complex configuration. Import your icon's SVG and pass it to the component.
@ev-forge/icon-library
is designed for performance. In a benchmark simulating a modern application (a Vite + React SPA loading 32 unique icons), @ev-forge/icon-library
demonstrates a significantly smaller impact on the final bundle.
Benchmark Results:
Library | Bundle Impact (gzip) |
---|---|
@fortawesome/react-fontawesome |
~144 KB |
@ev-forge/icon-library |
~26 KB |
For a detailed analysis and to reproduce these results, please see the benchmark package's README.
- install:
npm i @ev-forge/icon-library
- set up the types in your tsconfig:
include: ["node_modules/@ev-forge/icon-library/dist/global.d.ts"]
- import and use it:
// 1. import icons
import { svgHomeSolid, svgRadioSolid } from "@ev-forge/icon-library";
// 2. use them in ev-icon
function MyApp() {
return (
<div>
<ev-icon svg={svgHomeSolid} class="w-6 text-blue-500" />
<ev-icon svg={svgRadioSolid} />
</div>
);
}
For a deep dive into the API, advanced features, and step-by-step integration guides for popular frameworks like Next.js and Astro, please see the full package documentation.
β‘οΈ Full ev-icon
Documentation
This monorepo contains the following packages, managed with pnpm
workspaces:
Package | Description |
---|---|
π¦ packages/icon-library |
The core icon library, published to npm. |
π apps/docs |
The official landing page and browser icons site. |
π apps/benchmark-vite-react |
The performance benchmark app for Vite + React. |
To get started with local development, clone the repository and run pnpm install
.
Contributions are welcome! Please read our Contributing Guide to get started.
We have a clear vision for @ev-forge/icon-library
. Our future plans include:
- A streamlined process for community-submitted original icons.
- Continued performance optimizations for render-time.
- Enhanced Accessibility: Audit and improve ARIA roles and keyboard interactions.
- Research and implement full SSR support
The source code for this project is released under the MIT License.
The base icons are provided by Font Awesome Free and are licensed under CC BY 4.0.