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

minimal-form

v2.9.0

Published

Have you seen the similarities in the forms?Create forms with minimal code

Readme

🧩 EasyForm

EasyForm is a fully customizable, type-safe, and headless dynamic form builder for React using react-hook-form. It supports nested fields, repeatable sections, validation, and custom UI components.

Built with full support for headless usage and easy integration with any UI library such as ShadCN, Material UI, Tailwind, or your own components.


🚀 Features

  • ✅ Dynamic form rendering from schema (structure)
  • ✅ Full type-safety with TypeScript
  • ✅ Repeatable groups and nested inputs
  • ✅ Uses react-hook-form under the hood
  • ✅ Headless & customizable via <EasyFormProvider />
  • ✅ Supports image/file uploads, select, multi-select, etc.

📦 Installation

npm install minimal-form
# or
yarn add minimal-form

You must also install react, react-hook-form, and your own UI components (e.g., shadcn/ui).


⚡ Quick Start

import { EasyFormProvider } from "minimal-form";
import { GovernanceForm } from "minimal-form"; // or your custom form renderer
import { structure } from "./form.structure";
import { useForm } from "react-hook-form";
import { Input } from "@/components/ui/input";

export default function MyForm() {
  const { control, handleSubmit } = useForm();

  return (
    <EasyFormProvider
      components={{
        string: ({ controller, field }) => (
          <Input {...controller} placeholder={field.placeholder} />
        ),
        // Add more input types...
      }}
    >
      <form onSubmit={handleSubmit(console.log)}>
        <GovernanceForm control={control} structure={structure} />
      </form>
    </EasyFormProvider>
  );
}

🎯 Field Types Supported

EasyForm supports the following types:

| Type | Description | | ----------------------- | ------------------------------------- | | string | Text input | | number | Number input | | email | Email input | | password | Password input | | select | Single select | | multiSelect | Multiple select (with chips) | | text | Textarea | | image | Image uploader | | date, time, color | HTML5 inputs | | list | Group of nested repeatable fields | | metaData | Section header/description (optional) |


🧠 Using with EasyFormProvider

You can inject your own UI components using the provider:

<EasyFormProvider
  components={{
    string: MyTextInput,
    select: MySelect,
    image: MyImageUpload,
    multiSelect: MyTagSelector,
    // etc.
  }}
>
  <GovernanceForm structure={...} control={...} />
</EasyFormProvider>

Each component receives the following props:

interface EasyFormFieldProps {
  field: inputData;
  fieldState: any;
  controller: any;
  previewUrl?: string;
  setPreviewUrl?: (url: string) => void;
  className?: string;
}

🧱 Form Structure Example

const structure = {
  firstName: {
    type: "string",
    label: "First Name",
    required: true,
    placeholder: "John",
  },
  profileType: {
    type: "select",
    label: "Type",
    options: [
      { value: "admin", label: "Admin" },
      { value: "user", label: "User" },
    ],
  },
  contactInfo: {
    type: "list",
    label: "Contact Info",
    inputs: {
      email: {
        type: "email",
        label: "Email",
        required: true,
      },
      phone: {
        type: "string",
        label: "Phone",
      },
    },
  },
};

🔌 Extendable Design

  • You can build custom renderers using the RenderField component directly.
  • Supports localization, themes, dynamic visibility (planned in future versions).

🛠 Roadmap

  • [ ] Field-level visibility conditions
  • [ ] Custom validation rules
  • [ ] i18n support
  • [ ] JSON schema -> EasyForm conversion

👨‍💻 Contribution

We welcome pull requests and feedback!


📄 License

MIT License