Skip to content

Icon ​

Icon component enhanced based on Element Plus Icon.

Support for Iconify icons.

Icon Usage ​

There are multiple ways to use icons:

You can directly use Tabler Icons from Iconify without any installation. See Basic Usage for examples.

2. Install Icon Sets with UnoCSS ​

Install your preferred Iconify icon collection and use with UnoCSS:

bash
pnpm add -D @iconify-json/mdi

Then use with i- prefix:

vue
<bk-icon icon="i-mdi:home" />

3. Element Plus Icons ​

Install and use Element Plus icon collection:

bash
pnpm add @element-plus/icons-vue
vue
<script setup>
import { Edit } from "@element-plus/icons-vue"
</script>

<template>
  <bk-icon><Edit /></bk-icon>
</template>

Basic Usage ​

Display icons using Iconify icon names.

Use icon prop with Iconify icon name (e.g., 'tabler:home'). The component automatically adds the 'i-' prefix if not present.

Icon API ​

Icon Attributes ​

NameDescriptionTypeDefault
iconIconify icon namestring—
Element Plus Icon Attributes
NameDescriptionTypeDefault
colorSVG tag's fill attributestringinherit from color
sizeSVG icon size, size x sizenumber / stringinherit from font size

Icon Slots ​

NameDescription
default extendedcustomize default content

Released under the MIT License.