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

@fillament/devtools

v0.3.0

Published

Free in-app DevTools panel for Fillament — inspect values, fields, errors, validation timing, render counts.

Downloads

377

Readme

@fillament/devtools

Free, in-app DevTools panel for Fillament. A floating inspector with tabs for Overview, Values, Fields, Errors, Validation timing, Render counts, Analytics events, and DevTools events. No external service, no extension to install — just mount the component.

pnpm add @fillament/devtools
import { FillamentDevTools } from "@fillament/devtools";

function App() {
  return (
    <>
      <UserForm />
      <FillamentDevTools form={form} />
    </>
  );
}

Exports

| Export | Kind | Purpose | | --- | --- | --- | | FillamentDevTools | component | The floating inspector panel. | | registerFormForDevtools(form) | function | Add a form to the global registry; returns an unregister function. | | listForms() | function | Snapshot of all currently-registered forms. | | subscribeFormRegistry(listener) | function | Subscribe to add / remove events; returns unsubscribe. | | registerDevtoolsAction(action) | function | Add a toolbar button to the panel; returns an unregister function. | | listDevtoolsActions() | function | Snapshot of registered actions. | | subscribeDevtoolsActions(listener) | function | Subscribe to action registry changes; returns unsubscribe. | | FillamentDevToolsProps | type | Component props. | | DevtoolsAction | type | { id, label, title?, run(form) }. |


<FillamentDevTools>

Props

| Prop | Type | Default | Notes | | --- | --- | --- | --- | | form | FormApi<any> | — | The form to inspect. If omitted, the panel shows a form picker populated from the global registry. | | initiallyOpen | boolean | false | Open the panel on mount (handy in Storybook). | | position | "bottom-right" \| "bottom-left" | "bottom-right" | Corner the floating button anchors to. |

Tabs

| Tab | Shows | | --- | --- | | Overview | Form id, isValid, isSubmitting, submitCount, dirty + touched counts, validation in flight. | | Values | Live form.getValues() pretty-printed JSON. Deep collapsible tree. | | Fields | Per-field state: touched, dirty, errors, visible, registered, validating, renderCount. Sorted by render count by default — quickly find the chatty fields. | | Errors | Field-level errors + form-level errors, grouped by path. Click an entry to scroll to the field in the Fields tab. | | Validation | Timing of recent validate() / validateField() calls (start, end, duration) from the DevTools event stream. | | Performance | Render-count history per field. | | Analytics | Last 200 AnalyticsEvents emitted by the form. Field names redacted to fieldHash when sensitive. | | DevTools | Last 200 DevtoolsEvents — form init, field register/unregister, change, blur, validate start/end, submit start/end, array operations. |

The panel reads from form.subscribeFormState, form.subscribeAnalytics, and form.subscribeDevtools — no polling, no extra wiring.


Production usage

The DevTools panel is intended for development. Two patterns to keep it out of prod builds:

// 1. Inline guard
{process.env.NODE_ENV !== "production" && <FillamentDevTools form={form} />}
// 2. Dynamic import — splits the panel into its own chunk
const FillamentDevTools = lazy(() =>
  import("@fillament/devtools").then(m => ({ default: m.FillamentDevTools }))
);
{process.env.NODE_ENV !== "production" && (
  <Suspense fallback={null}><FillamentDevTools form={form} /></Suspense>
)}

If you do ship it to production, the panel is safe: it reads form state from the existing subscriptions and writes nothing back. Analytics field names are redacted to alias hashes, same as @fillament/analytics.


Form discovery

The registry lets the panel inspect any form on the page without each form passing itself in:

import { registerFormForDevtools } from "@fillament/devtools";

// Register a form for inspection
const unregister = registerFormForDevtools(form);

// Later — e.g. unmount cleanup
unregister();

<FillamentDevTools /> without a form prop shows a dropdown of currently-registered forms.

Programmatic access

import { listForms, subscribeFormRegistry } from "@fillament/devtools";

const forms = listForms();                       // FormApi<any>[]
const unsub = subscribeFormRegistry(() => {
  console.log("registry changed", listForms().length);
});

subscribeFormRegistry plays well with useSyncExternalStore — the snapshot returned by listForms() is stable across reads.


Action toolbar

Optional modules (and your own app) can add buttons to the panel that act on the currently inspected form. The buttons render in a toolbar between the tabs and the body whenever at least one action is registered.

import { registerDevtoolsAction } from "@fillament/devtools";

const unregister = registerDevtoolsAction({
  id: "my-app/reset-to-fixture",       // same id re-registers / replaces
  label: "Load fixture",
  title: "Reset the form to the QA fixture",
  run: (form) => form.reset(QA_FIXTURE),
});

run may be async; exceptions are caught and logged so a misbehaving action can never crash the panel.

This is the extension point @fillament/test-data uses for its 🎲 Fill test data button:

import { enableTestDataDevtools } from "@fillament/test-data/devtools";

if (import.meta.env.DEV) enableTestDataDevtools();

Styling

The panel injects its own scoped CSS on first mount (single-time, idempotent). It uses fixed positioning and a high z-index. If you need to nest it inside a constrained layout, wrap it in a portal of your own.

DOM markers for debugging / Playwright selectors: data-fillament-devtools="root", data-fillament-devtools-tab="<tab>", data-fillament-devtools-field="<name>".


License

MIT © headlessButSmart