[IconButton] : iconHoverColor
See original GitHub issueProblem Description
I am using IconButton
with a nested SVG Icon, Settings
. When I set hoverColor
on the SVG icon itself, the effect I desired (a highlighted-on-hover cog) works up until being clicked.
I am trying to use iconStyles
on the IconButton
and change iconHoverColor
but cannot seem to emulate this effect. Any feedback is appreciated. Ideally, I want to do something like this so that the SVG icon will keep the color when being highlighted:
<IconButton tooltip="Font Icon" iconStyle={{iconHoverColor: '#55ff55'}} style={styles.icon}>
<Settings style={styles.settings} color={'white'} />
</IconButton>
Versions
- Material-UI: 0.15.0-alpha.2
- React: 15.0.1
- Browser: Chrome 49.0.2623.110
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Hover effect on IconButton in Material-UI
This is an iconButton from Material-UI that I am using. As you can see there is a slight grey border around the icon...
Read more >The Complete Guide to MUI IconButton onClick and Hover
The Material-UI IconButton creates a clickable icon with all the props and behavior of a MUI Button. In this post we will learn...
Read more >hoverColor property - IconButton class - material library
The color for the button when a pointer is hovering over it. If ThemeData.useMaterial3 is set to true, this hoverColor will be mapped...
Read more >IconButton hover focus
IconButton hover focus ... https://github.com/mui-org/material-ui/blob/master/docs/src/pages/components/buttons/IconButtons.js ... @material-ui/icons.
Read more >[IconButton] : iconHoverColor · Issue #3916 · mui/material-ui
I am using IconButton with a nested SVG Icon, Settings . When I set hoverColor on the SVG icon itself, the effect I...
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 Free
Top 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
I recently ran into this issue and solved it with the following implementation.
@kingscott : There is not property called iconHoverColor in css. And i don’t think you can specify :hover property like in css. However what you can do here is use the onMouseEnter and onMouseLeave props of iconButton and try and achieve what you want to.
Check this out:
This certainly works for me.
hope this helps!