Configuration
Pass options to BugFence.init(config) or to the React provider’s config prop.
| Option | Type | Default | Description |
|---|---|---|---|
projectKey |
string |
required | Public key for report ingestion. |
endpoint |
string |
localhost endpoint | Report API URL. Set the production URL explicitly. |
position |
bottom-right, bottom-left, top-right, top-left |
bottom-right |
Launcher placement. |
theme |
auto, light, dark |
auto |
Widget appearance. |
lazyWidget |
boolean |
false |
Defer widget UI construction until opened. Does not reduce the SDK script download. |
showLauncher |
boolean |
true |
Show the floating launcher; when disabled, open the widget using BugFence.open(). |
capturePanel |
boolean |
true |
Open the capture panel from the launcher when the studio add-on is available. |
offset |
{ x, y } |
20 pixels | Distance from the viewport edges. |
iconOnly |
boolean |
false |
Use an icon-only launcher. |
launcherText, widgetTitle |
string |
See SDK types | Customize the launcher label and modal title. |
launcherColor, launcherTextColor, accentColor |
string |
See SDK types | Customize widget colors. Check text contrast. |
brandName, brandLogo, customIcon |
string |
unset | Customize branding and icons. |
locale |
BCP 47 string | detected | Override widget language, for example de or pt-BR. |
labels |
string map | unset | Override individual widget labels as plain text. |
excludeUrls, includeUrls, routePredicate |
route rules | unset | Control where the widget is available; see route filtering. |
forms |
boolean or URL |
enabled | Forms and translations add-on. false disables the feature. |
studio |
boolean or URL |
enabled | Capture studio add-on. false disables the feature. |
annotate |
boolean or URL |
enabled | Recording annotation add-on. false disables the feature. |
Example:
BugFence.init({ projectKey: 'pk_live_your_public_key', endpoint: 'https://bugs.example.com/api/v1/reports', position: 'bottom-right', lazyWidget: true, privacy: { maskInputs: true, maskEmails: true, maskSelectors: ['.account-balance'] }});Use Add-ons for loading behavior and Privacy and CSP for data protection guidance. Replay canvas and owned-frame modes are not available in this release; do not enable them.
Options and defaults can vary by SDK release. The BugFenceConfig type in the installed package is the source of truth for that version.