← back to all libraries
// ICON LIBRARY

Heroicons

Beautiful hand-crafted SVG icons by the Tailwind CSS team

reactvuenextjsMIT
GitHub →Official Site →

STATS

292
Icons
21,000
GitHub Stars
1.8M
Weekly Downloads
MIT
License
~1kb per icon
Bundle Size
2020
Since

OVERVIEW

Heroicons is a premium open-source icon library created and maintained by the team behind Tailwind CSS. Every icon is hand-crafted by professional designers, resulting in a level of visual polish that is difficult to match in the open-source space.

The library offers icons in three distinct styles — outline (24x24), solid (24x24), and mini (20x20). This gives you the flexibility to use lighter outline icons for general UI and solid/filled icons for emphasis or active states, all within the same consistent visual system.

Heroicons ships as a React and Vue package with full TypeScript support. Every icon is tree-shakable, so your bundle only includes what you use. The library is tightly integrated with Tailwind CSS — icons accept className props and work perfectly with Tailwind utility classes for sizing and coloring.

// VERDICTHeroicons is the best choice if you are already using Tailwind CSS. The design language matches Tailwind UI components perfectly. The only significant limitation is the icon count — at 292 icons it is one of the smaller libraries, so complex applications may find gaps.

INSTALLATION

react
npm install @heroicons/react
nextjs
npm install @heroicons/react

// Note: Fully compatible with Next.js App Router and Pages Router. Works in both Server and Client components.
vue
npm install @heroicons/vue
svelte
// No official Svelte package — use SVG directly from heroicons.com
vanilla
// No vanilla JS package — copy SVG code directly from heroicons.com

CODE EXAMPLES

basic
import { HomeIcon, BellIcon, UserIcon } from '@heroicons/react/24/outline'

export default function App() {
  return (
    <div>
      <HomeIcon className="h-6 w-6" />
      <BellIcon className="h-6 w-6 text-blue-500" />
      <UserIcon className="h-6 w-6 text-gray-400" />
    </div>
  )
}
solid Variant
// Use solid icons for emphasis or active states
import { HomeIcon } from '@heroicons/react/24/solid'
import { HomeIcon as HomeOutline } from '@heroicons/react/24/outline'

export default function Nav() {
  const isActive = true
  const Icon = isActive ? HomeIcon : HomeOutline
  return <Icon className="h-6 w-6" />
}
mini Icons
// Mini icons (20x20) for dense UIs like badges and tags
import { CheckIcon, XMarkIcon } from '@heroicons/react/20/solid'

export default function Badge() {
  return (
    <span className="flex items-center gap-1 text-sm">
      <CheckIcon className="h-4 w-4 text-green-500" />
      Verified
    </span>
  )
}

PROS & CONS

PROS
Hand-crafted by designers
Every icon is professionally designed, not auto-generated. The visual quality is consistently higher than most open-source alternatives.
Three style variants
Outline, solid, and mini styles give you flexibility for different UI contexts without switching libraries.
Perfect Tailwind integration
Built by the Tailwind team, Heroicons works seamlessly with Tailwind utility classes. Sizing and coloring via className is intuitive.
Actively maintained
Backed by the Tailwind CSS team which has strong commercial incentives to keep the library up to date.
Minimal and professional
The design language is clean and neutral — icons don't draw attention to themselves, they serve the UI.
CONS
Only 292 icons
This is the biggest limitation. Complex applications often need niche icons that Heroicons simply does not have.
No Vue 2 support
The Vue package only supports Vue 3. Older Vue projects cannot use Heroicons without workarounds.
No Svelte or Angular package
Official support is limited to React and Vue. Svelte and Angular developers need to use SVG directly.
No Figma plugin
Unlike Lucide, there is no official Figma plugin, making designer-developer handoff slightly harder.

WHO SHOULD USE THIS

USE IF YOU...
Teams already using Tailwind CSS — the integration is seamless
Projects that prioritize design quality over icon variety
Applications with clean, minimal UI design language
React and Next.js projects with straightforward icon needs
Teams that want solid and outline variants from the same library
AVOID IF YOU...
Applications that need 500+ unique icons — 292 will not be enough
Svelte or Angular projects without a React/Vue layer
Projects that need brand or logo icons
Teams that need a Figma plugin for designer handoff

FREQUENTLY ASKED QUESTIONS

Q.Is Heroicons free for commercial use?
A.Yes. Heroicons is MIT licensed which means you can use it in any commercial project, modify it, and distribute it freely without any attribution required.
Q.What is the difference between Heroicons outline and solid?
A.Outline icons use strokes on a transparent background — they are lighter and work well for general UI. Solid icons are fully filled and create more visual weight, making them ideal for active states, buttons, and emphasis.
Q.Can I use Heroicons without Tailwind CSS?
A.Yes. Heroicons works with any CSS framework or plain CSS. Tailwind is not a requirement — you can style icons with regular CSS classes or inline styles.
Q.How do I change the color of a Heroicon?
A.Pass a className with a text color utility — for example className='text-blue-500' with Tailwind, or use CSS color property. The icons use currentColor so they inherit the text color of their parent.
Q.Does Heroicons work with Next.js Server Components?
A.Yes. Heroicons are pure SVG components with no client-side dependencies, making them fully compatible with Next.js Server Components in the App Router.

COMPARE WITH ALTERNATIVES

Heroicons vs Lucide IconsHeroicons vs Tabler IconsHeroicons vs Phosphor IconsHeroicons vs Remix IconHeroicons vs Feather IconsHeroicons vs Bootstrap IconsHeroicons vs Radix Icons