packages/mui/README.md
<a href="https://rjsf-team.github.io/react-jsonschema-form/docs/"><strong>Explore the docs »</strong></a>
<a href="https://rjsf-team.github.io/react-jsonschema-form/">View Playground</a>
·
<a href="https://github.com/rjsf-team/react-jsonschema-form/issues">Report Bug</a>
·
<a href="https://github.com/rjsf-team/react-jsonschema-form/issues">Request Feature</a>
Exports MUI version 5 theme, fields, and widgets for react-jsonschema-form.
NOTE: Material UI 7 requires React 18, so you will need to upgrade
@mui/material >= 7@mui/icons-material >= 7@emotion/react >= 11@emotion/styled >= 11@rjsf/core >= 6@rjsf/utils >= 6@rjsf/validator-ajv8 >= 6yarn add @mui/material @mui/icons-material @emotion/react @emotion/styled @rjsf/core @rjsf/utils @rjsf/validator-ajv8
yarn add @rjsf/mui
import Form from '@rjsf/mui';
or
import { withTheme } from '@rjsf/core';
import { Theme } from '@rjsf/mui';
// Make modifications to the theme with your own fields and widgets
const Form = withTheme(Theme);
You can pass MUI-specific props (like sx, rjsfSlotProps, variant, etc.) directly to any MUI component rendered by a Template or Widget via ui:options in the uiSchema.
"myField": {
"ui:options": {
"mui": {
"variant": "filled",
"sx": {
"backgroundColor": "background.paper"
},
"rjsfSlotProps": {
"input": {
"endAdornment": "kg"
}
}
}
}
}
For more details on available properties and rjsfSlotProps targets, see the Material UI Customization Documentation.
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
<!-- MARKDOWN LINKS & IMAGES --> <!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->