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

@dhristhi/react-form-builder

v0.0.6

Published

A React form builder using JSON Forms with drag and drop functionality

Readme

React Form Builder

A modern drag-and-drop form builder built with React 19, Material UI, and JSON Forms. Design forms visually, preview them live, and export JSON Schema + UI Schema.

React Material-UI JSON Forms npm License

Features

  • Drag & Drop builder with nested layouts
  • Property editor for field configuration
  • Schema editor (JSON Schema & UI Schema)
  • Live preview with JSON Forms
  • Export/import schemas

Quick Start

Install and import the component:

yarn add @dhristhi/react-form-builder
# or
npm install @dhristhi/react-form-builder
import React from 'react';
import { FormBuilder } from '@dhristhi/react-form-builder';

export default function MyPage() {
  return <FormBuilder />;
}

API & Extensibility

Exports

  • FormBuilder — main component
  • registerFieldTypes, getFieldTypes, getFieldTypeById — field registry helpers
  • configureControls — add/enable/disable JSON Forms renderers

Register Custom Field Types

import { registerFieldTypes } from '@dhristhi/react-form-builder';

registerFieldTypes([
  {
    id: 'my-custom',
    label: 'My Custom',
    isLayout: false,
    schema: { type: 'string' },
    uischema: { type: 'Control', options: { placeholder: 'Custom' } },
    // icon: Optional React component
  },
]);

Configure Controls (Renderers)

Enable/disable built-in custom controls and add your own JSON Forms renderers:

import { configureControls } from '@dhristhi/react-form-builder';

// Call once before rendering <FormBuilder />
configureControls({
  // enable: ['text', 'select', 'verticalLayout'],
  disable: ['currencyText', 'image'],
  add: [{ tester: myCustomTester, renderer: MyCustomRenderer, id: 'myCustom' }],
});

Built-in control IDs usable in enable/disable:

  • currencyText, text, label, image, infoAlert, select, downloadFile, fileUpload
  • arrayLayout, groupLayout, verticalLayout, horizontalLayout, accordionGroupLayout

Notes:

  • By default, all built-in custom controls are enabled alongside Material renderers/cells.
  • add items are appended after built-ins. Provide a stable id to toggle them later.

Props

  • onExport({ schema, uiSchema }): Override default JSON download to handle export.
  • onSave: Receive save requests from the schema editor view.
  • theme: Provide a custom MUI theme instance.
  • schemas: Sample templates { id, name, description?, schema } for quick loading.

Example:

import { FormBuilder } from '@dhristhi/react-form-builder';

function handleExport({ schema, uiSchema }) {
  // Persist to server or file
}

export default function MyPage() {
  return (
    <FormBuilder
      onExport={handleExport}
      schemas={[
        {
          id: 'simple',
          name: 'Simple Example',
          description: 'Minimal schema with two fields',
          schema: {
            type: 'object',
            properties: {
              firstName: { type: 'string', title: 'First Name' },
              age: { type: 'number', title: 'Age' },
            },
            required: ['firstName'],
          },
        },
      ]}
    />
  );
}

License

Apache 2.0 — see LICENSE.

Acknowledgments