rjsf-team / react-jsonschema-form

A React component for building Web forms from JSON Schema.
https://rjsf-team.github.io/react-jsonschema-form/
Apache License 2.0
14.39k stars 2.2k forks source link

Add a package for Mantine UI #4289

Open amir78729 opened 3 months ago

amir78729 commented 3 months ago

Prerequisites

What theme are you using?

other

Is your feature request related to a problem? Please describe.

Currently, react-jsonschema-form provides support for several UI frameworks like Material-UI, Ant Design, and Bootstrap. However, it lacks support for Mantine UI, a popular, modern React component library that offers a range of customizable components and hooks. Developers who use Mantine UI in their projects do not have an easy way to leverage react-jsonschema-form to render forms styled with Mantine components. This results in inconsistent UI experiences and the additional overhead of manually integrating Mantine components with react-jsonschema-form.

Describe the solution you'd like

I would like to see react-jsonschema-form support Mantine UI out of the box. This would involve creating a new theme package or core library extension that utilizes Mantine's form components such as TextInput, Select, Checkbox, Switch, etc., and ties them into the form generation logic of react-jsonschema-form. Ideally, this solution would:

Describe alternatives you've considered

  1. Custom Implementation: Manually wrapping Mantine components with custom widgets to use them within react-jsonschema-form. This approach is possible but requires significant effort, which can be repetitive across different projects. Moreover, it lacks the maintenance and updates provided by a core or officially supported package.

  2. Using Another Supported UI Library: Switching to another UI library that react-jsonschema-form already supports (e.g., Material-UI or Ant Design). However, this is not ideal for developers committed to using Mantine due to its design philosophy, component availability, or theming capabilities.

  3. Community-Maintained Package: Creating a community-maintained package that integrates Mantine UI with react-jsonschema-form. While this could work, it would lack the benefits of official support, and maintenance could become an issue over time.

Adding support for Mantine UI directly in react-jsonschema-form would provide a better developer experience, reduce duplication of effort, and foster a more inclusive ecosystem that supports a wider range of popular UI libraries.

nickgros commented 2 months ago

We rely on our community to add and help support the RJSF themes, so we'd be happy to review and accept a PR that adds Mantine. I know some folks have added some input on this PR: https://github.com/rjsf-team/react-jsonschema-form/pull/3622

@amir78729 if you're interested in supporting/reviving that work, you may want to reach out to the individuals who have contributed to that issue. Since it seems like development on that PR has stalled, you're welcome to create a new PR to continue that effort!