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

form-schema-runtime

v1.0.0

Published

Framework-agnostic TypeScript runtime for rendering accessible HTML forms from declarative schemas.

Readme

Form Schema Runtime

CI TypeScript Vite Accessibility Framework

Framework-agnostic TypeScript runtime for rendering accessible, customizable HTML forms from declarative JSON schemas.

It targets enterprise and legacy-friendly frontend surfaces where React, Angular, Vue, or Svelte cannot always be introduced, but teams still need typed schemas, validation, state hooks, accessible native controls, and safe DOM rendering.

Installation

npm install form-schema-runtime
import { createForm, type FormSchema } from "form-schema-runtime";
import "form-schema-runtime/styles.css";

Quick Start

import { createForm, type FormSchema } from "form-schema-runtime";
import "form-schema-runtime/styles.css";

const schema: FormSchema = {
  id: "contact-form",
  title: "Contact form",
  fields: [
    {
      type: "text",
      name: "fullName",
      label: "Full name",
      required: true
    },
    {
      type: "email",
      name: "email",
      label: "Email",
      required: true
    }
  ]
};

const form = createForm({
  container: document.querySelector("#app")!,
  schema,
  onSubmit(values) {
    console.log(values);
  }
});

Use the returned instance for getValues, setValues, validate, reset, and destroy. See the usage guide for the full lifecycle.

Documentation

Architecture

The public API lives in src/index.ts. Schema normalization, validation, state, condition evaluation, DOM helpers, and renderers stay separated so each concern remains testable.

src/
  index.ts
  schema/
  validation/
  state/
  conditions/
  renderer/
  dom/
  styles/

The library renders native controls into a caller-provided container. Schema text is treated as untrusted data and rendered with DOM APIs rather than innerHTML.

Build And Test

npm ci
npm run typecheck
npm run lint
npm test
npm run test:coverage
npm run build
npm run build:examples
npm run test:consumer
npm run test:examples
npm run test:e2e

npm run build produces the library package, the GitHub Pages demo, TypeDoc API docs, copied Markdown docs, and the coverage page when coverage has been generated.

npm run build:examples builds the React, Vue, and Angular consumer apps and copies them into the Pages artifact under /examples/react/, /examples/vue/, and /examples/angular/.

Release

Releases are GitHub Release driven. Publishing to npm is handled by a dedicated release workflow using npm Trusted Publishing/OIDC, with no long-lived npm publish token in GitHub secrets.

v1.0.0 is the first stable release. Historical notes for v0.1.0 and v0.1.1 are documented in the release process. npm versions cannot be overwritten, so each release needs a new package.json version and matching GitHub Release tag.

See docs/release-process.md for setup, tag conventions, verification, publishing, provenance, and failure handling.

Trade-Offs

This v1 intentionally does not include:

  • Drag-and-drop visual builders.
  • Arbitrary JavaScript expressions inside schemas.
  • A generic rules engine.
  • Repeatable or nested array forms.
  • Async validation.
  • Framework-specific adapters.
  • Backend submission or storage.

Those boundaries keep the runtime small, deterministic, and easy to embed in non-framework applications.