npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@i316/heroicons-react

v0.1.1

Published

i316: Heroicons icons as tree-shakeable React components.

Readme

@i316/heroicons-react

i316: Heroicons icons as React components. 324 icons in 2 styles: outline (default), solid.

Other i316 Heroicons packages: @i316/heroicons-react-native (React Native), @i316/heroicons-vue (Vue 3), @i316/heroicons-angular (Angular) and @i316/heroicons-web (plain HTML web component and raw SVGs).

npm install @i316/heroicons-react

Usage

// One style: every icon is exported as both `Bell` and `BellIcon`.
import { ChevronDown, BellIcon } from '@i316/heroicons-react/outline';

// Any style from the root: <Name><Style>Icon, or <Name>Icon to switch style at runtime.
import { BellSolidIcon, HomeIcon } from '@i316/heroicons-react';

<ChevronDown size={20} color="#e11d48" />
<BellSolidIcon className="text-slate-500" title="Notifications" />
<HomeIcon variant={isActive ? 'solid' : 'outline'} />

Works in React Server Components: icons can be rendered directly from server components (Next.js App Router).

Defaults for a whole subtree

import { HeroIconProvider } from '@i316/heroicons-react';

<HeroIconProvider size={20} color="currentColor" strokeWidth={2} className="shrink-0">
  <App />
</HeroIconProvider>

Props on an icon override the provider. Nested providers override their parent's values.

Icons chosen at runtime (CMS, user settings)

import { DynamicIcon, iconNames } from '@i316/heroicons-react/dynamic';

<DynamicIcon name={item.icon} variant="solid" fallback={<Spinner />} />

Each icon is loaded as its own chunk the first time it renders. This is opt-in: only apps that import /dynamic pay for its map of every icon name.

Tree-shaking

Every icon is its own module and the package is sideEffects-free. Production builds in Vite, webpack, Rollup, esbuild and Next.js ship only the icons you import, whichever path you import from. <Name>Icon from the root includes every style of that one icon; import a specific style when you don't need switching.

Toolchains that don't tree-shake load a whole barrel for one named import: webpack in development, Jest, and anything else that runs modules unbundled. Two fixes:

Babel (Jest, webpack/babel-loader): add the bundled plugin. It rewrites import { Bell } from '…/outline' into import Bell from '…/outline/bell' at compile time.

// babel.config.js
module.exports = {
  plugins: ['@i316/heroicons-react/babel'],
};

Next.js (SWC, no Babel): use Next's own barrel optimization.

// next.config.js
module.exports = {
  experimental: { optimizePackageImports: ['@i316/heroicons-react'] },
};

Props

| Prop | Default | | |---|---|---| | size | 24 | width and height | | color | currentColor | icon color | | strokeWidth | 1.5 | outline only; ignored by the other styles | | title | none | accessible name (see below) | | variant | outline | <Name>Icon and DynamicIcon only: which style to render |

All other props pass through to the root <svg> (className, style, onClick, …), and ref is forwarded.

Accessibility: icons are decorative by default (aria-hidden="true"). Pass title to make one meaningful: it renders a <title> with role="img". Passing your own aria-label or role also removes aria-hidden.

Styling: every icon has the classes hero-icon hero-icon-<name> (e.g. hero-icon-chevron-down), plus any className you pass.

Editor previews: hovering an icon imported from a style path (@i316/heroicons-react/outline) in VS Code (or any TypeScript editor) shows a picture of it. Root imports have no previews, which keeps them light for the editor.

Module format, TypeScript and Jest

ESM only, with TypeScript declarations included. moduleResolution "bundler", "node16" and legacy "node" all resolve every import path. Node 20.19+ and 22.12+ can require() it. Peer dependency: react >= 16.8.

Jest's default CommonJS mode needs it transformed by your Babel setup (babel-jest), the usual configuration for ESM-only packages. Adding the plugin above keeps each test file from loading every icon:

// jest.config.js
transformIgnorePatterns: ['/node_modules/(?!@i316/heroicons-react/)'],

License

Icons: Heroicons by Tailwind Labs (https://github.com/tailwindlabs/heroicons), licensed under MIT. i316 modified them: 24px outline and solid sets only, recolored to currentColor and reformatted; converted into React, React Native, Vue, Angular and web-component formats.

i316 code (components, runtime, tooling): MIT, © 2026 rahil316. See LICENSE for both licenses in full.