Pro Every tool, icon and stickerAll of Pro

  • All 90 tools
  • Every icon style
  • Icon & sticker pack ZIPs
Go Pro
HubToolify
Blog

Best React Icon Libraries: Bundle Size, Props, TypeScript and Licences

01 Dec 2026 By 9 min read

Best React Icon Libraries: Bundle Size, Props, TypeScript and Licences

Every React icon library gives you <SomeIcon />. The differences only show up once the app grows: how much each icon adds to the bundle, whether your editor autocompletes the names, how you set size and stroke, whether the icons can move, and what the licence lets you ship. This guide compares seven React icon packages on exactly those points, HubToolify's included, with one thing most comparisons skip: we built the same small component with each package and measured the bundle.

Package versions, licences and peer dependencies come from the npm registry, and icon counts come from each library's own site or README, all checked on 1 December 2026. Libraries update often, so check the linked source before you decide.

At a glance

Package Version Licence Icons, as the library states it Styles
lucide-react 1.85.0 ISC 2,170 (lucide.dev) One stroke style
react-icons 5.7.0 MIT for the package; each icon set keeps its own licence 31 bundled icon sets (README) Whatever each set has
@heroicons/react 2.2.0 MIT 316 (heroicons.com) Outline 24, Solid 24, Solid 20, Solid 16
@phosphor-icons/react 2.1.10 MIT Six weights; the site's "Download all" counts 9,072 files (phosphoricons.com) Thin, Light, Regular, Bold, Fill, Duotone
@tabler/icons-react 3.55.0 MIT 6,898: 5,525 outline, 1,373 filled (README) Outline, Filled
@mui/icons-material 9.6.0 MIT 2,100+ (MUI) Filled, Outlined, Rounded, Two tone, Sharp
@hubtoolify/icons-react 2.1.0 HubToolify free licence 4,309 free icons Line (free); 15 more styles in the Pro package

All seven ship TypeScript types, and all seven are marked sideEffects: false, so a modern bundler can drop the icons you don't import.

The same ten icons as drawn by HubToolify, Tabler, Lucide, Phosphor, Heroicons and Material Icons, the sets behind six of the React packages

What one icon really costs

"Tree-shakeable" tells you unused icons are dropped. It doesn't tell you what the icons you do use cost. So we wrote the same component for each package (one icon, then ten common ones: home, search, bell, heart, user, settings, camera, calendar, mail, star), bundled it with esbuild 0.28.2 in production mode with minification, left React out of the bundle because every app already has it, and measured the result gzipped (1 kB = 1,000 bytes).

Package 1 icon 10 icons
@heroicons/react (24 outline) 0.5 kB 2.1 kB
@tabler/icons-react 0.8 kB 1.6 kB
@phosphor-icons/react 1.1 kB 10.3 kB
react-icons (Feather set) 1.3 kB 2.0 kB
lucide-react 2.0 kB 2.9 kB
@hubtoolify/icons-react 2.2 kB 2.8 kB
@mui/icons-material 0.4 kB with MUI already in the app; 31.0 kB without it 1.5 kB; 32.1 kB

Bar chart of gzipped bundle cost for one and ten icons: Heroicons 0.5 and 2.1 kB, Tabler 0.8 and 1.6, Phosphor 1.1 and 10.3, react-icons 1.3 and 2.0, Lucide 2.0 and 2.9, HubToolify 2.2 and 2.8, MUI 0.4 and 1.5 with MUI already in the app

How to read it:

  • Every one of these is small. For a normal app, a few kilobytes of icons is not where your bundle weight is. Don't pick a library on this table alone.
  • The first icon includes a shared runtime. Lucide and HubToolify cost more for the first icon and little for each one after it. HubToolify's runtime includes the animation support described below.
  • Phosphor grows fastest because each icon component carries all six weights, so you can switch weight with a prop. Ten icons came to about 10 kB.
  • MUI icons need MUI. @mui/icons-material depends on @mui/material and Emotion. Inside an MUI app the icons are nearly free; in an app without MUI they bring about 30 kB of it along.

These numbers are one bundler on one day. A different bundler, or different icons, will move them a little, not change the picture.

Props: how you size, colour and style them

Every package accepts ordinary SVG attributes such as className, style and onClick. Beyond that:

  • Lucide takes size (24 px by default), color and strokeWidth; the default stroke is 2 px. A nonScalingStroke prop keeps the stroke the same width at any icon size (stroke width docs), and a LucideProvider sets these defaults for a whole tree.
  • react-icons sets defaults for a whole tree with IconContext.Provider: color, size (1em by default), className, style, attr and title. Imports go per set: import { FaBeer } from "react-icons/fa".
  • Heroicons components are plain SVG with title and titleId added. You size and colour them with classes, which suits Tailwind: className="size-6 text-blue-500". Each style is its own import path, such as @heroicons/react/24/outline.
  • Phosphor takes size, color, weight (thin to duotone), mirrored for right-to-left layouts and alt, and has its own IconContext. For React Server Components, import from @phosphor-icons/react/ssr (README).
  • Tabler takes size, color and stroke (the stroke width).
  • MUI icons are MUI SvgIcon components, so they are styled like the rest of MUI. One trap: MUI's own guide says named imports such as import { Home } from '@mui/icons-material' can be up to six times slower in development than path imports such as import HomeIcon from '@mui/icons-material/Home' (MUI bundle size guide).
  • HubToolify takes size (24 by default), color, strokeWidth (1.2 by default, on a 24 px grid) and title. Icons are hidden from screen readers by default and become role="img" when you give them a title or aria-label.

Animation built in

Only one package here animates its icons without a second library. Since 2.1.0, every @hubtoolify/icons-react icon takes an animation prop and a trigger:

import { HtiBell, HtiSettings, HtiHeart } from '@hubtoolify/icons-react';

<HtiSettings animation="spin" />                 {/* loops */}
<HtiBell animation="shake" trigger="hover" />    {/* once each time the pointer enters */}
<HtiHeart animation="beat" trigger="click" />    {/* once per click */}

Five HubToolify React icons animating with one prop each: a settings gear that spins, a bell that shakes, a heart that beats, a rocket that bounces and a star that flips

The motions are beat, beat-fade, fade, bounce, flip, shake, spin, spin-reverse and spin-pulse; trigger can be loop, hover, click or inview, and animationDuration sets the speed. The CSS is injected the first time an animated icon renders, and the motion stops for visitors who ask their system for reduced motion. With the other libraries you would add CSS of your own or a motion library. Part-by-part animation, such as an icon drawing itself on, is a separate Pro download as animated SVG or Lottie from animated icons; read Animated SVG Icons for how that works.

Licences: read them before you ship

  • MIT and ISC (Heroicons, Phosphor, Tabler, MUI, Lucide) let you use the icons commercially. Neither needs a credit on your website, but both ask you to keep the copyright notice with copies you redistribute, which the npm package already does.
  • react-icons is MIT as a package, but its README says the icons come from other projects, so you should "check each project licences accordingly". Some bundled sets are under other licences: Font Awesome Free's icons are CC BY 4.0, for example. If you use several sets, you have several licences.
  • HubToolify's free licence allows personal and commercial use with no attribution, including inside an app, theme or template you sell. What it forbids is selling or giving away the icons as an icon set of their own. The full text is on the licences page, and Free Icons for Commercial Use Without Attribution explains the common licence types.

Which one to pick

  • You use Tailwind and need a few dozen interface icons: Heroicons. Small set, made by the Tailwind team, styled with classes.
  • You want a large, consistent stroke set: Lucide or Tabler. Tabler has the most icons here and a filled version of many of them.
  • You need weights to show state (an outlined star that fills when chosen): Phosphor, at the cost of bigger icons.
  • Your app is built on MUI: @mui/icons-material, with path imports.
  • You want many styles from one import line, or icons from different sets: react-icons, keeping an eye on each set's licence.
  • You want icons that animate with a prop, a matching icon font and CDN, and one look across React, Svelte, Angular, React Native and Flutter: @hubtoolify/icons-react. The React icons page has a live playground. If you later need Solid, Duotone or the other Pro styles, @hubtoolify-pro/icons-react uses the same component names.

Whichever you choose, use one library per product. Mixing two sets in one toolbar almost always shows: stroke widths, corner radii and proportions differ even when each set looks good on its own.

Getting started with HubToolify's package

npm install @hubtoolify/icons-react
import { HtiHome } from '@hubtoolify/icons-react';

export default function HomeButton() {
  return (
    <button type="button" aria-label="Home">
      <HtiHome size={24} color="#1766f2" />
    </button>
  );
}

Component names are Hti plus the icon name in PascalCase, so arrow-up-right becomes HtiArrowUpRight. Installing from npm needs no account. Browsing the icon library to find names needs none either; copying or downloading an icon on the website needs a free account. For more ways to use the same icons (CSS classes, inline SVG, WordPress), see How to use SVG icons in React.

Related tools

Further reading

Discussion

0 comments

Join the discussion Your email is never published.
3,000 characters max

This site is protected by reCAPTCHA

No comments yet. Be the first to say something.

More reading

Related posts