The expected behavior should be to accept all icons from https://developer.microsoft.com/en-us/fabric#/styles/icons
If the name length is above a certain value, it doesn't work. pls try "WorkforceManagement". The result is NO icon
Enter a long name as
Thanks for your contribution! Sharing is caring.
As SPFx is not using the latest Office UI Fabric version, it could be that some of the icons are not working. If the icon field doesn't show an icon, it means that it is not yet in the current version.
Is there a planned update to make the current SPFx align with the current Office UI Fabric version?
@jonasbjor to expand on @estruyf answer.
SPFx by default includes a subset of UI fabric for various reasons, you can learn more here: https://docs.microsoft.com/en-us/sharepoint/dev/spfx/office-ui-fabric-integration.
The starter kit spfx components is currently based on spfx v 1.4.1, which includes the 1.4.1 version of @microsoft/office-ui-fabric-react-bundle. This in turn utilizes Fabric React v5.21.0. Fabric React is officially up to 6.25.2 (https://www.npmjs.com/package/office-ui-fabric-react).
As SPFx continues to evolve, I am sure it will continue to use newer versions of Fabric React, but there is no public roadmap for this specific aspect.
Elio likely has a better option, but one way to determine available icons is to open the included fabric.css at .\solution\node_modules\office-ui-fabric-react\dist\css\fabric.css, around line 3638. Ugly but works.
With every SPFx release, it could be that the version of Office UI Fabric gets updated, but it will always be behind a bit.
@estruyf Are there plans to upgrade sp-starter-kit to spfx v 1.5.1 yet or would that be something I could do?
@andreasblueher I started this myself last week but after yesterday's confirmation during the PnP Community call, I personally decided to hold off. SPFx 1.6 has an ETA of late July 18, a few weeks away.
https://youtu.be/44Er83s9SW8?t=17m3s
If you would like to update to 1.5.1 and make a PR, I assume it would be well appreciated. I for one am going to wait. I do understand there might be a 1.6.x patch later, and 1.7 has an ETA of Ignite 18. Also 1.6 could slip into August. Evolution happens.
Since SPFx 1.5.1 does not really contain that much new capabilities for the current web parts, there's really no specific reason why to upgrade... so our plan is to wait until 1.6 release which will happen within few weeks and then upgrade also Starter Kit....
As there's nothing we can do for this in the Starter Kit side, closing this as an issue, which won't be fixed here... the real location to fix this would be office UI Fabric in a way that they will not change the icon names.
Most helpful comment
With every SPFx release, it could be that the version of Office UI Fabric gets updated, but it will always be behind a bit.