# @patternfly/react-icons

> PatternFly 4 Icons as React Components

Latest version **6.6.1** (published 2026-08-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install @patternfly/react-icons
pnpm add @patternfly/react-icons
yarn add @patternfly/react-icons
bun add @patternfly/react-icons
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; large bundle.

## Facts

| | |
|---|---|
| Version | 6.6.1 |
| Published | 2026-08-03 |
| First published | 2018-07-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 17.1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 862 |
| Author | Red Hat |
| Maintainers | dgutride, dlabrecq, patternfly-build, jeff-phillips-18, mturley, bennyp, mwcz, kylebuch8, evwilkin, schulj12, nicolethoen, heymp, zhawkins, dlabaj, ausuliv, kmcfaul |
| Keywords | react, patternfly |

## Links

- npm: https://www.npmjs.com/package/@patternfly/react-icons
- Repository: https://github.com/patternfly/patternfly-react
- Homepage: https://github.com/patternfly/patternfly-react#readme
- Issues: https://github.com/patternfly/patternfly-react/issues
- npm.io page: https://npm.io/package/@patternfly/react-icons

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^2.8.1

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 6.6.1 (latest) — 2026-08-03
- 6.6.1-prerelease.4 (prerelease) — 2026-09-15
- 6.5.1 (prerelease-patch) — 2026-05-21
- 5.4.2 (prerelease-v5) — 2024-10-17
- 6.0.0-alpha.37 (alpha) — 2024-08-27
- 5.2.1 (prerelease-bugfix) — 2024-02-29
- 4.93.7 (prerelease-v4) — 2023-06-05
- 6.6.1-prerelease.3 — 2026-09-11
- 6.6.1-prerelease.2 — 2026-09-09
- 6.6.1-prerelease.1 — 2026-08-31
- 6.6.1-prerelease.0 — 2026-08-03
- 6.6.0 — 2026-07-01
- 6.6.0-prerelease.4 — 2026-06-26
- 6.6.0-prerelease.3 — 2026-06-24
- 6.6.0-prerelease.2 — 2026-06-24
- … 928 more at https://npm.io/package/@patternfly/react-icons/versions

## README

# @patternfly/react-icons

PatternFly Icons as React Components.

## Usage

```tsx
import RhMicronsCloseIcon from  '@patternfly/react-icons/dist/esm/icons/rh-microns-close-icon';

const closeIcon = <RhMicronsCloseIcon />;
```

For a list of the available icons please refer to the [PatternFly react docs](https://pf-react-staging.patternfly.org/icons)

## Styling icons

All icons from @patternfly/react-icons have the HTML class `pf-v6-svg` applied and CSS styles applied via @patternfly/react-styles.

If not using @patternfly/react-icons in conjunction with @patternfly/react-styles, then the following generic styles will need to be applied to the icons: `height="1em", style="vertical-align: -0.125em;" width="1em"`

If using @patternfly/react-icons in conjunction with @patternfly/react-core, icons can be further styled by wrapping an icon from
@patternfly/react-icons in a PatternFly icon component.

## Adding icons

Icons for this package are generated from the `@fortawesome/free-solid-svg-icons` package.

If you have some custom icon defined by an SVG path the best way to add such icon to this repository is to add its path definition in the [customIcons.mjs](./scripts/icons/customIcons.mjs) file.

```JS
export default {
    // ... other icon defintions
    bigPlus: {width: 1024, height: 1024, svgPathData: 'M2 1 h1 v1 h1 v1 h-1 v1 h-1 v-1 h-1 v-1 h1 z'}
}
```

## Tree shaking

Ensure optimization.sideEffects is set to true within your Webpack config:

```JS
optimization: {
  sideEffects: true
}
```

Use ESM module imports to enable tree shaking with no additional setup required.

```JS
import RhMicronsCloseIcon from  '@patternfly/react-icons/dist/esm/icons/rh-microns-close-icon';
```

To enable tree shaking with named imports for CJS modules, utilize [babel-plugin-transform-imports](https://www.npmjs.com/package/babel-plugin-transform-imports) and update a babel.config.js file to utilize the plugin:

```JS
module.exports = {
  presets: ["@babel/preset-env", "@babel/preset-react"],
  plugins: [
    [
      "transform-imports",
      {
        "@patternfly/react-icons": {
          transform: (importName, matches) => `@patternfly/react-icons/dist/js/icons/${importName.split(/(?=[A-Z])/).join('-').toLowerCase()}`,
          preventFullImport: true
        }
      }
    ]
  ]
}
```

## Static SVGs

All icons are also available as static SVG files in `@patternfly/react-icons/dist/static`. The static SVGs include all the same attributes as the React components (viewBox, class names, etc.) to ensure visual consistency.

Static SVGs are useful when you need to:
- Use icons in non-React contexts, such as static HTML
- Reference icons via URL or file path

### Usage

You can import or reference static SVG files directly:

```jsx
// In HTML
<img src="/icons/static/rh-microns-close-icon.svg" alt="Close" />

// In CSS
.close-icon {
  background-image: url('/icons/static/rh-microns-close-icon.svg');
}

// Direct file path
import RhMicronsCloseIcon from '@patternfly/react-icons/dist/static/rh-microns-close-icon.svg';
```

---
_Source: https://npm.io/package/@patternfly/react-icons · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
