# @amplitude/rrweb

> record and replay the web

Latest version **2.1.3** (published 2026-07-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install @amplitude/rrweb
pnpm add @amplitude/rrweb
yarn add @amplitude/rrweb
bun add @amplitude/rrweb
```

## 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 | 2.1.3 |
| Published | 2026-07-01 |
| First published | 2023-10-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 8 |
| Unpacked size | 6.1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 2 |
| Author | Amplitude Inc |
| Maintainers | curtisbliu, kelson.warner, sdk.dev, eric_amplitude, daniel-graham-amplitude, jjwang123 |
| Keywords | rrweb |

## Links

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

## Dependencies (8)

- [mitt](https://npm.io/package/mitt.md) ^3.0.0
- [@xstate/fsm](https://npm.io/package/@xstate/fsm.md) ^1.4.0
- [@amplitude/rrdom](https://npm.io/package/@amplitude/rrdom.md) ^2.1.2
- [base64-arraybuffer](https://npm.io/package/base64-arraybuffer.md) ^1.0.1
- [@amplitude/rrweb-types](https://npm.io/package/@amplitude/rrweb-types.md) ^2.1.2
- [@amplitude/rrweb-utils](https://npm.io/package/@amplitude/rrweb-utils.md) ^2.1.2
- [@amplitude/rrweb-snapshot](https://npm.io/package/@amplitude/rrweb-snapshot.md) ^2.1.2
- [@types/css-font-loading-module](https://npm.io/package/@types/css-font-loading-module.md) 0.0.7

## Recent versions

- 2.1.3 (latest) — 2026-07-01
- 2.0.0-alpha.12 (alpha) — 2023-10-24
- 2.1.2 — 2026-06-30
- 2.1.1 — 2026-05-12
- 2.1.0 — 2026-05-11
- 2.0.0-alpha.40 — 2026-05-04
- 2.0.0-alpha.39 — 2026-03-31
- 2.0.0-alpha.38 — 2026-03-30
- 2.0.0-alpha.37 — 2026-03-27
- 2.0.0-alpha.36 — 2026-03-18
- 2.0.0-alpha.35 — 2026-01-06
- 2.0.0-alpha.34 — 2025-12-15
- 2.0.0-alpha.33 — 2025-10-07
- 2.0.0-alpha.32 — 2025-07-09
- 2.0.0-alpha.31 — 2025-07-07
- … 18 more at https://npm.io/package/@amplitude/rrweb/versions

## README

<p align="center">
  <img width="100px" height="100px" src="https://www.rrweb.io/favicon.png">
</p>
<p align="center">
  <a href="https://www.rrweb.io/" style="font-weight: bold">Try rrweb</a>
</p>

# rrweb

**This is a simpler version of the [original rrweb README](../../README.md) within this rrweb subpackage**

[中文文档](../../README.zh_CN.md)

rrweb refers to 'record and replay the web', which is a tool for recording and replaying users' interactions on the web.

## Guide

[**📚 Read the rrweb guide here. 📚**](../../guide.md)

[**🍳 Recipes 🍳**](../../docs/recipes/index.md)

## Project Structure

**[rrweb](https://github.com/rrweb-io/rrweb)** mainly includes two funtions:

- **Record**: The record function is used to record all the mutations in the DOM
- **Replay**: The replay function is to replay the recorded mutations one by one according to the corresponding timestamp.

## Roadmap

- storage engine: do deduplication on a large number of rrweb sessions
- compact mutation data in common patterns
- provide plugins via the new plugin API, including:
  - XHR plugin
  - fetch plugin
  - GraphQL plugin
  - ...

## Internal Design

- [serialization](../../docs/serialization.md)
- [incremental snapshot](../../docs/observer.md)
- [replay](../../docs/replay.md)
- [sandbox](../../docs/sandbox.md)

## Contribute Guide

Since we want the record and replay sides to share a strongly typed data structure, rrweb is developed with typescript which provides stronger type support.

[Typescript handbook](https://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html)

1. Fork this repository.
2. Run `pnpm install` in the root to install required dependencies for all sub-packages.
3. Run `pnpm dev` in the root to get auto-building for all the sub-packages whenever you modify anything.
4. Navigate to one of the sub-packages (in the `packages` folder) where you'd like to make a change.
5. Patch the code and run `pnpm test` to run the tests, make sure they pass before you commit anything.
6. Push the code and create a pull request.

Protip: You can run `pnpm test` in the root folder to run all the tests.

In addition to adding integration tests and unit tests, rrweb also provides a REPL testing tool.

[Using the REPL tool](../../guide.md#REPL-tool)

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