JavaScript Widget
Embed a feature voting board on any website with a single script tag. Works on WordPress, Shopify, static HTML, React, and any web platform.
Quick start
Add the following script tag to your website. Replace YOUR_API_KEY with your project's API key from the dashboard.
Floating launcher
Choose an icon or bring your own image. Click the preview button to open the panel, then copy your embed code. The launcher appears in the bottom-right corner of your website.
<script
src="https://featureportal.com/widget.js"
data-project="YOUR_API_KEY"
></script>Inline embed
Renders the feature board directly inside a specific element on your page. Launcher settings apply only to floating mode. Great for dedicated feedback pages.
<div id="featureportal"></div>
<script
src="https://featureportal.com/widget.js"
data-project="YOUR_API_KEY"
data-mode="inline"
data-target="#featureportal"
></script>Configuration
Configure the widget using data-* attributes on the script tag.
| Attribute | Required | Default | Description |
|---|---|---|---|
data-project | Yes | — | Your project API key from the dashboard |
data-mode | No | "floating" | "floating" for button + panel, "inline" for embedded |
data-target | No | — | CSS selector for the container element (inline mode only) |
data-theme | No | "auto" | "auto" (matches system), "light", or "dark" |
data-launcher-icon | No | bulb | Built-in icon or fallback for a custom image. Choose bulb, portal, chat, or sparkles. |
data-launcher-icon-url | No | — | Custom image URL. Use an HTTP(S) URL or a path beginning with / on the embedding site. |
data-launcher-shape | No | circle | Use circle or rounded for a rounded square. |
data-launcher-color | No | Theme color | Button background in six-digit hex, such as #176354. The built-in icon color adjusts for contrast. |
JavaScript initialization
For manual setup, load widget.js without a data-project attribute and call FeaturePortal.init after the script loads.
FeaturePortal.init({
project: "YOUR_API_KEY",
launcher: {
icon: "chat",
iconUrl: "/images/feedback.svg",
shape: "rounded",
color: "#176354"
}
})Features
- Browse features — Users can see all approved, in-progress, and completed features
- Vote — One-click upvoting with instant feedback
- Comment — Discuss features with other users and admins
- Submit requests — Users can suggest new features directly
- Search & filter — Filter by status or search by keyword
- Dark mode — Automatic or manual theme support
- Style isolation — Uses Shadow DOM so widget styles never conflict with your site
- Persistent identity — Anonymous user ID stored in localStorage so votes persist across sessions
How it works
Rate limits
The widget shares the same rate limits as the iOS and macOS SDK:
- Read operations (fetching features, comments): 100 requests/minute per API key
- Write operations (voting, commenting, submitting): 30 requests/minute per API key
Branding
On the Starter plan, the widget shows a "Powered by FeaturePortal" link at the bottom. Upgrade to Pro or Studio to remove it.
Troubleshooting
data-project attribute contains a valid API key. For inline mode, verify the data-target selector matches an existing element.script-src featureportal.com and connect-src featureportal.com in your policy.localStorage. In some environments (e.g., cross-origin iframes, private browsing), localStorage may be restricted. The widget still works but votes won't persist across page loads.