Skip to content

Icons - AvIcon ​

✨ Introduction ​

The AvIcon component places an span (with the base64 icon as a mask image) in a square div of configurable size. It is a Vue.js component for displaying icons with a wide range of customization options, including animations, colors, and sizes. It's designed to be flexible and performant, with support for various display options, flip options, and accessible titles.

WARNING

Icon names must be those from Iconify.

🏗️ Structure ​

The icon is composed of a square div of configurable size containing a span with a mask image for the icon.

🏷️ Props ​

NameTypeDefaultMandatoryDescription
sizenumber1The size in rem of the icon.
namestring✅The name of the icon to display.
animation'spin' | 'wrench' | 'pulse' | 'spin-pulse' | 'flash' | 'float' | 'ring'undefinedAnimation type applied to the icon.
speed'fast' | 'slow'undefinedAnimation speed, if defined.
flip'horizontal' | 'vertical' | 'both'undefinedFlips the icon horizontally, vertically, or both.
titlenumberundefinedIcon title used for accessibility and tooltips.
colorstring'currentColor'Main color of the icon.
ssrboolean1Enables server-side rendering.

🔊 Events ​

None.

🎨 Slots ​

None.

🚀 Storybook demos ​

You can find examples of use and demo of the component on its dedicated Storybook page.

💡 Examples of use ​

vue
<template>
  <AvIcon
    name="mdi:warning-outline"
    color="var(--icon)"
    :size="2"
  />
</template>