mirror of
https://github.com/formbricks/formbricks.git
synced 2026-02-12 09:39:39 -06:00
* add placement enum and prop to db scheme * enable placement toggle in setttings * enable in-app survey placement demo * add position helper function * add placement to in-app-modal preview * add placement prop to api endpoint * add placement to widget * remove coming soon * add styling * add apply tailwind styles instead of a ts function * add clickoutside and darkoverlay prop * add darkOverlay and clickOutside form * update js package tailwind apply classes * add background to widget and close on click outside * only show backdrop and clickOutside if is center * only display background when modal is centered * responsive changes in js widget * add updated migration, move styles from global.css to function --------- Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
Formbricks Browser JS Library
Please see Formbricks Docs. Specifically, Quickstart/Implementation details.
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.
How to use this library
- Install the Formbricks package inside your project using npm:
npm install -s @formbricks/js
- Import Formbricks and initialize the widget in your main component (e.g., App.tsx or App.js):
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 and Vue.js guides.