react-form-helper
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-beta.8 • Public • Published

react-form-helper

Build Status npm version License

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.

Readme

Keywords

none

Package Sidebar

Install

npm i react-form-helper

Weekly Downloads

27

Version

1.0.0-beta.8

License

(Apache-2.0 OR MIT)

Unpacked Size

58.5 MB

Total Files

698

Last publish

Collaborators

  • pajn