Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@heroicons/react

tailwindlabs5.2mMIT2.2.0TypeScript support: included

readme

<picture> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/tailwindlabs/heroicons/HEAD/.github/logo-dark.svg"> <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/tailwindlabs/heroicons/HEAD/.github/logo-light.svg"> Heroicons </picture>

Beautiful hand-crafted SVG icons, by the makers of Tailwind CSS.
Available as basic SVG icons and via first-party React and Vue libraries.

Browse at Heroicons.com →

Latest Release License

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.

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Unreleased

  • Nothing yet!

2.2.0 - 2024-11-18

Added

  • Add React 19 support (#1247)

Fixed

  • Removed unnecessary clipping path from solid/arrow-left-circle (#1211)

2.1.5 - 2024-07-10

Added

  • Add new icons (arrow-turn-*, bold, calendar-date-range, divide, document-currency-*, equals, h1, h2, h3, italic, link-slash, numbered-list, percent-badge, slash, strikethrough, underline)

2.1.4 - 2024-06-17

Fixed

  • Improve tree-shakability of React package (#1192)

2.1.3 - 2024-03-22

  • Improve project READMEs (#1152)

2.1.2 - 2024-03-22

  • Include license file with published packages (#1151)

2.1.1 - 2023-12-18

Fixed

  • Fixed chevrons in mini set (#1106)

2.1.0 - 2023-12-18

Added

  • Added micro icon set (#1104)
  • Rebuilt some icons for better clarity (#1104)

2.0.18 - 2023-05-09

Fixed

  • Fix incorrect esm paths in package.json for both React and Vue (#988)

2.0.17 - 2023-03-30

Fixed

  • Fix React icon types (#966)

2.0.16 - 2023-02-17

Fixed

  • Add root-level import (#936)

2.0.15 - 2023-02-08

Fixed

  • Fix icon tree-shaking (#929)

2.0.14 - 2023-01-25

Fixed

  • Fix React ref types (#903)

Changed

  • Specify explicit package exports (#920)

2.0.13 - 2022-11-02

Fixed

  • Fix minus icon alignment (0a88242)

2.0.12 - 2022-10-05

Fixed

  • Add title and titleId props to the React types (#814)
  • Fix information-circle icon alignment (#846)

2.0.11 - 2022-09-12

Added

  • Add new icons (bug-ant, eye-dropper, pause-circle, play-circle, power, rocket-launch, square-2-stack-3d, stop-circle, trophy, tv, viewfinder-circle, window) (#809)

2.0.10 - 2022-08-30

Fixed

  • Fix arrow-path direction and fix optical alignment of exclamation-triangle (#786)

2.0.9 - 2022-08-30

Added

  • Add new icons (arrow-small-down, arrow-small-left, arrow-small-right, arrow-small-up, battery-0, battery-100, battery-50, cube-transparent, currency-bangladeshi, minus-small, paint-brush, plus-small, variable, wallet, arrow-path-rounded-square) and fix optical alignment and appearance of icons (bookmark-slash, bookmark, exclamation-triangle, table-cells, view-columns, arrow-path) (#785)

2.0.8 - 2022-08-26

Fixed

  • Fix optical alignment and size of icons (heart, minus, pencil-square, user-plus, x-mark, hand-thumb-up, hand-thumb-down) (#767)
  • Fix size of icons (arrow-down-left, arrow-down-right, arrow-down, arrow-left, arrow-right, arrow-up-left, arrow-up-right, arrow-up) (#768)
  • Fix optical alignment and size of tag icon (#769)
  • Fix size of check icon (#770)

Added

  • Add user-minus icon

2.0.7 - 2022-08-25

Fixed

  • Improve optical alignment and sizing of icons (hand-thumb-up, hand-thumb-down, plus, minus) (#746)

2.0.6 - 2022-08-25

Fixed

  • Fix size of icons (chevron-double-down, chevron-double-left, chevron-double-right, chevron-double-up, chevron-down, chevron-left, chevron-right, chevron-up, funnel, minus, plus) (#763)

2.0.5 - 2022-08-25

Fixed

  • Modify the curved design of the check-* icons to a straight check (#762)

2.0.4 - 2022-08-24

Fixed

  • Remove additional stroke from outline icons (bars-arrow-down,bars-arrow-up,chevron-up-down, rss) (#759)

2.0.3 - 2022-08-24

Added

  • Add missing icons from v1 (bars-arrow-down,bars-arrow-up,chevron-up-down, rss) (#758)

Fixed

  • Fix inconsistent naming for 'code-bracket' icons (#756)

2.0.2 - 2022-08-24

Fixed

  • Fix typo in exclamation-* icons (#735)

2.0.1 - 2022-08-23

Added

  • Warn when trying to import from v1 paths (f508658)

2.0.0 - 2022-08-23

Added

  • Completely new icon set, checkout the release notes for more info.

1.0.6 - 2022-03-02

Added

  • Add forwardRef support for React components (#614)

Fixed

  • Add sideEffects to package.json files (#572)
  • Fix folder icons (#598)
  • Fix Vue TypeScript declarations (#608)
  • Move stroke-width from path to svg (#631)

1.0.5 - 2021-10-22

Fixed

  • Add MIT license to package.json files (#317)
  • Add aria-hidden="true" attribute (#261)
  • Fix solid arrows-expand fill color (#515)
  • Add {"type": "module"} to esm package.json files

1.0.4 - 2021-08-17

Fixed

  • Fix Vue type declarations (#322)

1.0.3 - 2021-07-26

Added

  • Add Vue type declarations (#254)

1.0.2 - 2021-07-09

Fixed

  • Add correct plus icons

1.0.1 - 2021-04-14

Added

  • Add small arrow icons (arrow-sm-up, arrow-sm-right, arrow-sm-down, arrow-sm-left)

1.0.0 - 2021-03-29

0.4.2 - 2020-09-02

0.4.1 - 2020-08-26

0.4.0 - 2020-08-25

Fixed

  • Don't run build scripts on install

0.3.7 - 2020-07-23

0.3.6 - 2020-06-02

0.3.5 - 2020-06-01

0.3.4 - 2020-06-01

0.3.3 - 2020-06-01

0.3.2 - 2020-06-01

0.3.1 - 2020-06-01

0.3.0 - 2020-06-01

Added

  • Add 22 new icons (fire, shopping-bag, thumb-up, thumb-down, hand, arrows-expand, view-grid, puzzle, folder-download, folder-add, folder-remove) (60e6750)
  • Add React and Vue components (aa8fe98)

0.2.0 - 2020-05-18

Added

  • Everything!