Blog, Development

Applying UCI styling to a FluentUI Dropdown Component

Here is the next post of the series in regards to styling of FluentUI controls to look native in the UCI interface. Today my post is dedicated to Dropdown control that is now called “Choice” in Dataverse.

Let’s compare uncustomized and UCI controls side-by-side in both enabled and disabled states:

As you might see there are a lot of differences in the styling of controls. Let’s add the following styling to the Dropdown component and use it in the component’s code:

Now the controls start to look more similar. Now, let’s work on the “placeholder”. In this case, just assigning “—” to placeholder property won’t work because during the mouse hover UCI control changes it to “–Select–” on the fly:

In order to solve this challenge I used state and I changed it on MouseEnter and MouseLeave events:

The source code of the control can be found in this repository –

Cover Photo by Fotis Fotopoulos on Unsplash

1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.