# @formbricks/js

> Formbricks-js allows you to connect your index to Formbricks, display surveys and trigger events.

Latest version **5.0.0** (published 2026-05-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install @formbricks/js
pnpm add @formbricks/js
yarn add @formbricks/js
bun add @formbricks/js
```

## Health

**Score 60/100 (C)** — status: active.

Positive: esm support; no vulnerabilities; has provenance; high maintenance score.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 5.0.0 |
| Published | 2026-05-27 |
| First published | 2023-03-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Dependencies | 0 |
| Unpacked size | 29.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 3 |
| Author | Formbricks |
| Maintainers | formbricks-com, matthiasnannt |
| Keywords | Formbricks, surveys, experience management |

## Links

- npm: https://www.npmjs.com/package/@formbricks/js
- Repository: https://github.com/formbricks/js
- Homepage: https://formbricks.com
- Issues: https://github.com/formbricks/js/issues
- npm.io page: https://npm.io/package/@formbricks/js

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

- 5.0.0 (latest) — 2026-05-27
- 4.0.0-beta.1 (beta) — 2025-03-17
- 4.4.0 — 2026-04-28
- 4.3.0 — 2025-12-12
- 4.2.1 — 2025-10-07
- 4.2.0 — 2025-10-01
- 4.1.0 — 2025-04-03
- 4.0.0 — 2025-03-18
- 4.0.0-beta.2 — 2025-03-18
- 3.0.2 — 2024-12-30
- 3.0.1 — 2024-10-12
- 3.0.0 — 2024-10-08
- 2.2.0 — 2024-08-27
- 2.1.1 — 2024-07-10
- 2.1.1-beta.1 — 2024-07-08
- … 64 more at https://npm.io/package/@formbricks/js/versions

## README

# Formbricks Browser JS Library

[![npm package](https://img.shields.io/npm/v/@formbricks/js?style=flat-square)](https://www.npmjs.com/package/@formbricks/js)
[![MIT License](https://img.shields.io/badge/License-MIT-red.svg?style=flat-square)](https://opensource.org/licenses/MIT)

Please see [Formbricks Docs](https://formbricks.com/docs).
Specifically, [Quickstart/Implementation details](https://formbricks.com/docs/getting-started/quickstart-in-app-survey).

## What is Formbricks

Formbricks is your go-to solution for in-product micro-surveys that will supercharge your product experience! 🚀 For more information please check out [formbricks.com](https://formbricks.com).

## How to use this library

1. Install the Formbricks package inside your project using npm:

```bash
npm install @formbricks/js
```

1. Import Formbricks and initialize the widget in your main component (e.g., App.tsx or App.js):

```javascript
import formbricks from "@formbricks/js";

if (typeof window !== "undefined") {
  formbricks.setup({
    workspaceId: "your-workspace-id",
    appUrl: "https://app.formbricks.com",
  });
}
```

Replace your-workspace-id with your actual workspace ID. You can find your workspace ID in the **Setup Checklist** in the Formbricks settings. If you want to use the user identification feature, please check out [our docs for details](https://formbricks.com/docs/app-surveys/user-identification).

> `environmentId` is still accepted for backward compatibility but is deprecated and will be removed in a future version. Prefer `workspaceId`.

For more detailed guides for different frameworks, check out our [Framework Guides](https://formbricks.com/docs/getting-started/framework-guides).

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