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

devlab-one-dynamic-form

v1.0.5

Published

A powerful Angular Material-based Dynamic Form Library that generates reactive forms from JSON configuration. Instead of manually creating form controls and templates, you can define your entire form structure using a JSON object and the library will auto

Readme

Dynamic Form

A powerful Angular Material-based Dynamic Form Library that generates reactive forms from JSON configuration. Instead of manually creating form controls and templates, you can define your entire form structure using a JSON object and the library will automatically render the corresponding Angular Material components.

Feedback / Suggestion / Report issue

https://github.com/AravindhanSenthilkumar/Feedback/issues/1

Wizard Forms

The Dynamic Form library supports multi-step wizard forms. Each wizard step can contain its own form configuration and validation rules.

DynamicFormDetails

The library supports two rendering modes:

  1. Single Form
  2. Multi-Step Wizard Form
export interface DynamicForm {
  formComponent?: Form;
  wizardComponent?: Wizards;
}

Features

  • 🚀 JSON-driven form generation
  • 🎨 Built with Angular Material Design
  • ✅ Reactive Forms support
  • ✅ Built-in validators
  • ✅ Dynamic visibility control
  • ✅ Custom placeholders, hints, tooltips, prefixes, and suffixes
  • ✅ Single and multi-select dropdowns
  • ✅ Form Groups and Form Arrays support
  • ✅ Responsive grid layout using configurable columns
  • ✅ Submit, Cancel, and Reset buttons
  • ✅ Auto-complete dropdown support

Supported Field Types

The library supports the following field types:

export enum FieldType {
  text = 'text',
  password = 'password',
  color = 'color',
  range = 'range',
  number = 'number',
  url = 'url',
  email = 'email',
  tel = 'tel',
  textArea = 'text-area',
  date = 'date',
  time = 'time',
  dropdown = 'drop-down',
  slideToggle = 'slide-toggle',
  file = 'file',
  checkbox = 'checkbox',
  radio = 'radio',
  array = 'array',
  group = 'group'
}

Installation

npm install devlab-one-dynamic-form

Usage

Import the module into your application:

import { DynamicForm } from 'devlab-one-dynamic-form';

@Component({
  imports: [DynamicForm]
})
export class AppComponent {}

Basic Example

Create a JSON configuration and pass it to the Dynamic Form component.

formConfig = {
  controls: [
    {
      name: 'Name',
      type: FieldType.text,
      label: 'Name',
      placeholder: 'Enter your name',
      visible: true,
      numberOfColumns: 6,
      validators: {
        required: true,
        minLength: 2,
        maxLength: 50
      }
    },
    {
      name: 'email',
      type: FieldType.email,
      label: 'Email',
      placeholder: 'Enter your email',
      visible: true,
      numberOfColumns: 6,
      validators: {
        required: true
      }
    }
  ]
};

HTML:

   <lib-dynamic-form
      [dynamicFormDetails]="dynamicFormDetails"
      (onSubmitForm)="submitForm($event)"
      (onCancelForm)="cancelForm()">
   </lib-dynamic-form>

Complete Form Configuration Example

The following example demonstrates multiple supported field types including:

  • Textbox
  • Number
  • Dropdown
  • Radio Button
  • Multi Select Dropdown
  • Validators
  • Form Buttons
{
  "controls": [
    {
      "name": "Name",
      "type": FieldType.text,
      "label": "Name",
      "placeholder": "Enter your name",
      "numberOfColumns": 2,
      "visible": true,
      "validators": {
        "required": true,
        "minLength": 2,
        "maxLength": 6
      }
    },
    {
      "name": "age",
      "type": FieldType.number,
      "label": "Age",
      "placeholder": "Enter your age",
      "numberOfColumns": 10,
      "visible": true,
      "validators": {
        "required": true
      }
    },
    {
      "name": "mobileNumber",
      "type": FieldType.number,
      "label": "Mobile Number",
      "placeholder": "Enter your mobile number",
      "numberOfColumns": 12,
      "visible": true,
      "validators": {
        "required": true
      }
    },
    {
      "name": "country",
      "type": FieldType.dropdown,
      "label": "Country",
      "placeholder": "Choose country",
      "multipleSelect": false,
      "autoComplete": true,
      "options": [
        {
          "key": "IND",
          "label": "India"
        },
        {
          "key": "AUS",
          "label": "Australia"
        },
        {
          "key": "ENG",
          "label": "England"
        }
      ],
      "validators": {
        "required": true
      }
    },
    {
      "name": "MaritalStatus",
      "type": FieldType.radio,
      "label": "Marital Status",
      "options": [
        {
          "key": "Married",
          "label": "Married"
        },
        {
          "key": "Single",
          "label": "Single"
        }
      ],
      "validators": {
        "required": true
      }
    },
    {
      "name": "Gender",
      "type": FieldType.radio,
      "label": "Gender",
      "options": [
        {
          "key": "Male",
          "label": "Male"
        },
        {
          "key": "Female",
          "label": "Female"
        },
        {
          "key": "Others",
          "label": "Others"
        }
      ],
      "validators": {
        "required": true
      }
    },
    {
      "name": "PreferedLocation",
      "type": FieldType.dropdown,
      "label": "Preferred Location",
      "placeholder": "Choose Location",
      "multipleSelect": true,
      "autoComplete": true,
      "options": [
        {
          "key": "IND",
          "label": "India"
        },
        {
          "key": "AUS",
          "label": "Australia"
        },
        {
          "key": "ENG",
          "label": "England"
        }
      ],
      "validators": {
        "required": true
      }
    }
  ],
  "buttons": {
    "submit": {
      "visible": true,
      "name": "Submit"
    },
    "cancel": {
      "visible": true,
      "name": "Cancel"
    },
    "reset": {
      "visible": true,
      "name": "Reset"
    }
  }
}

Supported Validators

validators: {
  required: true,
  minLength: 2,
  maxLength: 50,
  min: 1,
  max: 100,
  pattern: '^[A-Za-z]+$'
}

Field Properties

| Property | Description | | --------------- | ------------------------------ | | name | Unique form control name | | type | Field type from FieldType enum | | label | Display label | | placeholder | Placeholder text | | value | Default value | | readonly | Disable editing | | visible | Show or hide field | | tooltip | Tooltip text | | hint | Hint text | | prefixIcon | Material prefix icon | | suffixIcon | Material suffix icon | | prefixText | Prefix text | | suffixText | Suffix text | | validators | Validation configuration | | numberOfColumns | Responsive grid width | | options | Dropdown/Radio options | | multipleSelect | Enable multi-select dropdown | | autoComplete | Enable autocomplete search |

Wizard Form Example

dynamicFormDetails: DynamicFormDetails = {
  wizardComponent: {
    wizards: [
      {
        title: 'Personal Information',
        controls: [
          {
            name: 'name',
            type: FieldType.text,
            label: 'Name',
            placeholder: 'Enter your name',
            validators: {
              required: true
            }
          },
          {
            name: 'age',
            type: FieldType.number,
            label: 'Age',
            validators: {
              required: true
            }
          }
        ]
      },
      {
        title: 'Contact Information',
        controls: [
          {
            name: 'email',
            type: FieldType.email,
            label: 'Email',
            validators: {
              required: true
            }
          },
          {
            name: 'mobileNumber',
            type: FieldType.tel,
            label: 'Mobile Number',
            validators: {
              required: true
            }
          }
        ]
      },
      {
        title: 'Preferences',
        controls: [
          {
            name: 'country',
            type: FieldType.dropdown,
            label: 'Country',
            options: [
              {
                key: 'IND',
                label: 'India'
              },
              {
                key: 'AUS',
                label: 'Australia'
              }
            ],
            validators: {
              required: true
            }
          }
        ]
      }
    ]
  }
};

Component Usage

   <lib-dynamic-form
      [dynamicFormDetails]="dynamicFormDetails"
      (onSubmitForm)="submitForm($event)"
      (onCancelForm)="cancelForm()">
   </lib-dynamic-form>

Wizard Features

  • Multi-step form navigation
  • Previous and Next buttons
  • Step-level validation
  • Angular Material Stepper integration
  • Dynamic step creation using JSON
  • Responsive layouts
  • Submit on final step
  • Supports all field types
  • Supports nested Form Groups
  • Supports Form Arrays

Wizard Navigation

Events

Submit Event

onSubmit(formData: any) {
  console.log(formData);
}

Cancel Event

onCancel() {
  console.log('Cancelled');
}

Reset Event

onReset() {
  console.log('Reset');
}

Responsive Layout

Each field supports:

numberOfColumns: 12

Based on a 12-column grid system:

| Value | Width | | ----- | ---------- | | 12 | Full Width | | 6 | Half Width | | 4 | One Third | | 3 | One Fourth |

Built With

  • Angular 21+
  • Angular Material
  • Reactive Forms
  • TypeScript

| Action | Description | | -------- | --------------------------------------- | | Next | Moves to the next step after validation | | Previous | Returns to the previous step | | Submit | Available on the final step | | Cancel | Closes or resets the wizard |

Submit Wizard

(onSubmitForm)="onSubmit($event)"
onSubmit(formData: any) {
  console.log(formData);
}

The submitted payload contains data from all wizard steps merged into a single form object.

License

MIT License