https://github.com/hurricaneinteractive/voltage-form-builder
https://github.com/hurricaneinteractive/voltage-form-builder
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/hurricaneinteractive/voltage-form-builder
- Owner: HurricaneInteractive
- Created: 2019-12-02T09:50:38.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T02:08:09.000Z (over 3 years ago)
- Last Synced: 2025-02-04T06:17:08.554Z (over 1 year ago)
- Language: TypeScript
- Size: 3.21 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 24
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# voltage-form-builder (WIP)
> This project is still a **WIP**, I am currently in the "exploring" and "hacking" phase.
The goal for this project is to make form building in react easy and less tedious. I want to build this project to have a easy to use API but still complex for advanced forms.
## Example API
```js
import React, { useState } from 'react'
import FormBuilder, { constructState, string } from 'voltage-form-builder'
const YourComponent = () => {
const struct = {
email: string({ type: "email" }),
password: string({ type: "password" })
}
const [state, setState] = useState(constructState(struct))
const onSubmit = () => { // do your thing }
return (
)
}
```
## In the future
Eventually this project will move away from CRA to allow for packaging and publishing on npm.
## Interested?
If you are interested in knowing more about this project. Feel free to reach out and have a chat.