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

cardano-tessera-respond-react

v0.1.0

Published

React bindings for the <tessera-respond> CIP-179 survey widget: one typed component that registers the element, syncs props as DOM properties, and delivers the tessera:* events as onResponse / onChange / onInvalid callbacks. Works identically on React 18

Downloads

121

Readme

cardano-tessera-respond-react

React bindings for cardano-tessera-respond, the embeddable <tessera-respond> CIP-179 survey widget.

The custom element needs two things React's JSX can't give it directly: its object-valued props must be set as DOM properties (React ≤18 writes unknown JSX props as HTML attributes), and its tessera:* CustomEvents need real addEventListener calls on any React version. <TesseraRespond> does both through a ref — identically on React 18 and 19.

npm install cardano-tessera-respond-react cardano-tessera-respond
import { TesseraRespond } from "cardano-tessera-respond-react";

function Survey({ definition, surveyRef, responder, tipEpoch }) {
  return (
    <TesseraRespond
      definition={definition}
      surveyRef={surveyRef}
      responder={responder}
      tipEpoch={tipEpoch}
      onResponse={({ payload, proveCredentials }) => {
        // 1. attach `payload` at metadata label 17
        // 2. prove each credential (required_signers / governance vote)
        // 3. sign with the wallet, submit
      }}
    />
  );
}

Importing the package registers the element (a no-op without a DOM, so plain imports are safe under Next.js and other SSR setups; the element upgrades and renders client-side).

Props

Every widget prop, with the same names, types, and semantics — see the widget README for the full contract. The four required ones are definition, surveyRef, responder, and tipEpoch. On top of those:

| Prop | Replaces the event | | ---------------------------- | ------------------ | | onResponse={(detail) => …} | tessera:response | | onChange={(detail) => …} | tessera:change | | onInvalid={(detail) => …} | tessera:invalid |

Callback details are fully typed (RespondResult, RespondChangeDetail, RespondInvalidDetail re-export from here). className, id, and style pass through to the host element — style the widget itself via its --tessera-* design tokens. ref exposes the underlying TesseraRespondElement.

Note the widget announces progress as soon as it renders, so onChange fires once on mount with the initial { decided, total, valid }.

Working example

A minimal Vite app lives at examples/react-host in the repository; it is built in CI against the current widget.

License

Apache-2.0