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

@tolt/embed

v0.1.1

Published

Drop a partner's referral dashboard into your app with one React component.

Readme

@tolt/embed

Drop a partner's referral dashboard into your app with one React component. Your partners see their link, earnings, and referrals without leaving your product or signing in to Tolt.

Install

npm install @tolt/embed

Use it

Mint a scoped token on your server, then render the component on the client.

On your server (the API key stays here, never in the browser):

const res = await fetch("https://api.tolt.com/v2/embed-tokens", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.TOLT_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ partnerId: "part_9fQ2xLL" }),
});
const { token } = await res.json();

On the client:

import { ToltEmbed } from "@tolt/embed";

export function ReferralsPage({ token }: { token: string }) {
  return (
    <ToltEmbed
      token={token}
      theme="dark"
      themeOptions={{
        brandColor: "#B1FD7A",
        backgroundColor: "#191919",
        radius: 10,
      }}
    />
  );
}

The token is public and short-lived, so it's safe to send to the browser. The component renders a Tolt-hosted iframe and resizes itself to fit the content.

Props

| Prop | Type | Default | Notes | | --- | --- | --- | --- | | token | string | none | The public embed token from your server. Omit to render a sample dashboard. | | data | "referrals" | "referrals" | Which embed to render. | | theme | "light" \| "dark" \| "system" | "system" | Follows the partner's OS setting by default. | | themeOptions | ToltEmbedThemeOptions | none | Recolor and reshape the widget to match your app. | | baseUrl | string | https://embed.tolt.com | Point at a local host, or straight at a hosted .html file, during development. | | onReady | () => void | none | Fires once the dashboard has loaded. | | onError | (message: string) => void | none | Fires if the token is rejected. |

Theming

theme picks light, dark, or the partner's OS setting. themeOptions overrides individual tokens on top of that; everything is optional, and anything you leave out keeps the default for the active theme.

| Field | Applies to | | --- | --- | | brandColor | Accent: the copy button, links, and the earnings sparkline. | | brandTextColor | Text and icons on top of brandColor. | | backgroundColor | The dashboard card surface. | | surfaceColor | Raised tiles inside the card (stats, the referral-link field). | | textColor | Primary text. | | mutedColor | Secondary text and labels. | | borderColor | Hairline borders and dividers. | | radius | Corner radius. A number is treated as pixels; a string is used as-is. | | fontFamily | Body font stack. | | headingFontFamily | Heading font stack. |

<ToltEmbed
  token={token}
  theme="dark"
  themeOptions={{
    brandColor: "#B1FD7A",
    brandTextColor: "#0D0F12",
    backgroundColor: "#191919",
    surfaceColor: "#111214",
    textColor: "#F2F4F6",
    mutedColor: "#9AA1AB",
    borderColor: "#24272D",
    radius: 10,
    fontFamily: "Inter, system-ui, sans-serif",
    headingFontFamily: "Söhne, Inter, sans-serif",
  }}
/>

Not using React?

Drop the iframe in directly. The same theme options are query parameters:

<iframe
  src="https://embed.tolt.com/referrals?token=PUBLIC_TOKEN&theme=dark&brandColor=%23B1FD7A&backgroundColor=%23191919&radius=10"
  style="width: 100%; border: none"
  allow="clipboard-write"
></iframe>