@snups/rjsf-chakra-ui
v6.0.0-beta.15.4
Published
Chakra UI theme, fields, and widgets for react-jsonschema-form
Downloads
22
Readme
Table of Contents
- Table of Contents
- About The Project
- Getting Started
- Usage
- Optional Chakra UI Theme properties
- Roadmap
- Contributing
- Contact
About The Project
Exports chakra-ui theme, fields and widgets for react-jsonschema-form.
Built With
Getting Started
Prerequisites
@chakra-ui/react >= 3chakra-react-select >= 6@snups/rjsf-core >= 6@snups/rjsf-utils >= 6@snups/rjsf-validator-ajv8 >= 6
Refer to the rjsf installation guide and chakra-ui installation guide and for more details.
Installation
yarn add @chakra-ui/react chakra-react-select @snups/rjsf-core @snups/rjsf-utils @snups/rjsf-validator-ajv8Usage
yarn add @snups/rjsf-chakra-uiimport Form from '@snups/rjsf-chakra-ui';or
import { withTheme } from '@snups/rjsf-core';
import { Theme as ChakraUITheme } from '@snups/rjsf-chakra-ui';
// Make modifications to the theme with your own fields and widgets
const Form = withTheme(ChakraUITheme);Optional Chakra UI Theme properties
- To pass additional properties to widgets, see this guide.
You can use ChakraProvider, to customize the components at a theme level.
And, uiSchema allows for the use of a "chakra" "ui:option" to customize the styling of the form widgets.
Custom Chakra uiSchema Chakra Property
{
"ui:options": {
"chakra": {
"p": "1rem",
"color": "blue.200",
"sx": {
"margin": "0 auto"
}
}
}
}It accepts the theme accessible style props provided by Chakra and Emotion.
Roadmap
See the open issues for a list of proposed features (and known issues).
Contributing
Read our contributors' guide to get started.
Contact
rjsf team: https://github.com/orgs/rjsf-team/people
GitHub repository: https://github.com/rjsf-team/react-jsonschema-form

