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

@statisfy/portal-react

v0.1.2

Published

Embeddable customer-portal shell for React: native auth, account switcher and the project module.

Readme

@statisfy/portal-react

Embeddable customer-portal shell for React: native email-OTP auth, an account switcher, and the project module.

Digital Worker chat, onboarding and tool-call forms are a separate package — @statisfy/ai-react. Install both if you want both; they share one provider and one theme.

Install

npm install @statisfy/portal-react react react-dom

react and react-dom (18 or 19) are peer dependencies you provide. @statisfy/sdk-core is also a peer, and npm installs it for you — it must resolve to a single copy, which is why it is a peer rather than a bundled dependency. Everything else is bundled.

Usage

Wrap your app once in <StatisfyProvider>, then render components anywhere beneath it. Connection and auth live on the provider; components take only their own display props.

import {
  PortalAuthGate,
  ProjectModule,
  StatisfyProvider
} from '@statisfy/portal-react'
import '@statisfy/portal-react/styles.css' // required — import once

export function Portal() {
  return (
    <PortalAuthGate baseUrl="https://api.statisfy.com" portalId="<uuid>">
      <StatisfyProvider
        publishableKey="pk_live_…"
        getToken={async () => '<bearer>'}
      >
        <ProjectModule />
      </StatisfyProvider>
    </PortalAuthGate>
  )
}

A component rendered outside <StatisfyProvider> throws, rather than silently sending unauthenticated requests. The stylesheet import is required; without it the portal renders unstyled.

If you also render @statisfy/ai-react, import both stylesheets and keep ONE <StatisfyProvider> around both — the two packages share the same provider, so nesting a second one is never necessary.

Build-time runtime config (/vite)

Portals built by the Statisfy platform inject their commit's portal.runtime.json into the page. The Vite plugin that does it ships in @statisfy/sdk-core, which this package already pulls in as a peer:

// vite.config.ts
import { statisfyPortalRuntime } from '@statisfy/sdk-core/vite'

export default { plugins: [statisfyPortalRuntime()] }

Theming

Everything visual is reachable from host CSS through two seams: the --dw-* variable table and the data-dw-part anatomy attributes. Both work with plain, normal declarations — !important is not needed and must not be used, because all SDK CSS ships inside @layer and an unlayered author rule outranks every layer.

/* space-separated RGB triplets, not rgb() or hex */
:root { --dw-primary: 13 148 136; }

/* or target one part */
[data-dw-part='task-row'] { border-radius: 0; }

Dark mode is opt-in via data-dw-theme="dark" (or "auto" to follow the OS) on the root element — an embedded widget should match the page it is mounted in, not the visitor's OS.

The full token table, the dark palette, the documented-stable part names and the worked examples live in @statisfy/sdk-core's README — the package that owns the token layer. The contract is identical for every Statisfy SDK package, so it is documented once rather than drifting in three copies.

License

MIT