Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gravel-form/chakra-ui-form

A flexible middlewares driven json schema form with Chakra UI
https://github.com/gravel-form/chakra-ui-form

chakra-ui form json-schema jsonschema react

Last synced: about 1 month ago
JSON representation

A flexible middlewares driven json schema form with Chakra UI

Awesome Lists containing this project

README

        

# @gravel-form/chakra-ui

A flexible middlewares driven json schema form. The only limitation is your imagination.

## Quick start

```bash
npm install @chakra-ui/core @emotion/core @emotion/styled emotion-theming
npm install @gravel-form/chakra-ui
```

``` jsx
import React from 'react';
import { theme, ThemeProvider, CSSReset } from '@chakra-ui/core';
import { Form } from '@gravel-form/chakra-ui/lib';

function MyFirstForm() {
const schema = {
type: 'object',
properties: {
username: { type: 'string' },
password: { type: 'string' },
},
};

const extraProps = {
properties: {
password: {
props: { type: 'password' },
},
},
};

const [data, setData] = React.useState();

return (
{
alert(JSON.stringify(data, null, 2));
}}
/>
);
}

function App() {
return (




);
}

export default App;
```

## Playground
More examples can be found on the [playground](https://gravel-form.github.io/chakra-ui-form/basic).