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

@reactivlabs/referly

v0.1.1

Published

Drop-in React provider, hook, and modal for offering Referly partner referrals on any site.

Readme

@reactivlabs/referly

Drop-in React provider, hook, and modal for offering Referly partner referrals after a form submission on any React or Next.js site.

  • Zero runtime dependencies (besides React itself)
  • First-class Next.js App Router support — the built bundle ships with "use client" baked in
  • ESM + CJS output, full TypeScript types
  • Inline styles — works on any site, no CSS imports required

Install

npm install @reactivlabs/referly
# or
pnpm add @reactivlabs/referly
# or
yarn add @reactivlabs/referly

Peer dep: react >= 18.

Quick start

Get a partner API key from Referly → Dashboard → Integrations → Generate, then:

// app/layout.tsx
import { ReferlyProvider } from "@reactivlabs/referly";

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html>
      <body>
        <ReferlyProvider
          partnerKey={process.env.NEXT_PUBLIC_REFERLY_PARTNER_KEY!}
          apiBase="https://referly.yourdomain.com"
        >
          {children}
        </ReferlyProvider>
      </body>
    </html>
  );
}
"use client";
import { useReferly } from "@reactivlabs/referly";

export function ContactForm() {
  const { offerPartners } = useReferly();

  async function onSubmit(values: { name: string; email: string; phone: string; service?: string }) {
    await saveToYourBackend(values);
    offerPartners({
      customer: {
        name: values.name,
        email: values.email,
        phone: values.phone,
      },
      service: values.service ?? "general",
    });
  }

  // render your form and wire `onSubmit`…
}

API

<ReferlyProvider> props

| Prop | Type | Description | | --- | --- | --- | | partnerKey | string | Per-member key from Dashboard → Integrations. Looks like rly_live_.... Treat like a password. | | apiBase | string | Origin of the Referly deployment (e.g. https://referly.yourdomain.com). | | onReferralRecorded? | (partner, action) => void | Fires after a successful click on Get info or Send info. |

useReferly().offerPartners(args)

offerPartners({
  customer: { name: string; email?: string; phone?: string };
  service?: string;
  notes?: string;
  heading?: string;      // custom modal title
  subheading?: string;   // custom modal subtitle
  hpCompany?: string;    // honeypot pass-through (optional)
});

Opens the modal, fetches the site owner's partner list, lets the customer pick. Two click-through actions:

  • Get info — partner follows up with the customer
  • Send info — partner gets notified AND the customer is emailed the partner's contact info

Internal partners (other Referly members in the same group) land in their dashboard. External partners create a row in the owner's integrations activity feed and get a notification email if you provided one.

Full integration guide

See the long-form guide (WordPress, Wix, Webflow, Squarespace, Shopify, plain HTML, cURL, endpoint reference, security): referly.app/docs/partner-integration

Development

# from this directory (referly/embed)
npm install
npm run build   # → dist/{index.js,index.cjs,index.d.ts}
npm run dev     # rebuild on save

Publishing

This package is published separately from the main Referly app. Only the dist/, README.md, and LICENSE files are shipped (see the files field in package.json).

One-time setup:

  1. Make sure the @reactivlabs scope exists on npm and you're a member: https://www.npmjs.com/org/reactivlabs
  2. npm login (must be a user with publish rights on the org).

For each release:

# from referly/embed
npm version patch   # or minor / major — bumps package.json + creates a git tag
npm publish         # runs prepublishOnly → npm run build, then uploads
git push --follow-tags

The first publish needs --access=public (the publishConfig in package.json already sets this).

License

MIT