mui / material-ui

Material UI: Comprehensive React component library that implements Google's Material Design. Free forever.
https://mui.com/material-ui/
MIT License
93.89k stars 32.26k forks source link

[joy-ui][FormControl] FormControlContext nor a useFormControl hook are not exposed #40620

Open diogofscmariano opened 9 months ago

diogofscmariano commented 9 months ago

Duplicates

Summary

Joy FormControlContext is not exposed in the library and it does not allow custom components to leverage the FormControl chain, agnostic to the component is has internally.

@mui/material, @mui/base and @mui/material-next expose it, either via useFormControl or useFormControlContext, but @mui/joy does not.

Motivation

This can be a good feature to make all libraries consistent in the same feature set for the FormControl component. Right now, in joy is it not possible to leverage the FormControl component with a custom Form element.

Search keywords:

ZeeshanTamboli commented 9 months ago

I suggest having one useFormControl or useFormControlContext across all products (Base UI, Joy UI, and Material UI). Which means Base UI's form control should be used in Joy UI and Material UI.

siriwatknp commented 8 months ago

Thanks for opening the issue, we will come back to this once we finish with Material UI v6