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 Button (Default)
A small button appears in the bottom-right corner. Clicking it opens a slide-out panel where users can browse features, vote, comment, and submit new requests.
<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. 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" |
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 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 Enterprise 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.