@shailesh87/form-builder
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

Usage Npm Package

Install package

sudo npm i custom-form-builder

Import Module

import { FormBuilderModule } from "@shailesh87/form-builder";

HTML usage

<custom-form-builder [formData]="form" (formTempChange)="onChange($event)"> </custom-form-builder>

Compoment Input Options

form: object = {
		components: [
			{
				type: "textfield",
				label: "FirstName",
				key: "firstName",
				input: true
			},
			{
				type: "textfield",
				label: "LastName",
				key: "lastName",
				input: true
			},
			{
				type: "email",
				label: "Email",
				key: "email",
				input: true
			},
			{
				type: "button",
				action: "Submit",
				label: "Submit",
				theme: "primary"
			}
		]
	};

Add css reference in angular.ts usnder style

"node_modules/bootstrap/dist/css/bootstrap.css",
"node_modules/font-awesome/css/font-awesome.css",

Package Sidebar

Install

npm i @shailesh87/form-builder

Weekly Downloads

0

Version

0.0.4

License

MIT

Unpacked Size

1.21 MB

Total Files

28

Last publish

Collaborators

  • shailesh87