-
-
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
theme.transitions is undefined in MUI6 #43877
Comments
I tried reproducing this, but I wasn't able to, it works as expected: https://codesandbox.io/p/sandbox/compassionate-water-tky4n5?from-embed= Can you please share a CodeSandbox with the reproduction? Are you using Emotion or Pigment CSS? How does your next.js/vite config looks like if you are using Pigment CSS? More context would be great! |
Hello @mnajdova, I managed to reproduce it. It happens when using Pigment CSS (without Emotion). At first I thought it was because I wasn't using ThemeProvider but it is used in the repro and the issue still occurs. Here is the repro sandbox but try to download and run it locally, when running in CodeSandbox it just show the "The above error occurred in the <ForwardRef(Dialog2)> component:" error, but not the error itself. When running locally, you can see it in the DevTools console. |
Since the issue is missing key information and has been inactive for 7 days, it has been automatically closed. If you wish to see the issue reopened, please provide the missing information. |
Here is a working example: https://codesandbox.io/p/devbox/mui-theme-transitions-repro-forked-tqsdgc?file=%2Fvite.config.ts%3A18%2C1 The issue was that you did not specify that the theme is CSS variables based:
Pigment CSS will not working without this :) On this note, we should likely update the docs here: https://mui.com/material-ui/migration/migrating-to-pigment-css/#configuring-the-theme to include this information. Would you like to open a PR for this? :) |
I'd gladly do it in case @rwb196884 is not interested. :) |
Sure, go ahead if you want to do it :) |
This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue. Note We value your feedback @rwb196884! How was your experience with our support team? |
Steps to reproduce
I've got this code that used to put an icon on a button that rotates when clicked.
It works in MUI5 but not in MUI6.
What do I need to do?
Current behavior
No response
Expected behavior
No response
Context
No response
Your environment
npx @mui/envinfo
Search keywords: transitions
The text was updated successfully, but these errors were encountered: