Skip to content

Dropdown component - set on hover color #23874

Answered by spmonahan
jbk75 asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @jbk75 ,

You didn't mention if you're using Fluent v8 or v9 so I've got answers for both :)

Fluent v8

You can use the styles prop to provide custom style overrides to Dropdown and other components in Fluent UI v8.

Here's an Codepen example that makes the v8 Dropdown option background hotpink when hovered.

The IDropdownStyles interface under the Implementation section of the Dropdown docs provides more details.

Fluent v9

In Fluent UI v9 you can use makeStyles to supply a className to the Option component.

Here's an Codesandbox example that makes the v9 Dropdpwn Option background hotpink when hovered

Here's a guide on getting started styling v9 components.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by micahgodbolt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants