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,
- Host: GitHub
- URL: https://github.com/devceline/react-crunch-form
- Owner: devceline
- Created: 2021-03-12T22:10:49.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-03-21T18:26:56.000Z (over 5 years ago)
- Last Synced: 2025-05-20T02:43:43.626Z (about 1 year ago)
- Topics: bootstrapping, crunch, form, react
- Language: TypeScript
- Homepage:
- Size: 452 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# React Crunch Form
> A library designed for you to crunch out a form really fast
[](https://www.npmjs.com/package/react-crunch-form) [](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)