@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.

Install

pnpm add -D @openuidev/devtools @openuidev/observability

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 />}
    </>
  );
}

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.
errorsOnlytrueCapture only error/warning events, or every event.
autoOpenOnErrortrueInitial state of the drawer's "auto-open on error" checkbox.
busshared singletonAn Observability instance to listen to.

On this page