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

@youropinion/embed

v0.2.1

Published

Embed YouOpinion surveys on any website. Surfaces: Widget, Dialog, Drawer, Popover. Triggers: Feedback Tab, Chat Bubble.

Readme

YourOpinion Embed SDK

npm gzip size

Drop a survey into any website with one line of HTML. No build step, no dependencies, under 30 KB.

<div data-yo-widget="SURVEY_ID"></div>
<script src="https://share.youropinion.is/embed/latest.js"></script>

YouOpinion is a survey platform for feedback, research, and satisfaction measurement. Design your survey at youropinion.is, grab the survey ID, and embed it anywhere — your marketing site, SaaS app, intranet, or mobile webview.

Why this SDK?

  • One line to embed — add a data-yo-widget attribute and you're done
  • 5 embed surfaces — inline widget, modal dialog, side drawer, corner popover, floating button
  • React bindings — first-class hooks and components via @youropinion/embed/react
  • Smart triggers — open on load, scroll depth, exit-intent, or timed delay
  • Typed events — listen for ready, started, submit, questionChanged, heightChanged
  • Theming — light, dark, or auto to match the host page
  • Tiny footprint — zero dependencies, tree-shakeable ESM + UMD, works with any bundler or CDN

Install

pnpm add @youropinion/embed

Or skip the install and use the CDN — the script tag in the intro is all you need.

Quick Start

Open a dialog on button click (CDN, no bundler):

<button id="open-survey">Give Feedback</button>
<script src="https://share.youropinion.is/embed/latest.js"></script>
<script>
  const { open, close, toggle } = window.yo.createDialog("SURVEY_ID");
  document.querySelector("#open-survey").onclick = toggle;
</script>

ES module

import { createWidget } from "@youropinion/embed";

createWidget("SURVEY_ID", {
  container: document.querySelector("#survey"),
});

React

import { EmbedWidget } from "@youropinion/embed/react";

function App() {
  return <EmbedWidget surveyId="SURVEY_ID" autoGrow />;
}

Surfaces

| Surface | Function | Description | | ------- | ----------------- | --------------------------------- | | Widget | createWidget() | Inline embed inside a container | | Dialog | createDialog() | Centered modal overlay | | Drawer | createDrawer() | Side panel from screen edge | | Popover | createPopover() | Corner floating panel | | Button | createButton() | UI control that opens any surface |

import { createDialog, createButton } from "@youropinion/embed";

const dialog = createDialog("SURVEY_ID", { size: 80, autoClose: 3000 });
dialog.open();

// Attach a feedback tab button
const tab = createButton(dialog, { position: "right", text: "Feedback" });

HTML shortcuts

<!-- Feedback tab (button + drawer) -->
<div data-yo-feedback-tab="SURVEY_ID" data-yo-button-text="Feedback"></div>

<!-- Chat bubble (FAB + popover) -->
<div
  data-yo-chat-bubble="SURVEY_ID"
  data-yo-button-tooltip="Share your thoughts!"
></div>

Events

handle.on("submit", ({ responseId }) => console.log("Done:", responseId));
handle.on("ready", () => {});
handle.on("started", ({ responseId }) => {});
handle.on("questionChanged", ({ ref }) => {});
handle.on("heightChanged", ({ height }) => {});

Theme

import { setTheme } from "@youropinion/embed";
setTheme("dark"); // 'light' | 'dark' | 'auto'

Documentation

How to Get Your Survey ID

Find your survey ID in the share tab of your account. Create a share channel and enable "Allow embedding in websites".

The share link looks like this:

https://share.youropinion.is/#/2:stackables:okvs53ja:websites/eRcK

Everything after /#/ is the survey ID — in this case 2:stackables:okvs53ja:websites/eRcK.

Custom domains — if you've enabled a custom domain, the survey ID is shorter:

https://survey.createclarity.eu/#/dqe7lhxw/pVnS

The survey ID is still everything after /#/ (dqe7lhxw/pVnS), but you also need to set the domain attribute so the SDK knows where to look:

createWidget("dqe7lhxw/pVnS", { domain: "survey.createclarity.eu" });

You can also load the SDK from your own domain's CDN to eliminate third-party requests:

<script src="https://survey.createclarity.eu/embed/latest.js"></script>

Browser Support

Chrome 80+, Firefox 80+, Safari 14+, Edge 80+

License

MIT