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

@tirs/nextjs

v0.2.11

Published

Next.js bindings for the Tirs Care SDK: <TirsScript> on next/script for app-router layouts, plus client provider re-exports.

Readme

@tirs/nextjs

Next.js bindings for the Tirs Customer Care SDK. Adds console + network capture to your app so customer recordings made through Tirs care links arrive with full technical context.

What it does

  • <TirsScript> (from @tirs/nextjs/script) installs the SDK via next/script with beforeInteractive, so capture starts ahead of hydration and your app bundles. Server-component safe — drop it straight into a layout.
  • The root export provides <TirsProvider> / useTirs() with the 'use client' directive already baked in, for apps that prefer the bundled install.

How to use

npm i @tirs/nextjs

Recommended — the script install, in your root layout:

// app/layout.tsx  (server component — nothing extra needed)
import { TirsScript } from '@tirs/nextjs/script';

export default function RootLayout({ children }) {
  return (
    <html lang="en">
      <body>
        <TirsScript tirsKey="YOUR-KEY" />
        {children}
      </body>
    </html>
  );
}

Your key comes from the Tirs app: Customer care → Domains & Install.

Bundled alternative:

// app/layout.tsx
import { TirsProvider } from '@tirs/nextjs';

export default function RootLayout({ children }) {
  return (
    <html lang="en">
      <body>
        <TirsProvider config={{ key: 'YOUR-KEY' }}>{children}</TirsProvider>
      </body>
    </html>
  );
}

And client-side state where useful:

'use client';
import { useTirs } from '@tirs/nextjs';

export function SupportIndicator() {
  const { status } = useTirs();
  return status === 'capturing' ? <span>Recording in progress…</span> : null;
}

Optional configuration

<TirsScript>

| Prop | Type | Default | What it does | | --- | --- | --- | --- | | tirsKey | string | — | Your workspace key. Required. | | preroll | number (ms) | 0 | Keep a rolling window of activity from before recording starts. | | cdnBase | string | Tirs CDN v1 | Pin a specific version (e.g. …/v0.1.2) instead of auto-updating. | | integrity | { capture?, recorder? } | — | Subresource-integrity hashes. Only valid with a pinned cdnBase. | | appUrl | string | Tirs app | Override the Tirs app origin. Self-hosted deployments only. |

<TirsScript tirsKey="YOUR-KEY" preroll={30_000} />

<TirsProvider>

| Prop | Type | What it does | | --- | --- | --- | | config | TirsInitOptions | Capture runtime options — key, redact, preroll, denyUrls, captureBodies, maxBodyBytes, debug. | | recorder | RecorderOptions | Recording panel placement — position, offset, zIndex. |

<TirsProvider
  config={{ key: 'YOUR-KEY', preroll: 30_000, denyUrls: [/\/auth\//] }}
  recorder={{ position: 'bottom-left' }}
>
  {children}
</TirsProvider>

Defaults are safe for production: redaction is on, pre-roll is off, bodies are captured up to 64 KB each. Full option list on the @tirs/core page; panel options on the @tirs/recorder page.

MIT © Tirs