MuiTouchRipple style overrides aren't applying
See original GitHub issueDuplicates
- I have searched the existing issues
Latest version
- I have tested the latest version
Current behavior 😯
With the following defined inside theme: `{ components: {
MuiTouchRipple: {
styleOverrides: {
childLeaving: {
backgroundColor: '#ff9900',
color: '#00ff00'
},
ripple: {
backgroundColor: '#ff9900',
color: '#00ff00'
},
ripplePulsate: {
backgroundColor: '#ff9900',
color: '#00ff00'
},
root: {
backgroundColor: '#ff9900',
color: '#00ff00'
},
rippleVisible: {
backgroundColor: '#ff9900',
color: '#00ff00'
},
child: {
backgroundColor: '#ff9900',
color: '#00ff00'
},
childPulsate: {
backgroundColor: '#ff9900',
color: '#00ff00'
}
}
}
}`
I’m not seeing the ripple colour on buttons change and I odn’t see where the colors specifieid above apply to Muitouchripple on any level
Expected behavior 🤔
Colours defined in MuiTouchRipple override should apply to buttons.
Steps to reproduce 🕹
Steps:
- Use style override as provided
- Attempt to add a button and ckick it
or
View sandbox: https://codesandbox.io/s/material-ui-v5-theme-sandbox-forked-u228v?file=/src/Demo.tsx:0-1773
Context 🔦
No response
Your environment 🌎
`npx @mui/envinfo`
Don't forget to mention which browser you used.
Output from `npx @mui/envinfo` goes here.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
MuiTouchRipple style overrides aren't applying #30501
Colours defined in MuiTouchRipple override should apply to buttons. Steps to reproduce. Steps: Use style override as provided; Attempt to add ...
Read more >How to override MuiTouchRipple-root css - reactjs
To override MuiTouchRipple, you can use this approach. TouchRippleProps={{ classes: { child: 'my-class' }}}. Hope this will help.
Read more >TouchRipple API
Styles applied to the internal Ripple components childPulsate class. Have a look at overriding with classes section and the implementation of the component...
Read more >Customization of MUI Components and Theme - YouTube
How to Customize Material UI Components and ThemeIn this video, we have discussed the following points:- How to customize/ override material ...
Read more >Global Styling with Material-UI Theme Overrides and Props
In customizing a component, we can make a "brand" component - meaning a Material-UI component with a thin component wrapper, applying classes, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I suggest you use
&:active
+color
on the Button. The TouchRipple’s background-color inheritscolor
from the Button. Check this out: https://codesandbox.io/s/material-ui-v5-theme-sandbox-forked-uk0ns?file=/src/Demo.tsxCreated #31372.