# react-docgen

> A library to extract information from React components for documentation generation.

Latest version **8.0.4** (published 2026-09-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-docgen
pnpm add react-docgen
yarn add react-docgen
bun add react-docgen
```

## Health

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

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

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 8.0.4 |
| Published | 2026-09-20 |
| First published | 2015-03-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | ^20.9.0 \|\| >=22 |
| Dependencies | 10 |
| Unpacked size | 226.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 3820 |
| Author | Felix Kling |
| Maintainers | danez |
| Keywords | react, documentation, documentation-generation |

## Links

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

## Dependencies (10)

- [resolve](https://npm.io/package/resolve.md) ^1.22.1
- [doctrine](https://npm.io/package/doctrine.md) ^3.0.0
- [@babel/core](https://npm.io/package/@babel/core.md) ^7.28.0
- [@babel/types](https://npm.io/package/@babel/types.md) ^7.28.2
- [strip-indent](https://npm.io/package/strip-indent.md) ^4.0.0
- [@types/resolve](https://npm.io/package/@types/resolve.md) ^1.20.2
- [@babel/traverse](https://npm.io/package/@babel/traverse.md) ^7.28.0
- [@types/doctrine](https://npm.io/package/@types/doctrine.md) ^0.0.9
- [@types/babel__core](https://npm.io/package/@types/babel__core.md) ^7.20.5
- [@types/babel__traverse](https://npm.io/package/@types/babel__traverse.md) ^7.20.7

## 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

- 8.0.4 (latest) — 2026-09-20
- 6.0.0-rc.9 (rc) — 2023-05-20
- 6.0.0-beta.6 (beta) — 2023-03-25
- 6.0.0-beta.5 (alpha) — 2023-01-31
- 6.0.0-alpha.3 (next) — 2022-06-13
- 8.0.3 — 2026-03-13
- 8.0.2 — 2025-10-08
- 8.0.1 — 2025-08-17
- 8.0.0 — 2025-04-23
- 7.1.1 — 2025-01-26
- 7.1.0 — 2024-10-19
- 7.0.3 — 2024-01-12
- 7.0.2 — 2024-01-08
- 7.0.1 — 2023-11-12
- 7.0.0 — 2023-10-19
- … 84 more at https://npm.io/package/react-docgen/versions

## README

# react-docgen

[`react-docgen`](./packages/react-docgen/) is a highly customizable library that
extracts information from [React](https://reactjs.org/) components and returns
this information in a structured machine readable format from which
documentations can be generated.

[`@react-docgen/cli`](./packages/react-docgen-cli/) is a cli wrapper around the
library allowing using `react-docgen` on the command line.

## Typescript

See [this issue](https://github.com/reactjs/react-docgen/issues/1005) about the status of TypeScript.

## Documentation

For version 5.x please checkout the
[README.md on the 5.x branch](https://github.com/reactjs/react-docgen/blob/5.x/README.md)

For version 6.x and newer please visit
[react-docgen.dev](https://react-docgen.dev)

## License

This project is licensed under the MIT License.

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