Phosphor Icons React

Over 1,500 flexible SVG icon components for React, in six visual weights

Library
npm
v2.1.10
1,779 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
42 /100 Fair
Development Activity 0
Maintenance 20
Community 48
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
73 /100 Good
Architecture 75
Code Quality 70
Innovation 65
Learning Curve 82

Phosphor Icons for React packages the entire Phosphor icon family — over 1,500 icons — as individually importable React components, each rendered as an inline SVG so it inherits currentColor and can be styled with plain CSS. Every icon is available in six visual weights (thin, light, regular, bold, fill, duotone) selectable via a weight prop, letting a single icon set cover both minimal line-art UIs and heavier, higher-contrast designs without swapping icon libraries.

The library is built around a small shared runtime (IconBase/SSRBase) that every generated icon component wraps, plus an IconContext provider for setting default size, color, and weight across an entire app instead of repeating props on every icon. It ships both a client-side-rendering build (csr) and a server-side-rendering-safe build (ssr) so icons render correctly during Next.js/Astro-style SSR without hydration mismatches, and each icon is exported individually so bundlers can tree-shake unused icons out of the final bundle.

What You Get

  • Over 1,500 individually importable icon components, each rendered as an inline, style-able SVG
  • Six visual weights per icon (thin, light, regular, bold, fill, duotone) selectable via a weight prop
  • An IconContext provider for setting default size, color, weight, and mirrored across all icons in an app
  • Separate client-side-rendering and server-side-rendering-safe builds so icons work correctly in SSR frameworks
  • Full TypeScript type declarations generated per-icon for autocomplete and type-checked props

Common Use Cases

  • Populating a design system’s icon set with a single consistent, weight-flexible icon family
  • Building admin dashboards and marketing sites that need thousands of icons available without hand-authoring SVGs
  • Using duotone or fill weights for higher-emphasis icons (e.g. empty states, feature callouts) alongside regular-weight navigation icons
  • Server-rendered React apps (Next.js, Astro with React islands) that need icons to render correctly without hydration flicker
  • Swapping icon styles app-wide (e.g. thin to bold) via the shared IconContext instead of editing every call site

Under The Hood

Architecture The published package is almost entirely generated: a small hand-written runtime in src/lib (IconBase.tsx, SSRBase.tsx, context.ts, types.ts — under 130 lines total) defines how any icon renders (forwarding refs, merging context defaults with local props, choosing the right weight’s SVG paths), and a scripts/ build step generates one component file per icon under src/csr and src/defs (1,512 files each) from the underlying Phosphor SVG icon definitions. Each generated icon component is a thin wrapper that passes its specific SVG path data into the shared IconBase, so the actual per-icon logic is a single source of truth rather than duplicated across 1,500+ files.

Tech Stack Written in TypeScript, built with Vite (vite.config.ts) to emit both dist/index.es.js and dist/index.cjs.js builds plus per-icon subpath exports (./dist/icons/*, ./dist/csr/*), and packaged with pnpm. The only meaningful runtime dependency is React itself (as a peer dependency); the icon rendering logic has no other runtime dependencies.

Code Quality Testing is comparatively thin for a package of this size — test/index.test.tsx covers the shared IconBase rendering behavior and context propagation rather than exhaustively testing all 1,500+ generated icon components individually, which is a reasonable trade-off given the icons are mechanically generated from the same base component and share identical rendering logic. Because most of the source tree is generated rather than hand-authored, code quality is best assessed via the shared runtime files, which are small, typed, and easy to review in full.

API Design Every icon is imported by name (import { Acorn } from '@phosphor-icons/react') and accepts a small, consistent prop set (size, color, weight, mirrored) shared across all 1,500+ icons via the same IconBase — so learning one icon’s API means knowing all of them. The IconContext.Provider pattern lets teams set app-wide icon defaults once, avoiding repetitive prop-drilling, while still allowing any individual icon instance to override those defaults locally.

Used by 21 apps in this directory

Rust
60%
Apache 2.0

Magnitude

AI Development · Developer Tools

7,313

An open source inference engine that profiles your hardware, recommends the best local models, and tunes them for the coding agent you already use.

View details
79
Repo Health
83
Technical
71
Dependency
Built with
Rust 60%
TypeScript 25%
Updated 6 days ago
TypeScript
88%
MIT

Mistle

AI Agents · Developer Tools

95

Self-hostable platform for running autonomous coding agents in isolated, credentialless sandboxes with brokered credentials, reusable snapshots, and event-driven triggers.

View details
50
Repo Health
76
Technical
70
Dependency
Built with
TypeScript 88%
Rust 11%
Updated 4 weeks ago
TypeScript
26%
AGPL 3.0

Omnivore

Bookmarks Archiving · Knowledge Management · Note Taking

16,356

Self-hosted read-it-later platform with highlights, newsletters, PDFs, and seamless Obsidian and Logseq integration.

View details
90
Repo Health
74
Technical
65
Dependency
Built with
TypeScript 26%
JavaScript 24%
HTML 20%
Updated 1 weeks ago
JavaScript
64%
AGPL 3.0

overleaf

Collaboration · Productivity

18,266

Open-source, real-time collaborative LaTeX editor with sandboxed compilation and full TeXLive support for self-hosted academic and research teams.

View details
84
Repo Health
80
Technical
59
Dependency
Built with
JavaScript 64%
TypeScript 30%
Updated 1 months ago
Go
68%
MIT

Probo

Automation · Security

1,476

Open-source GRC platform for engineering and security teams.

View details
87
Repo Health
90
Technical
69
Dependency
Built with
Go 68%
TypeScript 30%
Updated 1 weeks ago
TypeScript
83%
AGPL 3.0

Recordly

Design Tools · Developer Tools · Productivity

34,929

Free, open-source screen recorder and editor for macOS, Windows, and Linux that auto-adds zooms, cursor polish, webcam overlays, and styled frames to your screen captures without any motion-design skills.

View details
84
Repo Health
82
Technical
70
Dependency
Built with
TypeScript 83%
Updated 6 days ago
Rust
79%
AGPL 3.0

Spacedrive

Collaboration · File Storage

39,292

One file manager for all your devices and clouds — powered by a Virtual Distributed File System built in Rust.

View details
84
Repo Health
84
Technical
63
Dependency
Built with
Rust 79%
TypeScript 18%
Updated 2 weeks ago
TypeScript
89%
Other

Hexclave

Authentication · Developer Tools

6,877

The open-source user infrastructure platform — authentication, teams, payments, emails, analytics, and more on a single unified user model.

View details
88
Repo Health
80
Technical
66
Dependency
Built with
TypeScript 89%
Updated 6 days ago
TypeScript
98%
Apache 2.0

superlog

AI Agents · Monitoring

1,469

Open-source agentic observability that ingests OpenTelemetry signals, groups them into incidents, and deploys AI agents to investigate and fix your production bugs automatically.

View details
66
Repo Health
73
Technical
72
Dependency
Built with
TypeScript 98%
Updated 1 weeks ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers