Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Nevoss/form-wrapper-js
JS abstraction for forms
https://github.com/Nevoss/form-wrapper-js
Last synced: 15 days ago
JSON representation
JS abstraction for forms
- Host: GitHub
- URL: https://github.com/Nevoss/form-wrapper-js
- Owner: Nevoss
- License: mit
- Archived: true
- Created: 2018-10-18T21:10:16.000Z (about 6 years ago)
- Default Branch: dev
- Last Pushed: 2020-08-07T23:10:29.000Z (over 4 years ago)
- Last Synced: 2024-10-25T14:07:57.298Z (18 days ago)
- Language: TypeScript
- Homepage: https://nevoss.github.io/form-wrapper-js/
- Size: 1.66 MB
- Stars: 135
- Watchers: 4
- Forks: 5
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
Form wrapper js> A lightweight library that creates forms systems in a convenient and easy way, without dependencies and magic code.
## Status: BETA
The current version is in beta, most of the feature are stable, but there are may still be bugs, and api may change a little bit.
for 0.x move to 0.x branch.
## :art: Playground
- Vue - [https://codesandbox.io/s/5x96q83yvp?module=%2Fsrc%2FApp.vue](https://codesandbox.io/s/5x96q83yvp?module=%2Fsrc%2FApp.vue)
## :cd: Installation
```
npm install --save form-wrapper-js@next # for 1.x
// or
npm install --save form-wrapper-js # for 0.x
```**or**
```
yarn add form-wrapper-js@next # for 1.x
// or
yarn add form-wrapper-js # for 0.x
```## :book: Documentation
Please check out the [Form Wrapper JS website](https://nevoss.github.io/form-wrapper-js).
## :rocket: Basic Usage
This is a quick example with **VUE**, please check out [the website](https://nevoss.github.io/form-wrapper-js) for full documentation.
```vue
import { Form } from 'form-wrapper-js'
import axios from 'axios'export default {
data() {
return {
form: Form.create({
email: null,
name: null,
password: null,
}),
}
},
methods: {
async submit() {
const { response } = await this.form.$submit(form =>
axios.post('some-url', form.$values())
)
},
},
}```
## :beers: Contribute
**Code, Docs, Bug reports, Ideas - are more the welcome.** ⭐
the installation is very easy, take a look at CONTRIBUTING.md file and follow the instructions.
## :lock: License
The MIT License (MIT). Please see License File for more information.