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

@unofficialbox/box-open-elements-react

v0.19.0

Published

Optional React wrappers for box-open-elements Web Components. Thin adapters — core stays framework-agnostic.

Readme

@unofficialbox/box-open-elements-react

Optional React wrappers for box-open-elements Web Components.

The core package stays framework-agnostic. This adapter is a thin layer that:

  1. imports the automatically registered custom element
  2. syncs React props onto element properties (not fragile attribute stringification)
  3. forwards refs, and binds event callbacks directly to the element

Callbacks an adapter declares receive the native DOM event, not a React SyntheticEvent. They are registered with addEventListener on the custom element so the listener travels with it: React delegates from its root container, so a node relocated out of that container silently stops receiving delegated handlers. Button declares its own onClick, typed as (event: MouseEvent) => void, for exactly that reason.

Props an adapter does not declare — including React's onClick on Select, TextField and Dialog — are forwarded as ordinary host props and stay delegated. That is fine unless something moves the node out of the React root, and it is React's delegation model rather than these components': a plain <div onClick> in a relocated subtree behaves the same. (box-drawer used to relocate its subtree and no longer does — it uses the top layer.)

See docs/integration/react.md for the React boundary and the framework adapter tracker for cross-framework milestones.

Install

npm install @unofficialbox/box-open-elements @unofficialbox/box-open-elements-react react react-dom
import { Button, Dialog, Select, TextField } from "@unofficialbox/box-open-elements-react";
import {
  applyDesignTokens,
  registerBoxDefaultDesignSystem,
} from "@unofficialbox/box-open-elements/foundations/tokens";

registerBoxDefaultDesignSystem({ setActive: true });
applyDesignTokens(document.documentElement, "box-default");

export function SaveAction() {
  return (
    <>
      <TextField label="Project" value="Apollo" />
      <Select
        label="Status"
        value="draft"
        options={[{ label: "Draft", value: "draft" }]}
      />
      <Button label="Save" tone="primary" onClick={() => console.log("saved")} />
    </>
  );
}

The supported surface also includes a controlled Dialog wrapper and useExplorerSelectionController, which subscribes React to the existing headless selection controller without duplicating its state.

Status

Supported as of 0.7.0Button, TextField, Select, and Dialog prove native and composed events, value and structured property synchronization, latest callback routing, forwarded refs, controlled overlay focus behavior, and server-safe host rendering. useExplorerSelectionController proves headless controller composition. The two conditions this section used to defer on are met: the first public npm publication happened at 0.7.0, and a clean registry install resolves the package and loads its exports. React releases in lockstep with the Angular, Vue, and Svelte adapters under adapters-vX.Y.Z, at the core's version.

Supported versions

| Dependency | Contract | | --- | --- | | React / React DOM | ^19.0.0 | | @unofficialbox/box-open-elements | ^0.10.0 | | Node.js for SSR | >=20.9.0 | | Next.js validation host | 16.2.12 |

The package ships ESM JavaScript and declarations from dist/. The Next.js fixture in examples/frameworks/react-ssr proves server prerendering, browser upgrade, hydration, events, controller subscriptions, and overlay focus.