0

I have sharepoint 2016, and i am trying to load the property panel of spfx webpart, however it's loaded without fabric icons. For example the Back and Next buttons look like this:

enter image description here

Is there a way to force UI fabric to load for the webpart or do I need to do it as an external link? I already have these folders in my project:

enter image description here

thanks for any help!

1

Dan,

Office UI Fabric quietly changed how it loads icons a while ago.

By default, the Fabric icons are not added to your bundle, in order to save bytes for scenarios where you don't care about icons, or you only care about a subset.

To make them available, you may initialize by adding the following to your code before you need an icon:

import { initializeIcons } from 'office-ui-fabric-react/lib/Icons';

initializeIcons();

If you want to find out more, check out the Using Icons article on the GitHub repo.

I hope this helps?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.