tforms
React Form Layout inspired by gridforms. This implementation uses flexbox.
Live Demo
Install
npm install tforms
Usage
import React from 'react' import Fieldset Row Field from 'tforms' const UserForm = <form ="tforms"> <Fieldset ="User Login"> <Row> <Field> <div> <label ="username">Username</label> <input ="text" ="form-control" /> </div> </Field> </Row> <Row> <Field ="3"> <div> <label ="username">One third</label> <input ="text" ="form-control" /> </div> </Field> <Field> <div> <label ="username">One fourth</label> <input ="text" ="form-control" /> </div> </Field> </Row> <button ="submit">Button</button> </Fieldset> </form>
The tforms
class name is important.
You need to manually include the stylesheet for this component (uses bootstrap-sass as base).
// somewhere in your scss file
...
@import "node_modules/tforms/lib/style";