@openuidev/devtools

API reference for the development-only devtools widget.

Development-only UI widget for OpenUI apps. Renders a floating button that opens a left side drawer listing the events captured by @openuidev/observability — level, a one-line summary, and a drill-in stack trace per entry. Development only visibility is controlled by the environment flag.

OpenUI DevTools drawer displaying captured events in an OpenUI app

Installation

CDN (via react-lang)

If your app uses @openuidev/react-lang, the widget shows up automatically in development.

Package Installation

Install the package and render <OpenUIDevtools /> when you want custom props. A manually mounted instance always wins over the auto-mount:

pnpm add -D @openuidev/devtools

OpenUIDevtools

Mount it once, anywhere in your tree. It renders nothing in production builds (NODE_ENV === "production") unless enabled is passed explicitly.

import { OpenUIDevtools } from "@openuidev/devtools";

function App() {
  return (
    <>
      {/* your app */}
      {process.env.NODE_ENV === "development" && (
        <OpenUIDevtools theme="dark" position="bottom-left" maxEvents={100} />
      )}
    </>
  );
}

Props

PropDefaultDescription
enableddev-onlyForce the widget on/off.
position"bottom-right"Corner for the toggle button: top-left/top-right/bottom-*.
maxEvents50How many events to keep; oldest are dropped first.
errorsOnlyfalseInitial state of the "errors only" display filter.
autoOpenOnErrortrueInitial state of the drawer's "auto-open on error" checkbox.
theme"light""light" or "dark" theme for the drawer.
version@latestCDN pin: "0" (major), "0.1" (minor), or "0.1.0" (exact).

On this page