react-dy-forms
v1.1.6
Published
A simple dynamic form that you can use for [React](https://reactjs.org/)
Downloads
3
Maintainers
Readme
react-dy-forms
A simple dynamic form that you can use for React
Install
npm install --save react-dy-forms
Usage
import React, { Component } from 'react'
import DyForms from 'react-dy-forms'
class Example extends Component {
render () {
const fields = [
{
name : "firstname",
label : "First Name",
placeholder : "First Name",
defaultValue : "",
type: "text",
isRequired: true
},
{
name : "lastname",
label : "Last Name",
placeholder : "Last Name",
defaultValue : "",
type: "text",
isRequired: true
},
{
name : "password",
label : "Password",
placeholder : "",
defaultValue : "",
type: "password",
isRequired: true
},
{
name : "gender",
label : "Gender",
type: "select",
options : [{
value : "male",
name : "Male"
},
{
value : "female",
name : "Female"
}
]
}
]
return (
<DyForms fields={fields}/>
)
}
}
License
MIT © archbrys