Giter Club home page Giter Club logo

react-json-schema-builder's Introduction

react-json-schema-builder

Allows to build a json schema interactively.

NPM JavaScript Style Guide

Demo

Install

WARNING: this repo is a forked version for personal use. The npm package below belongs to the originator.

npm install --save react-json-schema-builder

or

yarn add react-json-schema-builder

Usage

import React from 'react'

import JSONSchemaBuilder, {Schema} from 'react-json-schema-builder'
import 'react-json-schema-builder/dist/index.css'


const Example = () => {
  const [schema, setSchema] = React.useState<Schema>(jsonSchema)

  return (
    <JSONSchemaBuilder 
      locale={"es"} 
      schema={schema} 
      onChange={setSchema} 
    />)
}

Contributing

The package is made up of 2 main folders:

  • /src contains all the source files and components
  • /example is a create-react-app based demo website

To setup and run a local copy:

  1. Clone this repo with git clone https://github.com/viczaca/react-json-schema-builder
  2. Run yarn install in the root folder
  3. Run yarn install in the example folder
  4. In separate terminal windows, run yarn start in the root and example folders.

You should now be up and running with live browser reloading of the example website while you work on source files and components in the /src folder.

When you're done working on your changes, submit a PR with the details and include a screenshot if you've changed anything visually.

In order to add new languages:

  1. Create a json in src/locales/new_lang.json with the new translations
  2. Import in src\utils\i18n.ts the new json and append it to resources

License

MIT © viczaca

react-json-schema-builder's People

Contributors

vzaragoza avatar viczaca avatar juaismar avatar jkoontz2010 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.