https://github.com/arqex/react-json
A JSON editor packed as a React.js component. The easiest way of create web forms.
https://github.com/arqex/react-json
Last synced: 18 days ago
JSON representation
A JSON editor packed as a React.js component. The easiest way of create web forms.
- Host: GitHub
- URL: https://github.com/arqex/react-json
- Owner: arqex
- License: mit
- Created: 2015-05-06T15:04:53.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2018-01-11T18:14:22.000Z (over 7 years ago)
- Last Synced: 2025-02-12T18:49:26.769Z (3 months ago)
- Language: JavaScript
- Size: 197 KB
- Stars: 98
- Watchers: 5
- Forks: 40
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# react-json
A JSON editor packed as a React.js component, but also the simplest way of creating web forms.[Play safe with react-json forms in the playground](http://codepen.io/arqex/pen/rVWYgo?editors=001).
React-json is like having an special input type for JSON objects, developers only need to listen to changes in the JSON instead of writing all the boilerplate needed to handle every single input of the form. It comes with top features:
* Field type guessing for quick forms
* Validation
* Styles easily customizable
* Extensible with custom field types## Examples
Do you want to edit some JSON in your app? Pass it to the Json component:
```js
var doc = {
hola: "amigo",
array: [1,2,3]
};React.render(
,
document.body
);function logChange( value ){
console.log( value );
}
```
[See this example working](http://codepen.io/arqex/pen/rVWYgo?editors=001)## A simple form creator
Do you hate creating forms? React-json handles all the dirty markup for you, and makes you focus in what is important;
```js
var doc = {
user: "",
password: ""
};// form: true
// make objects not extensible,
// fields not removable
// and inputs always visible
var settings = {
form: true,
fields: { password: {type: 'password'} }
};React.render(
,
document.body
);
```
[See this form working](http://codepen.io/arqex/pen/xGRpOx?editors=011)## Docs
React JSON is highly configurable, have a look at the docs to discover how.## MIT licensed
[License here](LICENSE)