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

@zynli/react-widget

v0.1.1

Published

Embed the Zynli support chat widget in React and Next.js apps

Readme

@zynli/react-widget

Embed the Zynli support chat widget in React and Next.js apps.
This package loads the same embed.js used by vanilla HTML integrations (hazeljs-support-chat).

Install

npm install @zynli/react-widget

Peer dependencies: react, react-dom. For Next.js, install next (optional peer).

Monorepo / local development:

"@zynli/react-widget": "file:../zynli/zynli-react-widget"

Run npm run build inside zynli-react-widget after changes.

Next.js (App Router)

// app/layout.tsx or a client wrapper
import { ZynliWidgetNext } from "@zynli/react-widget/next";

export default function RootLayout({ children }) {
  return (
    <html>
      <body>
        {children}
        <ZynliWidgetNext
          tenant={process.env.NEXT_PUBLIC_ZYNLI_TENANT!}
          scriptUrl={process.env.NEXT_PUBLIC_ZYNLI_EMBED_SCRIPT_URL}
          appUrl={process.env.NEXT_PUBLIC_ZYNLI_APP_URL}
        />
      </body>
    </html>
  );
}
NEXT_PUBLIC_ZYNLI_TENANT=your_tenant_id
NEXT_PUBLIC_ZYNLI_EMBED_SCRIPT_URL=https://hazeljs.zynli.ai/embed.js
NEXT_PUBLIC_ZYNLI_APP_URL=https://hazeljs.zynli.ai

React (Vite, CRA, etc.)

import { ZynliWidget } from "@zynli/react-widget";

export function App() {
  return (
    <>
      <main>...</main>
      <ZynliWidget
        tenant="your_tenant_id"
        appUrl="https://hazeljs.zynli.ai"
      />
    </>
  );
}

Props

| Prop | Required | Description | |------|----------|-------------| | tenant | Yes | Workspace tenant id from Zynli | | scriptUrl | No* | Full URL to embed.js | | appUrl | No* | App origin; used as {appUrl}/embed.js if scriptUrl omitted | | offset | No | "default" (16px margin) or "0" (flush to corner) | | enabled | No | false to skip rendering (default: true when tenant is set) |

* Provide at least one of scriptUrl or appUrl.

Vanilla HTML

You do not need this package for plain HTML — use embed.js directly. See hazeljs-support-chat/WIDGET_EMBED.md.

/widget preview (support-chat)

Opening /widget without embedOrigin (e.g. http://localhost:3001/widget?tenant=…) uses this package to load embed.js, matching production host sites. The iframe loads /widget?embedOrigin=… with the live chat UI (markdown answers, doc citations, etc.).