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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@hugeicons/react

v1.1.3

Published

Hugeicons Pro React Component Library https://hugeicons.com

Readme

Hugeicons Logo

@hugeicons/react

Hugeicons React Component Library for fast, customizable icons with TypeScript and tree-shaking support

What is Hugeicons?

Hugeicons is a large icon set for modern web and mobile apps. The free package includes 4,600+ Stroke Rounded icons. The Pro package provides 46,000+ icons across 10 styles with multicolor support for Bulk, Duotone, and Twotone styles.

Key Highlights

  • 4,600+ Free Icons: Stroke Rounded set for unlimited personal and commercial projects
  • 46,000+ Pro Icons, 10 Styles: Stroke, Solid, Bulk, Duotone, and Twotone families for sharp, rounded, and standard needs with richer variants
  • Pixel Perfect Grid: Built on a 24x24 grid for crisp rendering at any size
  • Customizable: Easily adjust colors, sizes, and styles to match your design needs
  • Multicolor Support: Full multicolor customization for Bulk, Duotone, and Twotone styles in the Pro version
  • Tree Shaking Ready: Named exports keep bundles lean in modern bundlers
  • Regular Updates: New icons added regularly to keep up with evolving design trends

Looking for Pro Icons? Check out our docs at hugeicons.com/docs for detailed information about pro icons, styles, and advanced usage.

Hugeicons react icons

Table of Contents

Features

  • Customizable colors, sizes, and stroke width
  • Multicolor support for Bulk, Duotone, and Twotone styles
  • TypeScript support with full type definitions
  • Tree shakeable builds (ESM, CJS, UMD) for bundlers like Vite, Next.js, and CRA
  • Optimized SVGs for small payloads and fast render
  • Alternate icon support for dynamic interactions

Installation

# Using npm
npm install @hugeicons/react @hugeicons/core-free-icons

# Using yarn
yarn add @hugeicons/react @hugeicons/core-free-icons

# Using pnpm
pnpm add @hugeicons/react @hugeicons/core-free-icons

# Using bun
bun add @hugeicons/react @hugeicons/core-free-icons

Usage

import { HugeiconsIcon } from '@hugeicons/react';
import { SearchIcon } from '@hugeicons/core-free-icons';

function App() {
  return (
    <HugeiconsIcon
      icon={SearchIcon}
      size={24}
      color="currentColor"
      strokeWidth={1.5}
    />
  );
}

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | icon | IconType | Required | The main icon to display | | altIcon | IconType | - | Alternative icon that can be used for states, interactions, animations, or dynamic icon swapping | | showAlt | boolean | false | When true, displays the altIcon instead of the main icon | | size | number | 24 | Icon size in pixels | | color | string | currentColor | Icon color (CSS color value) | | primaryColor | string | currentColor | Primary color for multicolor icons (Bulk, Duotone, Twotone styles) | | secondaryColor | string | - | Secondary color for multicolor icons (Bulk, Duotone, Twotone styles) | | disableSecondaryOpacity | boolean | false | When true, disables the default opacity applied to the secondary color | | strokeWidth | number | 1.5 | Width of the icon strokes (works with stroke-style icons) | | className | string | - | Additional CSS classes |

Examples

Basic Usage

import { HugeiconsIcon } from '@hugeicons/react';
import { SearchIcon } from '@hugeicons/core-free-icons';

<HugeiconsIcon icon={SearchIcon} />

Custom Size and Color

import { NotificationIcon } from '@hugeicons/core-free-icons';

<HugeiconsIcon
  icon={NotificationIcon}
  size={32}
  color="#FF5733"
/>

More examples and patterns

  • Examples: https://hugeicons.com/docs/integrations/react/examples
  • Best practices: https://hugeicons.com/docs/integrations/react/best-practices

Performance

  • Tree-shaking: The package is fully tree-shakeable, ensuring only the icons you use are included in your final bundle
  • Optimized SVGs: All icons are optimized for size and performance
  • Code Splitting: Icons can be easily code-split when using dynamic imports

Troubleshooting

Common Issues

  1. Icons not showing up?

    • Make sure you've installed both @hugeicons/react and @hugeicons/core-free-icons
    • Check that the icon names are correctly imported
  2. TypeScript errors?

    • Ensure your tsconfig.json includes the necessary type definitions
    • Check that you're using the latest version of the package
  3. Bundle size concerns?

    • Use named imports instead of importing the entire icon set
    • Add code splitting for different sections of your app
    • Verify your bundler is configured to tree shake ESM builds

Browser Support

The library supports all modern browsers.

Related Packages

Pro Version

Want access to 46,000+ icons and 10 unique styles? Check out our Pro Version and visit our docs for detailed documentation.

Available Pro Styles

  • Stroke Styles
    • Stroke Rounded (@hugeicons-pro/core-stroke-rounded)
    • Stroke Sharp (@hugeicons-pro/core-stroke-sharp)
    • Stroke Standard (@hugeicons-pro/core-stroke-standard)
  • Solid Styles
    • Solid Rounded (@hugeicons-pro/core-solid-rounded)
    • Solid Sharp (@hugeicons-pro/core-solid-sharp)
    • Solid Standard (@hugeicons-pro/core-solid-standard)
  • Special Styles
    • Bulk Rounded (@hugeicons-pro/core-bulk-rounded)
    • Duotone Rounded (@hugeicons-pro/core-duotone-rounded)
    • Duotone Standard (@hugeicons-pro/core-duotone-standard)
    • Twotone Rounded (@hugeicons-pro/core-twotone-rounded)

License

This project is licensed under the MIT License.

Related