An open API service indexing awesome lists of open source software.

https://github.com/devceline/react-crunch-form

Forms should be simple, should not assume anything about style or paradigm. This is an attempt at that,
https://github.com/devceline/react-crunch-form

bootstrapping crunch form react

Last synced: 2 months ago
JSON representation

Forms should be simple, should not assume anything about style or paradigm. This is an attempt at that,

Awesome Lists containing this project

README

          

# React Crunch Form

> A library designed for you to crunch out a form really fast

[![NPM](https://img.shields.io/npm/v/react-crunch-form.svg)](https://www.npmjs.com/package/react-crunch-form) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Install

```bash
npm install --save react-crunch-form
yarn install react-crunch-form
```

## Usage

```tsx
import CrunchForm, {
CrunchInput,
CrunchInputValidationDisplay,
CrunchSubmit
} from 'react-crunch-form';

const getLookup = () => {
return new Promise<{ [k: string]: string }>((resolve) => {
setTimeout(() => {
resolve({
foo: 'bar',
baz: 'bor'
});
}, 300);
});
};

const App = () => {
getLookup().then((v) => console.log({ v }));

return (
console.log(body)}>


{
if (!v) return 'required';
if (v.length > 5) return 'TOO LONG';
return false;
}
]}
field='something'
type='textarea'
/>


Lookup coming from object



Lookup coming from a promise




Native html date picker.

Does not work on Safari or IE






Native html time picker.

Does not work on Safari or IE




Submit

);
};
```

## License

MIT © [shaheensarafa](https://github.com/shaheensarafa)