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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@laus/uiform

v0.2.0

Published

A React form library built on JSON Schema with Ant Design components and responsive layouts

Readme

UIForm

A React form library built on JSON Schema with Ant Design components and responsive layouts.

Features

  • 🎯 JSON Schema-based: Define forms using standard JSON Schema
  • 📱 Responsive Layouts: Built-in responsive grid system with mobile-first approach
  • 🎨 Ant Design: Uses Ant Design components for a polished UI
  • 🔄 Async Options: Support for dynamic option loading in Select/Autocomplete fields
  • 📝 TypeScript: Full TypeScript support with type definitions
  • Validation: Automatic validation based on JSON Schema
  • 🎛️ Customizable: Configurable layouts, sizes, and validation triggers

Installation

From GitHub

npm install DaikonCOde/uiform

Or with a specific version/tag:

npm install DaikonCOde/uiform#v0.1.0

Or clone and link locally:

git clone https://github.com/DaikonCOde/uiform.git
cd uiform
npm install
npm run build:lib
npm link

Then in your project:

npm link @laus/uiform

Peer Dependencies

This library is compatible with React 17 and 18:

For React 18 projects (recommended):

npm install react@18 react-dom@18 antd@5

For React 17 projects:

npm install react@17 react-dom@17 antd@4

Note: Ant Design 5 requires React 18+. If you're using React 17, you must use Ant Design 4.

Dependencies

This library also requires:

npm install @laus/json-schema-form dayjs

Quick Start

import { UIForm } from '@laus/uiform'
import '@laus/uiform/dist/style.css'
import type { JsfObjectSchema } from '@laus/uiform'

const schema: JsfObjectSchema = {
  type: "object",
  properties: {
    firstName: {
      title: "First Name",
      type: "string",
      "x-jsf-presentation": {
        inputType: "text"
      }
    },
    email: {
      title: "Email",
      type: "string",
      format: "email",
      "x-jsf-presentation": {
        inputType: "email"
      }
    }
  },
  required: ["firstName", "email"]
}

function MyForm() {
  const handleSubmit = async (values: any, errors?: any) => {
    if (!errors || Object.keys(errors).length === 0) {
      console.log('Form submitted:', values)
    }
  }

  return (
    <UIForm
      schema={schema}
      onSubmit={handleSubmit}
      config={{
        layout: 'vertical',
        size: 'middle'
      }}
    />
  )
}

Responsive Layouts

Create responsive forms that adapt to different screen sizes:

const schema: JsfObjectSchema = {
  type: "object",
  "x-jsf-layout": {
    type: "columns",
    columns: 4,
    responsive: {
      sm: 1,  // 1 column on mobile
      md: 2,  // 2 columns on tablet
      lg: 4   // 4 columns on desktop
    }
  },
  properties: {
    title: {
      title: "Title",
      type: "string",
      "x-jsf-layout": {
        colSpan: {
          sm: 1,
          md: 2,
          lg: 4  // Spans full width on desktop
        }
      }
    }
  }
}

Supported Field Types

  • Text input (text, email, hidden)
  • Number input (number, money)
  • Textarea (textarea)
  • Select dropdown (select)
  • Autocomplete with search (autocomplete)
  • Radio buttons (radio)
  • Checkbox (checkbox)
  • Date picker (date)
  • File upload (file)
  • Fieldset (grouped fields)
  • Group Array (repeatable field groups)

Documentation

See LIBRARY_USAGE.md for comprehensive documentation including:

  • Detailed API reference
  • Responsive layout guide
  • Async options loading
  • Validation examples
  • TypeScript usage
  • Advanced features

Development

Building the Library

npm run build:lib

Running the Demo

npm run dev

Linting

npm run lint

Architecture

This library is built on top of:

See CLAUDE.md for detailed architecture documentation.

License

MIT

Contributing

Contributions are welcome! Please read the contributing guidelines before submitting PRs.

Publishing

This library is published on GitHub. To install it in your project:

npm install DaikonCOde/uiform

To publish a new version:

  1. Update the version in package.json
  2. Create a git tag: git tag v0.1.0
  3. Push the tag: git push origin v0.1.0
  4. Users can then install: npm install DaikonCOde/uiform#v0.1.0