Skip to content

Repository files navigation

Frig

Circle CICoverage StatusNPM

React Forms made easy / Developed at TouchBistro in Toronto.

Frig is:

  • Simple - Most form fields are 1 liners. Automatic type inference from your data keeps your form code short.
  • Data-bindings - Connecting any form to any data store is just 2 lines of code. 100% Redux Ready!
  • Layout agnostic - Frig leaves the positioning and layout of form elements completely in your control.
  • Powerful - Validations, nested fieldsets, image previews, time pickers and color pickers are all included out of the box!
  • 100% React - Unlike tcomb-formsFrig is built 100% in React so it should feel very familiar in any React project.

Installation

  • npm:npm install --save frig frigging-bootstrap

Note: For non ES6 browser compatibility you will also need to install the Babel PolyFill.

Hello Frigging World

// One time theme selection// (put this in an initialization file and call it once)importFrigfrom"frig"importFriggingBootstrapfrom"frigging-bootstrap"Frig.defaultTheme(FriggingBootstrap)// ...// Libraries needed for each componentimportReactfrom"react"importReactDOMfrom"react-dom"import{Form,Input,Submit}from"frig"classTheBasicsExampleextendsReact.Component{displayName="TheBasicsExample"state={account: {}}render(){return(<Formdata={this.state.account}onChange={(account)=>this.setState({account})}><divclassName="row"><Inputname="email"/><Inputname="password"/><Inputname="rememberMe"type="switch"/><Submittitle="Sign In"/></div></Form>)}}

Themes

Much of Frig's functionality is provided by Frig themes.

Currently, the default theme (and only) is Frigging Bootstrap.

Documentation

More information is available in the documentation:

http://frig-js.github.io/frig/

Examples

https://github.com/frig-js/frigging-examples

License

Frig is licensed under the MIT license.

About

Simple but powerful forms for React. Inspired by SimpleForm. https://frig-js.github.io/frig

Resources

Stars

10 stars

Watchers

10 watching

Forks

Releases

Packages

Used by

Contributors

Languages