# @patternfly/react-styles

> CSS-in-JS class maps and utilities for PatternFly.

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

## Install

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

## 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-06-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 13.4 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Red Hat |
| Maintainers | dgutride, dlabrecq, patternfly-build, jeff-phillips-18, mturley, bennyp, mwcz, kylebuch8, evwilkin, schulj12, nicolethoen, heymp, zhawkins, dlabaj, ausuliv, kmcfaul |

## Links

- npm: https://www.npmjs.com/package/@patternfly/react-styles
- npm.io page: https://npm.io/package/@patternfly/react-styles

## Recent versions

- 6.6.1 (latest) — 2026-08-03
- 6.6.1-prerelease.1 (prerelease) — 2026-08-31
- 6.5.1 (prerelease-patch) — 2026-05-21
- 5.4.1 (prerelease-v5) — 2024-10-17
- 6.0.0-alpha.35 (alpha) — 2024-08-19
- 5.2.1 (prerelease-bugfix) — 2024-02-29
- 4.92.8 (prerelease-v4) — 2023-06-05
- 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
- 6.6.0-prerelease.1 — 2026-05-26
- 6.5.1-prerelease.0 — 2026-05-21
- 6.5.0 — 2026-05-20
- … 866 more at https://npm.io/package/@patternfly/react-styles/versions

## README

# @patternfly/react-styles

Library that provides CSS-in-JS capabilities 

#### Example 

```tsx
import { css } from '@patternfly/react-styles';
import styles from './Button.css';

const Button = ({ isActive, isDisabled, children }) => (
  <button
    disabled={isDisabled}
    className={css(styles.button, isActive && styles.modifiers.active, isDisabled && styles.modifiers.disabled)}
  >
    {children}
  </button>
);
```

##### DOM output

```html
<button disabled="" class="pf-c-button pf-is-disabled">
  Hello World
</button>
```

[classnames]: https://github.com/JedWatson/classnames
[css-modules]: https://github.com/css-modules/css-modules
[babel]: https://github.com/babel/babel
[jest-styled-components]: https://github.com/styled-components/jest-styled-components#snapshot-testing
[jest-glamor-react]: https://github.com/kentcdodds/jest-glamor-react
[jest-aphrodite-react]: https://github.com/dmiller9911/jest-aphrodite-react

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