Skip to content

A framework-agnostic JS tool that delivers Font Awesome's high-quality icons, powered by icon-level tree-shaking for the smallest possible bundle size.

License

Notifications You must be signed in to change notification settings

ev-forge/ev-icon-library

ev-icon-library

NPM Version CI Status License: MIT

A lightweight icon library delivering Font Awesome's high-quality icons via a framework-agnostic Web Component, with perfect, icon-level tree-shaking.

✨ Features

  • πŸ“¦ 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.

πŸš€ Performance Snapshot

@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.

🏁 Get Started (vite/react)

  • 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

monorepo-info-begin

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.

🀝 Contributing

Contributions are welcome! Please read our Contributing Guide to get started.

πŸ—ΊοΈ Roadmap

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

πŸ“„ License

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.

About

A framework-agnostic JS tool that delivers Font Awesome's high-quality icons, powered by icon-level tree-shaking for the smallest possible bundle size.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published