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

@dontdoit/json-form

v0.0.1

Published

JSON-based form builder for React

Readme

@kimdontdoit/json-form

Turn a Zod schema into an editable form. Change the schema, the form changes with it — no hand-written field JSX.

Built for developers who want a small, non-magic, schema-driven building block (the audience of tools like json-render.dev), not a heavyweight form framework: it's a fully controlled component, so you own the state.

The UI isn't a stack of bordered inputs — it renders as one continuous monospace, object-literal-like block, where each value is an inline editable space blended into the surrounding punctuation. Closer to an always-editable code/JSON editor than a typical form.

Install

npm install @kimdontdoit/json-form zod

react, react-dom, and zod are peer dependencies — nothing else is bundled.

Usage

import { useState } from "react";
import { z } from "zod";
import { JsonForm, getDefaults } from "@kimdontdoit/json-form";
import "@kimdontdoit/json-form/json-form.css";

const schema = z.object({
  name: z.string(),
  age: z.number().optional(),
  role: z.enum(["admin", "member"]),
});

function Example() {
  const [value, setValue] = useState(() => getDefaults(schema));
  return <JsonForm schema={schema} value={value} onChange={setValue} />;
}

API

  • <JsonForm schema value onChange fields? className? /> — the form. value/onChange make it fully controlled; fields is an escape hatch (see below).
  • getDefaults(schema) — builds an initial value from a schema, for seeding useState.
  • walkSchema(schema) — the raw schema → FieldNode conversion, exported for advanced/debugging use.

Overriding a field's rendering

<JsonForm
  schema={schema}
  value={value}
  onChange={setValue}
  fields={[
    { match: "role", component: MyRoleDropdown },
    { match: (node) => node.kind === "enum", component: MyEnumControl },
  ]}
/>

match is either the field's dot-joined path ("address.zip") or a predicate over the FieldNode. Overrides are checked in order; the first match wins.

Styling

Import @kimdontdoit/json-form/json-form.css and override its custom properties (--jf-font, --jf-accent, --jf-error, --jf-muted) to theme it — no Tailwind or design-system dependency.

Known limitations / v2 candidates

  • No z.union / z.discriminatedUnion / z.intersectionwalkSchema throws a clear error naming the unsupported type and path.
  • No refinement/transform-driven field-type branching (validation still runs via safeParse; the rendered field type is the pre-refinement shape).
  • No self-referential/recursive schemas.
  • Arrays support add/remove only — no drag-to-reorder.
  • No z.record / z.map / z.tuple.
  • The override system is a flat, in-order array — no scoped/contextual registry.
  • No i18n — object keys are shown as-is.

License

MIT