-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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-next] Add documentation on how to provide a custom theme for the Material You components #37601
Comments
It doesn't look like this bug report has enough info for one of us to reproduce it. Please provide a CodeSandbox (https://mui.com/r/issue-template), a link to a repository on GitHub, or provide a proper minimal code example that reproduces the problem. |
hey @ZeeshanTamboli updated the desc with a CodeSandbox link thanks |
Thank you for the CodeSandbox! You need to provide a theme to the ThemeProvider. The default theme can be obtained from the There is currently missing documentation on this. To address that, we can include the documentation on providing a theme for Material You components in the |
Thanks for reporting this issue, I'll look into adding the proper documentation |
@ZeeshanTamboli but how to use custom theme colours for Buttons?
|
@miklepositive I haven't verified it, but Material Next is still in early development. You could create a new issue with a reproduction to help us track it more effectively. |
@miklepositive, you should be able to modify the Material 3 color tokens; remember that they have a different structure than Material 2: For example, you can modify the primary color via The components follow the Material 3 specs, so if you modify the tokens specified there it should work. I'm sorry we don't have more documentation on this yet. I will try to get it as soon as possible. |
Duplicates
Latest version
Steps to reproduce 🕹
Link to live example:
https://codesandbox.io/s/pedantic-architecture-yjt5x5?file=/src/App.js
Steps:
Current behavior 😯
Cannot read properties of undefined (reading 'color')
But it works fine without the ThemeProvider.
I want to change the theme of the buttons and get the above error
Expected behavior 🤔
It should work fine as the
@mui/material
button and should also work fine as it does without the ThemeProviderContext 🔦
No response
Your environment 🌎
npx @mui/envinfo
The text was updated successfully, but these errors were encountered: