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

@dev-tech/react-form-builder

v1.0.2

Published

Google Forms-inspired React form builder — TypeScript + Vite

Readme

react-form-builder

A Google Forms-inspired drag-and-drop form builder for React, built with TypeScript + Vite + Ant Design.

Demo

Watch the demo


Features

  • ✅ 12 field types: Yes/No, Male/Female, Multiple Choice, Checkboxes, Dropdown, Numeric, Alphanumeric, Table, Date, Time, Location, Picture
  • Ant Design Select for categories (tags mode — type & press Enter to create new ones)
  • Ant Design Select for per-field category picker (searchable)
  • Ant Design Select for conditional logic dropdowns (searchable)
  • Working conditional visibility in preview — fields hide/show based on responses
  • Editable text/number inputs in preview
  • ✅ Drag-to-reorder fields and options within each field
  • ✅ Inline option editing (click to rename any option)
  • ✅ Table field with typed columns (Text, Numeric, Date, Time, Dropdown)
  • ✅ Dashboard visual preview (pie / bar chart per field type)
  • ✅ Beautiful custom delete confirmation modal
  • ✅ Publish flow with color picker and form preview
  • ✅ Save as draft
  • ✅ Zero key collisions — every option/column has a stable uid
  • ✅ Fully typed TypeScript API

Usage

import { FormBuilder } from "@dev-tech/react-form-builder";
import "@dev-tech/react-form-builder/styles";
// antd styles must also be imported in your app:
import "antd/dist/reset.css";

function App() {
  return (
    <FormBuilder
      onSaveAsDraft={(form) => saveToServer(form)}
      onPublish={(form) => publishToServer(form)}
      accentColor="#1f419a"
    />
  );
}

You can also seed initial categories via the categories prop:

<FormBuilder
  categories={["GENERAL", "HEALTH", "FINANCIAL"]}
  onPublish={handlePublish}
/>

Props

| Prop | Type | Description | | --------------- | --------------------------------- | -------------------------------------- | | initialForm | Partial<FormDefinition> | Load existing form for editing | | categories | string[] | Seed category list (user can add more) | | onSaveAsDraft | (form) => void \| Promise<void> | Called on "Save & Complete Later" | | onPublish | (form) => void \| Promise<void> | Called on "Publish & Finish" | | accentColor | string | Override accent color (CSS hex) | | className | string | Extra class on root element |


Categories

Categories are fully user-driven. The form header has an Ant Design Select in tags mode:

  • Type a category name and press Enter or comma to create it
  • Remove categories by clicking the × on their tag chip
  • Field-level category picker is searchable

Conditional Logic (Preview)

When you set conditions on a field (via the ⚙ icon), those conditions are evaluated live in the preview modal:

  • Select a source question, a response value, and Is Selected / Is Not Selected
  • The conditional field will hide or show dynamically as the user fills in answers
  • Multiple conditions use AND logic (all must pass for the field to show)

Headless hook

import { useFormBuilder } from "@dev-tech/react-form-builder";

function CustomUI() {
  const {
    formName,
    setFormName,
    fields,
    addField,
    updateField,
    getFormDefinition,
  } = useFormBuilder();
  // render your own UI
}

Peer Dependencies

{
  "react": ">=18.0.0",
  "react-dom": ">=18.0.0",
  "antd": ">=5.0.0"
}

Install antd in your project:

npm install antd

And import the reset CSS once in your app root:

import "antd/dist/reset.css";

FormDefinition output shape

{
  name: string;
  description: string;
  color: string;
  categories: string[];
  fields: Array<{
    id: number;
    position: number;
    label: string;
    description: string;
    category: string;
    fieldType: FieldType | null;
    fieldOptions: FieldOption[] | TableColumn[];
    fieldInputName: string;
    isRequired: boolean;
    conditions: FieldCondition[];
  }>;
}

License

MIT