
@heroicons/react
<p align="center"> <a href="https://heroicons.com" target="_blank"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/tailwindlabs/heroicons/HEAD/.github/logo-dark.svg"> <source media="(pref
About
<p align="center"> <a href="https://heroicons.com" target="_blank"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/tailwindlabs/heroicons/HEAD/.github/logo-dark.svg"> <source media="(pref
What detecting @heroicons/react tells you about a site
@heroicons/react is Tailwind Labs' own icon set, hand-tuned to pair with Tailwind CSS, so spotting it is a strong signal the site lives in the official Tailwind ecosystem and was likely built by people who follow that crew's conventions. The icons come in outline and solid variants at fixed sizes, which tells you the design leans on Tailwind's utility-driven, systematic look rather than a custom illustration pipeline. It is a small, focused dependency, so its presence reads as taste and alignment more than as a heavyweight commitment.
Why the exact @heroicons/react version matters
Heroicons v2 was a full redraw and reorganisation versus v1, changing icon names, sizes and import paths, so the major version tells you which generation of the artwork and API the build targets. A v1 footprint dates the project and implies older Tailwind-era tooling, while v2 aligns with the modern 20px/24px outline-and-solid structure.
@heroicons/react in a real-world stack
When you find @heroicons/react in a bundle, it rarely travels alone. Tailwind CSS, and frequently Next.js or another React framework.
Quick facts
npm install @heroicons/reactCommon pairings
Packages this one expects to find in the same project. Each is also a Sourcemap Explorer detection target.
How Sourcemap Explorer detects @heroicons/react
@heroicons/react ships as v2.2.0, published 2024-11-18 and carries 0 direct dependencies, 1 peer dependency (react), 127 versions on the registry. Those exact numbers are the footprint Sourcemap Explorer matches when @heroicons/react rides inside a deployed bundle — here is how the detection works.
We catch @heroicons/react from two complementary signals: bundled source paths and the embedded package.json. Modern bundlers (webpack, Vite, esbuild, Rollup, Turbopack) preserve the original node_modules/@heroicons/react/ paths inside the JavaScript sourcemap's sources[] array — that's the canonical signal. When the matching package.json is also captured in sourcesContent[], we read the exact version field — patch number included. No regex guessing, no version inference.
- 1
Confirm the site exposes sourcemaps
In DevTools Network, check the response headers of any application script for `SourceMap` or `X-SourceMap`. Failing that, fetch the script's last 4 KB and look for a `//# sourceMappingURL=` comment — that map is where the `@heroicons/react` paths live.
- 2
Find the package in the bundle
Open DevTools → Network → reload. Click any application script and look at its sourcemap. Inside, search `sources[]` for entries matching `node_modules/@heroicons/react/` — every match confirms the package is bundled. The matching `sourcesContent[i]` for `node_modules/@heroicons/react/package.json` gives you the exact installed version.
- 3
Read the version directly from package.json
Run `jq -r '. as $m | $m.sources | to_entries[] | select(.value | endswith("node_modules/@heroicons/react/package.json")) | $m.sourcesContent[.key] | fromjson | .version' bundle.js.map`. Sourcemap Explorer automates the same query in the popup.
Major releases of @heroicons/react
When each major version first landed. Major bumps are where breaking changes live, so this timeline is the fastest way to date the @heroicons/react version a site actually ships against the ecosystem.
Recent versions
@heroicons/react README
Live mirror of the GitHub README, for reference. Updated whenever the repo's default branch changes.
Beautiful hand-crafted SVG icons, by the makers of Tailwind CSS.
Available as basic SVG icons and via first-party React and Vue libraries.
Basic Usage
The quickest way to use these icons is to simply copy the source for the icon you need from heroicons.com and inline it directly into your HTML:
<svg
class="size-6 text-gray-500"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
stroke-width="2"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"
/>
</svg>
Both icon styles are preconfigured to be stylable by setting the color CSS property, either manually or using utility classes like text-gray-500 in a framework like Tailwind CSS.
React
First, install @heroicons/react from npm:
npm install @heroicons/react
Now each icon can be imported individually as a React component:
import { BeakerIcon } from '@heroicons/react/24/solid'
function MyComponent() {
return (
<div>
<BeakerIcon className="size-6 text-blue-500" />
<p>...</p>
</div>
)
}
The 24x24 outline icons can be imported from @heroicons/react/24/outline, the 24x24 solid icons can be imported from @heroicons/react/24/solid, the 20x20 solid icons can be imported from @heroicons/react/20/solid, and 16x16 solid icons can be imported from @heroicons/react/16/solid.
Icons use an upper camel case naming convention and are always suffixed with the word Icon.
Browse the full list of icon names on UNPKG →
Vue
First, install @heroicons/vue from npm:
npm install @heroicons/vue
Now each icon can be imported individually as a Vue component:
<template>
<div>
<BeakerIcon class="size-6 text-blue-500" />
<p>...</p>
</div>
</template>
<script setup>
import { BeakerIcon } from '@heroicons/vue/24/solid'
</script>
The 24x24 outline icons can be imported from @heroicons/vue/24/outline, the 24x24 solid icons can be imported from @heroicons/vue/24/solid, the 20x20 solid icons can be imported from @heroicons/vue/20/solid, and the 16x16 solid icons can be imported from @heroicons/vue/16/solid.
Icons use an upper camel case naming convention and are always suffixed with the word Icon.
Browse the full list of icon names on UNPKG →
Contributing
While we absolutely appreciate anyone's willingness to try and improve the project, we're currently only interested in contributions that fix bugs, for example things like incorrect TypeScript types, or fixing an icon that's been exported with a fill instead of a stroke, etc.
We're not accepting contributions for new icons or adding support for other frameworks like Svelte or SolidJS. Instead we encourage you to release your own icons in your own library, and create your own packages for any other frameworks you'd like to see supported.
License
This library is MIT licensed.
FAQ
What is @heroicons/react used for?
<p align="center"> <a href="https://heroicons.com" target="_blank"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/tailwindlabs/heroicons/HEAD/.github/logo-dark.svg"> <source media="(pref
How can I tell if a website is using @heroicons/react?
Open the page in Chrome with the Sourcemap Explorer extension installed and read the Stack tab. We catch `@heroicons/react` from two complementary signals: `node_modules/@heroicons/react/` paths inside the JavaScript sourcemap, and the embedded `package.json` we read for exact-version detection. Without the extension you can do the same lookup manually in DevTools — the steps are listed in the "How Sourcemap Explorer detects" section above.
How do I find out which version of @heroicons/react a website is running?
Read it straight from the site's JavaScript sourcemap. When a build ships source maps, the bundled `@heroicons/react/package.json` carries the exact `version` string — Sourcemap Explorer extracts it in one click on the Stack tab, and you can do it by hand in DevTools by opening the `.map` file and searching for `node_modules/@heroicons/react/package.json`. That is far more reliable than inferring the version from an asset-hash or a `?ver=` query string, which is all surface-level detectors have to go on. The current npm release is 2.2.0, but real deployments frequently run an older pinned version — which is exactly why reading the bundled number matters.
What is the latest version of @heroicons/react?
2.2.0, as published on the npm registry. The "Recent versions" table on this page lists the most recent 8 releases with their release dates. Sourcemap Explorer reports the version actually bundled into a site, which can lag the latest release by months on real-world deployments.
Is @heroicons/react actively maintained?
Maintained but slow-moving — releases come every several months rather than weekly. The last published release was 2024-11-18. Source code: https://github.com/tailwindlabs/heroicons.
Where can I read more?
Project homepage: https://github.com/tailwindlabs/heroicons#readme. Source code: https://github.com/tailwindlabs/heroicons. Published on npm: https://www.npmjs.com/package/@heroicons/react. Licensed as MIT.
Detected by Sourcemap Explorer
When a bundle ships sourcemaps, we read the embedded package.json for @heroicons/react and report the precise version (the registry's latest is v2.2.0, published 2024-11-18; the bundled copy is often older). Without sourcemaps, an import / require in the page's scripts is enough to flag it.