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

feedback-sdk-widget

v0.3.0

Published

A framework-agnostic feedback button whose inbox is an agent work queue.

Readme

feedback-sdk-widget

A framework-agnostic feedback button. Renders in Shadow DOM; themeable via CSS custom properties.

Contract (frozen)

  • Element: <feedback-widget>
  • Attributes:
    • endpoint (required) -- the service HTTP base, e.g. https://xxx.convex.site
    • token (required) -- the project's public submit token (fbk_...)
    • categories (optional) -- comma-separated; default idea,bug,other
    • page-context (optional) -- default location.pathname + location.search
    • label (optional) -- button text; default Feedback
    • submitter (optional) -- identity string; omitted means anonymous
    • theme (optional) -- light (default), dark, or auto (follows the OS via prefers-color-scheme). Your --fw-* overrides still win over it.
  • Event: feedback-submitted, CustomEvent<{ id: string }>, bubbles + composed
  • Theming: override --fw-accent, --fw-surface, --fw-surface-strong, --fw-text, --fw-muted, --fw-border, --fw-radius, --fw-z

Usage

This package is only the widget. endpoint and token come from a running feedback-sdk service -- ask its owner for them, or see INTEGRATING.md in the main repo for the full playbook. You do not need that repo's source to use this package.

The widget is a browser custom element. As of 0.3.0 a top-level import is SSR-safe: on the server the element simply does not register, and it upgrades normally in the browser. On 0.2.x and older a top-level import crashes server-rendering frameworks (Next.js, SvelteKit, Nuxt); use the client-only dynamic-import patterns below there.

Plain client-side app (Vite/CRA, no SSR):

import "feedback-sdk-widget";
// then place <feedback-widget endpoint="..." token="fbk_..."></feedback-widget>

React / Next.js -- import in an effect:

import { useEffect } from "react";
export function Feedback({ endpoint, token }) {
  useEffect(() => { import("feedback-sdk-widget"); }, []);
  return <feedback-widget endpoint={endpoint} token={token} />;
}

SvelteKit -- import in onMount (browser only):

<script>
  import { onMount } from "svelte";
  onMount(() => import("feedback-sdk-widget"));
</script>
<feedback-widget {endpoint} {token}></feedback-widget>

script tag (self-mounts a floating button from data-attrs):

<script src="https://.../feedback-widget.iife.js"
        data-endpoint="https://xxx.convex.site"
        data-token="fbk_..."></script>

Note: when serving the script from a public CDN, add Subresource Integrity (integrity="sha384-..." crossorigin="anonymous") using the hash of the built file.

Build outputs

  • dist/feedback-widget.js -- ESM, registers the element on import
  • dist/feedback-widget.iife.js -- self-mounting script-tag bundle