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

react-forminate

v1.1.0-beta.15

Published

React.js + Typescript package that creates dynamic UI forms based on the JSON schema

Readme

License: MIT

Features ✨

  • Schema-Driven Forms - JSON-powered forms with zero boilerplate
  • Real-Time Validation - Built-in validators + custom async validation
  • Conditional Logic - Show/hide fields based on other fields' values
  • File Handling - Uploads with previews (Base64/Blob/File)
  • API-Driven Fields - Dynamic options from endpoints
  • TypeScript Ready - Full type safety
  • Performance Optimized - Debounced updates, lazy loading
  • Accessibility - ARIA attributes out of the box
  • Extensible - Add custom fields and validators
  • Styling Freedom - Tailwind, CSS modules, or inline styles

Installation 📦

npm install react-forminate
# or
yarn add react-forminate

Basic Usage 🚀

import { DynamicForm } from "react-forminate";

const formSchema = {
  formId: "userForm",
  fields: [
    {
      fieldId: "name",
      type: "text",
      label: "Full Name",
      required: true,
    },
    {
      fieldId: "email",
      type: "email",
      label: "Email",
      required: true,
      validation: [{ type: "email" }],
    },
    {
      fieldId: "subscribe",
      type: "checkbox",
      label: "Subscribe to newsletter",
      visibility: {
        dependsOn: "email",
        condition: "not_empty",
      },
    },
  ],
};

export default () => (
  <DynamicForm formData={formSchema} onSubmit={console.log} />
);

Advanced Features 🛠

Conditional Fields

{
  fieldId: "company",
  type: "text",
  label: "Company Name",
  visibility: {
    dependsOn: "employmentStatus",
    condition: "equals",
    value: "employed"
  }
}

File Uploads

{
  fieldId: "avatar",
  type: "file",
  accept: "image/*",
  storageFormat: "base64",
  events: {
    onCustomUpload: (files) => uploadToServer(files)
  }
}

API-Driven Select

{
  fieldId: "products",
  type: "select",
  dynamicOptions: {
    endpoint: "/api/products",
    transformResponse: (res) =>
      res.map(product => ({ label: product.name, value: product.id }))
  }
}

Custom Validation

{
  fieldId: "username",
  type: "text",
  validation: [
    {
      custom: async (value) => {
        const available = await checkUsernameAvailability(value);
        return available;
      },
      message: "Username already taken"
    }
  ]
}

Auto-Scroll on Validation Errors

{
  formId: "userForm",
  options: {
    scrollOnErrorValidation: true, // Automatically scroll to first error field
  },
  fields: [
    // ... your fields
  ]
}

When enabled, clicking the submit button on an invalid form will automatically scroll to the first field with a validation error, providing better user experience for long forms.

Field Types Supported 🏗️

Input Fields

| Type | Description | Example Use Case | | -------- | --------------------------- | ------------------------ | | text | Standard text input | Names, general text | | email | Email input with validation | User emails | | password | Masked password input | Login forms | | number | Numeric input | Age, quantity | | tel | Telephone number input | Phone numbers | | url | URL input with validation | Website links | | search | Search-style input | Search boxes | | date | Date picker | Birthdates, appointments | | file | File upload with previews | Avatars, documents |

Selection Fields

| Type | Description | Special Features | | -------- | ------------------ | ------------------- | | select | Dropdown select | Dynamic API options | | radio | Radio button group | Single selection | | checkbox | Checkbox group | Multiple selection |

Layout & Structural Fields

| Type | Description | Configuration Options | | --------- | ---------------------------- | ---------------------- | | group | Logical field grouping | Nested fields, legends | | container | Visual wrapper (div/section) | Grid layouts, spacing | | spacer | Vertical/horizontal spacing | Pixel-perfect gaps |

Special Fields

| Type | Description | Content Flexibility | | -------- | ------------------------- | ---------------------------- | | gridview | Data grid with pagination | API-driven tables | | content | Custom HTML/JSX content | Terms, rich text, components | | textarea | Multi-line text area | Long-form content |

Hooks for Control 🎣

import {
  useFormValue,
  useFormActions,
  FormRegistryProvider,
} from "react-forminate";

// Get single value
const email = useFormValue("email", "formId");

// Access all form actions
const { validateForm, setValue } = useFormActions("formId");

// Wrap your app to enable multi-form control
<FormRegistryProvider>
  <App />
</FormRegistryProvider>;

Why React Forminate? 💡

✔ Productivity - Build complex forms in minutes ✔ Maintainability - Schema-based = cleaner code ✔ Consistency - Unified validation & styling ✔ Flexibility - Extend with custom fields

Documentation 📖

For complete documentation and advanced examples, visit our documentation site.