easy-form-builder

1.0.10 • Public • Published

Form Builder Component

A reusable form component built with React and NextUI. This component supports various input types, repeatable fields, and dynamic options.

Installation

Example

const fields = [
        {
            key: 'name',
            type: 'text',
            label: 'Name',
        },
        {
            key: 'email',
            type: 'text',
            label: 'Email',
        },
        {
            key: 'gender',
            label: 'Gender',
            type: 'radio',
            options: [
                {
                    value: 'male',
                    label: 'Male',
                },
                {
                    value: 'female',
                    label: 'Female',
                }
            ],
        },
    ]

    const initialValues = {
        email: ''
    }

    const handleFormSubmit = (data) => {
        console.log( data )
        // console.log( JSON.stringify(data) )
    };

Package Sidebar

Install

npm i easy-form-builder

Weekly Downloads

34

Version

1.0.10

License

ISC

Unpacked Size

21.5 kB

Total Files

4

Last publish

Collaborators

  • elyasjs