# react-schemaform

> Light weight react components for rendering JSON Schema forms

Latest version **0.0.14** (published 2017-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-schemaform
pnpm add react-schemaform
yarn add react-schemaform
bun add react-schemaform
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.14 |
| Published | 2017-11-07 |
| First published | 2017-09-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Henrik Haugberg |
| Maintainers | henit |

## Links

- npm: https://www.npmjs.com/package/react-schemaform
- npm.io page: https://npm.io/package/react-schemaform

## Dependencies (8)

- [react](https://npm.io/package/react.md) ^15.6.1
- [bem-cn](https://npm.io/package/bem-cn.md) ^2.1.3
- [lodash](https://npm.io/package/lodash.md) ^4.17.4
- [core-js](https://npm.io/package/core-js.md) ^2.5.1
- [react-dom](https://npm.io/package/react-dom.md) ^15.6.1
- [prop-types](https://npm.io/package/prop-types.md) ^15.5.10
- [material-ui](https://npm.io/package/material-ui.md) ^0.19.2
- [sert-schema](https://npm.io/package/sert-schema.md) ^0.1.2

## Recent versions

- 0.0.14 (latest) — 2017-11-07
- 0.0.13 — 2017-11-01
- 0.0.12 — 2017-10-03
- 0.0.11 — 2017-10-03
- 0.0.10 — 2017-10-03
- 0.0.9 — 2017-09-28
- 0.0.8 — 2017-09-28
- 0.0.7 — 2017-09-28
- 0.0.6 — 2017-09-27
- 0.0.5 — 2017-09-27
- 0.0.4 — 2017-09-27
- 0.0.2 — 2017-09-25

## README

# React schema form

Light weight react components for rendering forms based on [JSON Schema](http://json-schema.org/)

Using dependency injection to support multiple rendering themes/libraries. Easily extendable by replacing some or all rendering components. Inspired by libraries like *json-schema-form*.

## Getting started

**Install**

    npm install react-schemaform --save

**Usage**

    import SchemaForm from 'react-schemaform';

    const schema = {
        title: 'Test schema',
        type: 'object',
        properties: {
            name: { type: 'string' },
            age: { type: 'integer' }
        }
    };

    const value = {
        name: 'John Doe',
        age: 42
    };

    <SchemaForm
        schema={ schema }
        value={ value }
        onChange={ value => console.info('Form change', value) }
    />

## Status

*Work in progress*

### TODO

- Inline validation
- Unsupported validation keywords (list below)

## JSON Schema feature support

**Schema keywords supported**

- [x] title
- [x] description
- [x] type
  - [x] string
  - [x] number
  - [x] integer
  - [x] boolean
  - [x] null
  - [x] array
  - [x] object
- [x] maxLength (counter)
- [x] items (schema object)
- [ ] items (array of schemas)
- [x] properties
- [x] additionalProperties
- [x] const

- [ ] format
  - [ ] date-time
  - [ ] email
  - [ ] hostname
  - [ ] ipv4
  - [ ] ipv6
  - [ ] uri
  - [ ] uri-reference
  - [ ] uri-template
  - [ ] json-pointer
- [x] readOnly
- [ ] multipleOf
- [x] maximum
- [x] exclusiveMaximum
- [x] minimum
- [x] exclusiveMinimum
- [x] maxLength
- [x] minLength
- [x] pattern
- [ ] additionalItems
- [x] maxItems
- [x] minItems
- [ ] uniqueItems
- [ ] contains
- [x] maxProperties
- [x] minProperties
- [x] required
- [x] patternProperties
- [ ] dependencies
- [ ] propertyNames
- [x] enum
- [ ] allOf
- [ ] anyOf
- [ ] oneOf
- [ ] not

## Rendering frameworks

- Basic (no framework)
- [Material UI](http://www.material-ui.com/) (WIP)

---
_Source: https://npm.io/package/react-schemaform · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
