Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kendaganio/toguro
Isang daang porsiyento
https://github.com/kendaganio/toguro
form-builder forms jsonschema vanilla-js
Last synced: 3 days ago
JSON representation
Isang daang porsiyento
- Host: GitHub
- URL: https://github.com/kendaganio/toguro
- Owner: kendaganio
- License: mit
- Created: 2018-02-21T03:25:02.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-27T11:59:54.000Z (almost 7 years ago)
- Last Synced: 2024-04-24T04:29:24.608Z (9 months ago)
- Topics: form-builder, forms, jsonschema, vanilla-js
- Language: JavaScript
- Homepage:
- Size: 480 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Toguro · [![Build Status](https://travis-ci.org/kendaganio/toguro.svg?branch=master)](https://travis-ci.org/kendaganio/toguro)
> Turn your JSON to 100% working forms.## Install
via package managers
```
yarn add toguro
npm i toguro
```via a CDN
```html```
## Usage
You need to provide a [JSON Schema](http://json-schema.org/)
```javascript
var schema = {
"type": "object",
"properties": {
"name": {
"type": "string",
"title": "Name",
},
"age": {
"type": "integer",
"title": "Age",
},
"description": {
"type": "string",
"title": "Description",
}
},
"required": [
"name"
]
}
```Instantiate and render
```javascript
var toguro = new Toguro({
schema: schema,
submit: (formData) => { console.log(formData) }
})toguro.renderTo(document.getElementById("some-id"))
```