# react-jsonschema-survey

> Use react-jsonschema to build survey components.

Latest version **1.0.1** (published 2020-08-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-jsonschema-survey
pnpm add react-jsonschema-survey
yarn add react-jsonschema-survey
bun add react-jsonschema-survey
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-08-15 |
| First published | 2020-03-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=8 |
| Dependencies | 9 |
| Unpacked size | 4.5 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | lilaceproductions |
| Maintainers | fwalson |

## Links

- npm: https://www.npmjs.com/package/react-jsonschema-survey
- Repository: https://github.com/lilaceproductions/react-jsonschema-survey
- Issues: https://github.com/lilaceproductions/react-jsonschema-survey/issues
- npm.io page: https://npm.io/package/react-jsonschema-survey

## Dependencies (9)

- [crypto](https://npm.io/package/crypto.md) ^1.0.1
- [cluster](https://npm.io/package/cluster.md) ^0.7.7
- [deep-keys](https://npm.io/package/deep-keys.md) ^0.5.0
- [obj-parse](https://npm.io/package/obj-parse.md) ^0.3.0
- [react-quick-alert](https://npm.io/package/react-quick-alert.md) ^1.0.0
- [immutability-helper](https://npm.io/package/immutability-helper.md) ^3.0.1
- [react-jsonschema-form](https://npm.io/package/react-jsonschema-form.md) ^1.8.1
- [react-copy-to-clipboard](https://npm.io/package/react-copy-to-clipboard.md) ^5.0.2
- [react-simple-promise-modal](https://npm.io/package/react-simple-promise-modal.md) ^1.0.4

## Recent versions

- 1.0.1 (latest) — 2020-08-15
- 1.0.0 — 2020-03-08

## README

# react-jsonschema-survey

> Use react-jsonschema-form to build survey components. Consists of modes for builder/preview and live. JSON Schema can be built and copied.

[![NPM](https://img.shields.io/npm/v/react-jsonschema-survey.svg)](https://www.npmjs.com/package/react-jsonschema-survey) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Install

```bash
npm install --save react-jsonschema-survey
```

## Usage
[Demo](https://calabashlabsllc.github.io/react-jsonschema-survey)

Demo Example Code [Here](https://github.com/CalabashLabsLLC/react-jsonschema-survey/tree/master/example)

```jsx
import React, { Component } from 'react'
import SurveySchemaGenerator from 'react-jsonschema-survey'
import { DATA, MODE } from './custom'

class Example extends Component {
  onFinishSurvey = (result) => {
    console.log('onFinishSurvey results:', result);
  }
  render () {
    return (
      <SurveySchemaGenerator data={DATA} mode={MODE} onFinishSurvey={this.onFinishSurvey} />
    )
  }
}
```

### Component API

`<SurveySchemaGenerator>` component:

Property | Type | Default | Required | Description
-------- | ---- | ------- | -------- |-----------
data | `Array` | n/a | yes | Array of question schemas
mode | `String` | n/a | yes | Builder or Live
onFinishSurvey | `Function` | n/a | yes | Return live survey answers

Uses npm packages [react-quick-alert](https://github.com/CalabashLabsLLC/react-quick-alert) and [react-simple-promise-modal](https://github.com/CalabashLabsLLC/react-simple-promise-modal)

## License
MIT © [calabashlabsllc](https://github.com/calabashlabsllc)

## Reference
[react-jsonschema-form documentation](https://react-jsonschema-form.readthedocs.io/)

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