Repository navigation
FluentUI Icons on a non-react website #37155
|
Hi, I am the engineering manager for support.microsoft.com. The SMC website is a server side rendered ASP.net core website. We don't render pages using React. Our designer would like to be able to use the FluentUI iconography on a non-Fluent website. Is this possible? Could someone share some insight on how to do this? |
Replies: 1 comment 1 reply
|
Yes. The icons are published as plain SVG files, so you don't need React or Fluent UI components at all. 1. Get the SVGs. The npm install @fluentui/svg-iconsIf you'd rather skip npm, each file is also reachable through a CDN. Pin a version: 2. Use them in ASP.NET Core. Copy just the icons your designer needs into
3. Browsing icons. The source repo microsoft/fluentui-system-icons has the full lists ( Because the icons are standard SVG, they also work in any non-Fluent design: just match the size (16/20/24/28…) and the regular or filled style to the context. |
Yes. The icons are published as plain SVG files, so you don't need React or Fluent UI components at all.
1. Get the SVGs. The
@fluentui/svg-iconspackage (MIT) contains every icon as a standalone.svgfile, named{name}_{size}_{style}.svg, for exampleicons/question_circle_24_regular.svgoricons/chat_20_filled.svg.If you'd rather skip npm, each file is also reachable through a CDN. Pin a version:
https://cdn.jsdelivr.net/npm/@fluentui/svg-icons@1.1.345/icons/add_24_regular.svg2. Use them in ASP.NET Core. Copy just the icons your designer needs into
wwwroot/icons/, then either:<img>: the simplest option, but you can't recolor the icon with CSS: