This package provides the Fluent UI System Icons as optimized plain svg assets.
npm install @fluentui/svg-icons
The library offers icons in SVG format; the icon names are structured as:
[name]_[size]_[style]
name
- Name of the icon from assets that is all lowercased and underscore separated.size
- Size of the icon that is one of 16/20/24/28/48. Note that some icons do not have all sizes available yet. Our designers are working to add missing ones to complete the collection.style
- Style of the icon that is one of regular
, filled
. See the section below for details.The library offers icons in two styles, regular
and filled
regular | filled |
---|---|
![]() |
![]() |
A common use case is to use svg-inline-loader in your Webpack config.
npm install svg-inline-loader --save-dev
webpack.js:
module.exports = {
resolve: {
extensions: [".svg"],
},
module: {
rules: [
{
test: /\.svg$/,
use: [
{
loader: "svg-inline-loader",
options: {
removeSVGTagAttrs: false,
},
},
],
}
]
}
};
Then reference an icon on a page.
Using template literal:
import AddIcon from "@fluentui/svg-icons/icons/add_20_filled.svg";
`<div>${AddIcon}</div>`
Or require
:
var icon = require('@fluentui/svg-icons/icons/add_20_filled.svg');
Вы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Опубликовать ( 0 )