Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/derekstavis/react-vanilla-form

An unobtrusive form serializer and validator that works by following standards.
https://github.com/derekstavis/react-vanilla-form

Last synced: about 8 hours ago
JSON representation

An unobtrusive form serializer and validator that works by following standards.

Awesome Lists containing this project

README

        

# React Vanilla Form
> An unobtrusive form serializer and validator that works by following standards.


Vanilla Form is a form serialization and validation component built upon
standards. To obtain the serialized form data the only thing you need to
do is to declare your form controls (native or custom!) following the
standard input interfaces: Using `name`, `value`, `htmlFor` and `role`
properties.

Wire `onSubmit` prop to `Form` component to get the serialized data from
the form. Pass `validations` to display and catch errors in the form.
Use `onChange` (or not) to get realtime data updates.

```jsx static
import Form from 'react-vanilla-form'

console.log(data)}>

Name




Age




Address



Submit!

```

Also, Vanilla Form is lightweight. It weighs only 2.7k gzipped. The only
direct depedencies are 4 or 5 Ramda functions which you can treeshake on
your bundler to slim it up (but you should consider using Ramda :smiley:).

See the full documentation and live examples at
http://derek.github.stavis.me/react-vanilla-form.