Skip to content

Repository files navigation

react-pretty-json

NPM versiondependencies StatusdevDependencies Status

Get started

  1. Install react-pretty-json in your project:
$ npm install react-pretty-json
  1. Import package and pass JSON.
importJsonViewfrom'react-pretty-json';// ...render(){letobj={example: 'string',number: 123,boolean: true};return<JsonViewjson={obj}/>;}
  1. (Optional) Importing styles. You can reach it with `react-pretty-json/assets/json-view.css'.
import'react/pretty-json/assets/json-view.css!';

Component props

PropTypeDefaultDescription
json*objectnoneGenerate object.
spacesnumber4Parts that will be generated js files.

* - Required.

License

GPL-3.0

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

6 watching

Forks

Releases

Packages

Contributors

Languages