react-form-helper
v1.0.0-beta.8
Published
React component for building forms with ease
Downloads
53
Readme
react-form-helper
React component for building forms with ease.
Install
yarn add react-form-helper
npm install --save react-form-helper
Usage
react-form-helper accept custom components for form, input and button, which makes it easy to use with libraries such as react-toolbox and react-mdl.
Example below shows a simple usage using react-toolbox:
import {FormHelper} from 'react-form-helper'
import {ProgressButton, Checkbox, TextField} from 'react-material-app'
const SignIn = () =>
<FormHelper
saveButton='Login'
inputComponent={TextField}
buttonComponent={ProgressButton}
onSave={credentials => signIn(credentials)}
value={{}}
fields={[
{path: ['email'], icon: 'email', label: 'Email', type: 'email'},
{path: ['password'], icon: 'lock', label: 'Password', type: 'password'},
{path: ['rememberMe'], label: 'Remember me', component: Checkbox},
]}
/>
)
Docs
Examples and API documentation is available here.
License
react-form-helper is dual-licensed under Apache 2.0 and MIT terms.