Skip to content

Icon

Icons are used to visually represent actions and information. Click on any icon to copy its name.

Icon Usage

Use the name property to specify the icon. Click on any icon card to copy the code.

Import

Icon component supports on-demand import:

vue
<script setup>
  import { UIcon } from 'ume-ui';
  import 'ume-ui/icon/index.css';
</script>

<template>
  <u-icon name="search" />
</template>

Basic Usage

vue
<template>
  <u-icon name="search" size="20"></u-icon>
  <u-icon name="favorfill" size="20" color="#e6a23c"></u-icon>
  <u-icon name="roundclosefill" size="20" color="#f56c6c"></u-icon>
  <u-icon name="roundcheckfill" size="20" color="#67c23a"></u-icon>
</template>

Custom Size

Use the size property to set icon size.

vue
<template>
  <u-icon name="favor" size="16"></u-icon>
  <u-icon name="favor" size="24"></u-icon>
  <u-icon name="favor" size="32"></u-icon>
  <u-icon name="favor" size="48"></u-icon>
</template>

Custom Color

Use the color property to set icon color.

vue
<template>
  <u-icon name="favorfill" size="24" color="#409eff"></u-icon>
  <u-icon name="favorfill" size="24" color="#67c23a"></u-icon>
  <u-icon name="favorfill" size="24" color="#e6a23c"></u-icon>
  <u-icon name="favorfill" size="24" color="#f56c6c"></u-icon>
  <u-icon name="favorfill" size="24" color="#909399"></u-icon>
</template>

Click on any icon to copy <u-icon name="..." /> code.

API

PropertyDescriptionTypeDefault
nameIcon namestring''
sizeIcon size (e.g., '20px', 24)string | number''
colorIcon colorstring''