Skip to content
Advertisement

How to change Fluent UI icon color on mouse hover?

i am using Fluent UI in my project.

I initializing my button with this simple code in javascript:

JavaScript

and i can override default color to asked one. enter image description here

My question is, how to set mouse hover color over button? enter image description here

https://learn.microsoft.com/en-us/javascript/api/react/iiconprops?view=office-ui-fabric-react-latest#@fluentui-react-iiconprops-styles-member

Advertisement

Answer

For IconButton, DefaultButton and PrimaryButton you have property root for default button style, rootHovered, rootChecked etc. for different states.

JavaScript

Codepen working example

Button styles also might help.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement