-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[material-ui][Filled Input] Undocumented non-themeable values #40962
Comments
Thanks for the report @chbiel! This looks like something we should improve for v7 when we update our designs. Would an API like Joy UI's CSS vars components tokens help? There's actually very brief documentation about it here: https://mui.com/material-ui/react-text-field/#customization. If anyone wishes to open a PR to improve that docs section to be more thorough until we fix this properly, that would be very welcome. |
hey @DiegoAndai, thanks for getting back :) I think my point is more in the direction of consistency instead of how to customize. So we are currently trying to create a theme for our company and getting into the details I get more and more confused. One of the examples I mentioned above: I can define a full theme, but the FilledInput seems not to be compliant with all the rest, as the different color shades are defined in the component itself instead of picking configuration from the theme.
What in the end renders the FilledInput from my perspective as not compliant with the theme approach , but instead forces a user to copy over the whole component css definitions and overwrite every color.
Another thing I found is, that (at least in the MenuItem, did not check other places yet) material-ui/packages/mui-material/src/MenuItem/MenuItem.js Lines 84 to 86 in 90f655a
That leads to a greenish background color what does not fit into the whole design at all. So it feels like either the whole Theme configuration is not explained in a way that I understand it or the different theme configurations are not used in a consistent way. I think I should not need to read the underlying source code to understand how to customize a component. And sorry for getting a little bit off-issue-topic... :) |
Thanks @chbiel for the detailed feedback 🤩
This resonates with me, and I think with much of the community. We plan to revamp the theme structure for v7. Specifically, we will likely adopt Material Design 3's token structure, which should help by:
This is still somewhat speculative as we haven't started planning v7 in detail yet. Improving look and feel will be the main topic of that major release, so we'll be looking into the theme structure, and this feedback will be very useful. |
Thanks :) |
We'll be improving this experience as soon as possible |
Steps to reproduce
Link to live example:
material-ui/packages/mui-material/src/FilledInput/FilledInput.js
Lines 45 to 49 in 0b38955
and e.g.
material-ui/packages/mui-material/src/FilledInput/FilledInput.js
Line 52 in 0b38955
Nothing to reproduce.
Current behavior
After searching for hours where the background colors for the FilledInput come from, I finally started to read the code of the
FilledInput
and found that it has a wierd an completely undocumented way on how to theme it (or at least I was not able to find any documentation about it).So maybe the issue is
Make the FilledInput use variables from theme
orMissing documentation about
Expected behavior
Documentation on how to customize
FilledInput
or aFilledInput
that uses default theme valuesFurther question:
Isn't the
palette.action
exactly for this case but not used?Search keywords: FilledInput, background
The text was updated successfully, but these errors were encountered: