@inlinefeed/widget
v2.4.0
Published
InlineFeed feedback widget — collect user feedback with a single script tag or npm import
Downloads
1,597
Maintainers
Readme
@inlinefeed/widget
Lightweight feedback widget you can drop into any website or SPA. Collect mood ratings, comments, screenshots and categories — all from a single script tag or npm import.
Widget appearance and behavior are configured from your InlineFeed dashboard — no client-side options needed beyond your project key.
Quick Start
CDN (simplest)
<script src="https://cdn.inlinefeed.com/widget.js"
data-project="YOUR_PUBLIC_KEY"></script>That's it. The widget fetches its configuration (colors, position, labels, categories, etc.) from the InlineFeed API automatically.
Optional data attributes:
| Attribute | Description |
|---|---|
| data-project | Required — your project's public key |
npm / ES modules
npm install @inlinefeed/widgetimport { InlineFeed } from '@inlinefeed/widget';
InlineFeed.init({ projectKey: 'YOUR_PUBLIC_KEY' });
// Tear down when needed (SPA route change, etc.)
InlineFeed.destroy();Options
| Option | Type | Default | Description |
|---|---|---|---|
| projectKey | string | required | Your project's public key |
All other settings (position, colors, icons, labels, trigger behavior, categories, branding, etc.) are managed from your InlineFeed dashboard and fetched automatically when the widget initializes.
API
InlineFeed.init(options: InlineFeedOptions): void
InlineFeed.init(projectKey: string): void // legacy shorthand
InlineFeed.destroy(): voidinit()accepts an options object or a plain project key string (legacy).destroy()removes all DOM elements and event listeners. Safe to call even if the widget isn't initialized.
TypeScript
Full type definitions are included (widget.d.ts).
Framework Notes
- SPA (React, Vue, Angular, etc.) — call
InlineFeed.destroy()on unmount/route change, theninit()again when needed. - SSR / Next.js — the widget is browser-only; import it dynamically or guard with
typeof window !== 'undefined'.
License
Proprietary — inlinefeed.com
