npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@intentai/vanilla-widget

v1.0.0

Published

Intent AI embeddable feedback widget with frustration detection and proactive help

Readme

FeedbackIQ Widget

Embeddable JavaScript widget for collecting voice and text feedback from your users.

Features

  • Voice Feedback: Record audio feedback with one click
  • Text Feedback: Traditional text feedback form
  • Session Tracking: Automatic tracking of user sessions and navigation
  • Shadow DOM: Isolated styles, won't conflict with your site
  • Lightweight: < 50KB gzipped
  • Framework Agnostic: Works with any JavaScript framework or vanilla sites

Installation

Option 1: CDN (Recommended)

Add this script tag to your HTML:

<script src="https://cdn.feedbackiq.com/widget/v1/feedbackiq.js"></script>
<script>
  new FeedbackIQ({
    apiKey: 'YOUR_API_KEY',
  });
</script>

Option 2: NPM

npm install @feedbackiq/widget
import FeedbackIQ from '@feedbackiq/widget';

new FeedbackIQ({
  apiKey: 'YOUR_API_KEY',
});

Configuration

new FeedbackIQ({
  // Required
  apiKey: 'YOUR_API_KEY', // Get this from your dashboard

  // Optional
  apiUrl: 'https://api.feedbackiq.com', // Custom API URL
  position: 'bottom-right', // Widget position: bottom-right, bottom-left, top-right, top-left
  theme: 'light', // Theme: light or dark
  allowVoice: true, // Enable voice feedback
  allowText: true, // Enable text feedback
  allowScreenshot: false, // Enable screenshot capture (coming soon)
  customMetadata: {
    // Add custom data to all feedback
    userId: 'user123',
    plan: 'pro',
  },
});

Usage

Once initialized, the widget will appear as a floating button on your site. Users can click it to:

  1. Submit Text Feedback:

    • Select a category (Bug, Feature, Improvement, Praise, Other)
    • Type their feedback
    • Submit
  2. Submit Voice Feedback:

    • Select a category
    • Click the microphone button to start recording
    • Speak their feedback (up to 3 minutes)
    • Click again to stop
    • Submit

Browser Support

  • Chrome/Edge: Full support
  • Firefox: Full support
  • Safari: Full support
  • Mobile browsers: Full support

Voice recording requires HTTPS (or localhost for development).

Development

Setup

pnpm install

Development Server

pnpm dev

Open http://localhost:5173 to test the widget.

Build

pnpm build

Output: dist/feedbackiq.js

API

Constructor

new FeedbackIQ(config: FeedbackIQConfig)

Config Interface

interface FeedbackIQConfig {
  apiKey: string;
  apiUrl?: string;
  position?: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
  theme?: 'light' | 'dark';
  allowVoice?: boolean;
  allowText?: boolean;
  allowScreenshot?: boolean;
  customMetadata?: Record<string, any>;
}

Session Tracking

The widget automatically tracks:

  • Current URL
  • Navigation path (as users move through your site)
  • Browser and device information
  • Viewport size
  • Console errors (if enabled)
  • Custom metadata

This context helps you understand user feedback better.

Privacy

  • No personally identifiable information is collected by default
  • Audio recordings are stored securely on S3
  • Users can submit feedback anonymously
  • GDPR compliant

Examples

React

import { useEffect } from 'react';

function App() {
  useEffect(() => {
    new window.FeedbackIQ({
      apiKey: 'YOUR_API_KEY',
    });
  }, []);

  return <div>Your app</div>;
}

Vue

<script>
export default {
  mounted() {
    new window.FeedbackIQ({
      apiKey: 'YOUR_API_KEY',
    });
  },
};
</script>

Next.js

// pages/_app.js
import { useEffect } from 'react';

function MyApp({ Component, pageProps }) {
  useEffect(() => {
    if (typeof window !== 'undefined') {
      new window.FeedbackIQ({
        apiKey: process.env.NEXT_PUBLIC_FEEDBACKIQ_API_KEY,
      });
    }
  }, []);

  return <Component {...pageProps} />;
}

HTML

<!DOCTYPE html>
<html>
  <head>
    <title>My Site</title>
  </head>
  <body>
    <h1>Welcome</h1>

    <script src="https://cdn.feedbackiq.com/widget/v1/feedbackiq.js"></script>
    <script>
      new FeedbackIQ({
        apiKey: 'YOUR_API_KEY',
        position: 'bottom-left',
        customMetadata: {
          page: 'homepage',
        },
      });
    </script>
  </body>
</html>

Troubleshooting

Widget doesn't appear

  • Check that your API key is correct
  • Check browser console for errors
  • Verify the script is loading

Voice recording doesn't work

  • Ensure you're on HTTPS (or localhost)
  • Check microphone permissions
  • Try a different browser

Feedback not showing in dashboard

  • Verify API key matches your product
  • Check network tab for failed requests
  • Ensure API is reachable from your domain

Support

  • Documentation: https://docs.feedbackiq.com
  • Email: [email protected]
  • GitHub: https://github.com/feedbackiq/widget

License

MIT