diff --git a/README.md b/README.md index 071bb4a..9f75b33 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,82 @@ # formhero -Fully customisable React form utility + +Fully customisable react form utility. + +## ✓ Features + +- Typescript compatible +- Customizable extractor, validator, getter and setters. (More in the docs) +- No Deps +- Miniscule () + +## 🚀 Quickstart + +```tyimport React from 'react' +import ReactDOM from 'react-dom' +import { useForm } from 'formhero' + +const Form = () => { + + const { auto, form, errors } = useForm({ + username: '', + password: '', + type: 'formhero', + awesome: true, + }, { + username: /^test/, + password: { + validator: /^.{3,}$/, + message: 'To short', + }, + awesome: (value) => !!value + }) + + const _submit = (e: React.FormEvent) => { + e.preventDefault() + console.log(form, errors) + } + + return ( +