
Security News
Next.js Patches Critical Middleware Vulnerability (CVE-2025-29927)
Next.js has patched a critical vulnerability (CVE-2025-29927) that allowed attackers to bypass middleware-based authorization checks in self-hosted apps.
phosphor-icons
Advanced tools
Phosphor is a flexible icon family for interfaces, diagrams, presentations — whatever, really. Explore all our icons at phosphoricons.com.
We use a similar approach as many other icon sets out there, providing icons as a webfont that uses Unicode's Private Use Area character codes to map normally non-rendering characters to icons. But you don't need to know that. All you need to do is add the script to the document <head>
, and drop in icons with an <i/>
tag and the appropriate class:
<!DOCTYPE html>
<html>
<head>
<script src="https://unpkg.com/phosphor-icons"></script>
</head>
<body>
<i class="ph-smiley"></i>
<i class="ph-heart-fill" style="color: hotpink"></i>
<i class="ph-cube-thin"></i>
</body>
</html>
Note: For stability, you may choose to source a specific version of Phosphor by adding the version to the script URL, for example:
https://unpkg.com/phosphor-icons@1.3.2
. The CDN supports version ranges.
Since the icons are just text under the hood, they can be colored and styled with CSS like any other font, including font-size
, color
, etc. We include several helper classes to provide easy sizing if you need it:
.ph-xxs {
font-size: 0.5em;
}
.ph-xs {
font-size: 0.75em;
}
.ph-sm {
font-size: 0.875em;
}
.ph-lg {
font-size: 1.3333em;
line-height: 0.75em;
vertical-align: -0.0667em;
}
.ph-xl {
font-size: 1.5em;
line-height: 0.6666em;
vertical-align: -0.075em;
}
.ph-1x {
font-size: 1em;
}
.ph-2x {
font-size: 2em;
}
.ph-3x {
font-size: 3em;
}
.ph-4x {
font-size: 4em;
}
.ph-5x {
font-size: 5em;
}
.ph-6x {
font-size: 6em;
}
.ph-7x {
font-size: 7em;
}
.ph-8x {
font-size: 8em;
}
.ph-9x {
font-size: 9em;
}
.ph-10x {
font-size: 10em;
}
.ph-fw {
text-align: center;
width: 1.25em;
}
Note: Overriding the
font-family
,font-style
,font-weight
,font-variant
, ortext-transform
may break the icons and render unprintable characters. Don't do it.
Note: The
duotone
weight is not yet available for this implementation, as fonts do not support baked-in alpha/opacity. In future we plan to move to an SVG-based approach with full support for all icon weights.
The icon font now supports ligatures, meaning that in any text using font-family: "Phosphor"
, writing the name of an icon (without the ph-
prefix) will convert to the corresponding icon. The largest possible string will be matched, meaning you can use any available weight, and print multiple icons without separating with spaces or other characters if you choose.
<!DOCTYPE html>
<html>
<head>
<script src="https://unpkg.com/phosphor-icons"></script>
</head>
<body>
<!-- Renders as sword and shield icons -->
<p style="font-family: Phosphor">sword-fill shield</p>
</body>
</html>
If you've made a port of Phosphor and you want to see it here, just open a PR here!
MIT © Phosphor Icons
FAQs
A clean and friendly icon family for web
The npm package phosphor-icons receives a total of 4,129 weekly downloads. As such, phosphor-icons popularity was classified as popular.
We found that phosphor-icons demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Next.js has patched a critical vulnerability (CVE-2025-29927) that allowed attackers to bypass middleware-based authorization checks in self-hosted apps.
Security News
A survey of 500 cybersecurity pros reveals high pay isn't enough—lack of growth and flexibility is driving attrition and risking organizational security.
Product
Socket, the leader in open source security, is now available on Google Cloud Marketplace for simplified procurement and enhanced protection against supply chain attacks.