Skip to content

Pajn/react-form-helper

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •