Start widget with npm or yarn
Quick installation guide to start the BetterBugs feedback widget with npm or yarn.
How to Install the BetterBugs Feedback Widget using npm/yarn Package Managers?
Here are the steps for it:
1
2
3
Initialize the Widget (with default UI)
In your script file, import the SDK, create a BetterBugs instance from the import class, and initialize.
Don’t forget to add your Workspace API Key and Project ID in the function::
import { Betterbugs } from "@betterbugs/web-sdk";
const startBB = new Betterbugs({
apiKey: "YOUR_API_KEY_HERE", // Workspace API key
projectId: "YOUR_PROJECT_ID_KEY_HERE", // Project to report bugs to
});
startBB();4
Customize the Widget UI (Optional)
You can customize the SDK with your brand colors and design from the initialization function:
import { Betterbugs } from "@betterbugs/web-sdk";
const startBB = new Betterbugs({
apiKey: "YOUR_API_KEY_HERE", // Workspace API key
projectId: "YOUR_PROJECT_ID_KEY_HERE", // Project to report bugs to
position: { top: "20px", right: "20px" },
styles: {
primaryColor: "#e41c38",
primaryTextColor: "#fff",
theme: "light",
},
});
startBB();Last updated