kishorevarma / formsy-react-components

A set of React JS components for use in a formsy-react form. Markup adheres to Bootstrap 3 form structure.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

formsy-react-components

Build Status npm version GitHub release GitHub contributors

NOTE! the master branch is the development branch, the release-0.x branch has the source and README for the current npm release.

formsy-react-components is a selection of React components that render form elements for use in a formsy-react form.

The form components included are:

  • <Checkbox>
  • <CheckboxGroup>
  • <File>
  • <Input>
  • <RadioGroup>
  • <Select>
  • <Textarea>

For convenience, we also ship a <Form> component that wraps formst-react’s <Form> component and allows you to define some common props that will be picked-up by child components in the form.

The components render markup to be quickly included in a Bootstrap 3 form. This includes a <label>, help text, and some validation styling tied to formsy’s validation state and validation messages.

Install

To install using npm:

npm install --save formsy-react
npm install --save formsy-react-components

Usage

import { Form, Input } 'formsy-react-components';

const MyForm = (props) => {
    return (
        <Form onSubmit={(data) => { console.log(data) }}>
            <Input
                name="firstname"
                label="What is your first name?"
            />
        </Form>
    )
}

Examples

Documentation

Documentation is a work in progress!

  • For a working code example, visit the Playground, then examine the source.
  • There is some information in the Wiki.

About

A set of React JS components for use in a formsy-react form. Markup adheres to Bootstrap 3 form structure.

License:MIT License


Languages

Language:JavaScript 100.0%