Renders a font icon in the desired font library
在所需的字体库中呈现字体图标

Default

To use the icon, use the vs-icon component. For the main parameter, pass the icon property that determines which icon to show. By default, the icon uses the Google Material Icons font library. Another library can be selected by passing the css class/classes for the library to icon-pack. Only the Material Icons library is bundled with the framework. Other libraries will have to be included implicitly.
要使用图标,请使用vs-icon组件。对于main参数,传递icon确定显示哪个图标的属性。默认情况下,该图标使用Google Material Icons字体库。可以通过将库的css类传递给来选择另一个库icon-pack。该框架仅捆绑了Material Icons库。其他库将必须隐式包含。

TIP Vuesax uses the > Google Material Icons font library. For a list of all available icons, visit the official > Material Icons page .Vuesax使用> Google Material Icons字体库。有关所有可用图标的列表,请访问官方> 材料图标页面 FontAwesome and other fonts libraries are supported. Simply use the > icon-pack with > fa or > fas. You still need to include the Font Awesome icons in your project. 支持FontAwesome和其他字体库。只需使用> icon-packwith > fa或> fas。您仍然需要在项目中包括“真棒字体”图标。

Color

You can change the color of the icons as well, using color names, RGB, HEX, or Vuesax variables.

Size

You can change the size of the Avatar with the property size the allowed values are:

  • large
  • small
  • Custom measure

    TIP In the example the last icon has the custom size of > 75px the added value will be the icon’s > height and > width and > text-size

    Background Color

    You can change the background color with the property bg.

Rounded

To make the icon round, pass the property round.

TIP You can also pass this as > round=true. The two are equivalent.

WARNING Vuexy Admin uses feather icons(font-icon & SVG) instead of material icons. Check > SVG Icons . Check > Font Icons .

API

Name Type Parameters Description default
icon String Determines the icon
icon-pack String Determines the icon pack. If not set, icon will default to Material Icons. ex. FA4 uses fa or fas, FA5 uses fas, far, or fal. material-icons
color String Vuesax color presets, RGB, HEX, html color presets Determines the icon pack. If not set, icon will default to Material Icons. ex. FA4 uses fa or fas, FA5 uses fas, far, or fal. black
bg String Vuesax color presets, RGB, HEX, html color presets Sets the background color
size String small, medium, large, custom measure(75px, 3rem, 2em) Sets the size of the icon 1rem
round Boolean Makes the background round. false
click Function a function to be executed on click of the icon