mirror of
https://github.com/formbricks/formbricks.git
synced 2026-05-05 21:31:03 -05:00
37 lines
1.4 KiB
Markdown
37 lines
1.4 KiB
Markdown
# Formbricks Browser JS Library
|
|
|
|
[](https://www.npmjs.com/package/@formbricks/js)
|
|
[](https://opensource.org/licenses/MIT)
|
|
|
|
Please see [Formbricks Docs](https://formbricks.com/docs).
|
|
Specifically, [Quickstart/Implementation details](https://formbricks.com/docs/getting-started/quickstart).
|
|
|
|
## 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 -s @formbricks/js
|
|
```
|
|
|
|
2. 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.init({
|
|
environmentId: "your-environment-id",
|
|
apiHost: "https://app.formbricks.com",
|
|
});
|
|
}
|
|
```
|
|
|
|
Replace your-environment-id with your actual environment ID. You can find your environment ID in the **Setup Checklist** in the Formbricks settings.
|
|
|
|
For more detailed guides for different frameworks, check out our [Next.js](https://formbricks.com/docs/getting-started/nextjs) and [Vue.js](https://formbricks.com/docs/getting-started/vuejs) guides.
|