Skip to content

Icon Component

Icon Component

Icons are fundamental elements in interface design, used to represent common operations, navigation hints, status indicators, etc., making the interface more intuitive. Tune UI provides a set of commonly used icons, supporting custom size, color, and type.

Basic Usage

Tune UI has a rich set of built-in icons. Specify the icon name through the icon attribute.

search
home
setting
user
message
document
calendar
cloud
image
lock
delete-to
upload
download
edit
info
success-to
close
Show CodeArrow
CopyGitHub

Icon Size

You can customize the icon size through the size attribute, with the unit being px.

16px
24px
32px
48px
Show CodeArrow
CopyGitHub

Icon Color

There are two ways to customize icon color:

  1. Use the color attribute to specify a custom color value
  2. Use the type attribute to use theme colors

Custom Colors

#3b82f6
#10b981
#f59e0b
#ef4444

Theme Colors

primary
success
warning
danger
info
Show CodeArrow
CopyGitHub

Custom Icons

In addition to built-in icons, you can also introduce custom icons through the customIcon attribute.

Use custom icons by setting the customIcon property
Custom icon example
<t-icon customIcon="custom-icon" />
Note: To use custom icons, you need to import the corresponding icon font files in your project first
Show CodeArrow
CopyGitHub

Icon Categories

Below are all available icons, grouped by different categories. Click on an icon to copy its name.

Action Icons

add
add-to
delete
delete-to
edit
edit-to
save
upload
upload-to
download
search
filter
close
close-to
minus
minus-to
collect
link
link-to
link-break
share
print
copy-multiple
screen
amplify
reduce

Navigation Icons

left
right
up
downward
left-arrow
caret-left
caret-right
caret-up
caret-down
double-left
double-right
left-double
right-double
menu
menu-to
navigation
previous
next
home
return
position
map
horizontal-more
vertical-more
left-circle
right-circle
rotate-left
rotate-right

File Icons

file
file-folder
folder
folder-add
file-add
file-copy
file-remove
file-text
file-image
file-excel
file-pdf
file-word
file-ppt1
file-jpg
file-gif
file-markdown
file-done
file-exclamation
file-protect
file-unknown
document
Filing
remove-file

Media Icons

image
camera
volume
play-circle
pause-circle
pause
record
qrcode

Communication Icons

message
mail
phone
send
forward
forward-to
cloud
cloud-upload
cloud-download
wifi
network

Status Icons

success
success-to
info
information
information-to
error-to
warning-to
help
lock
unlock
secure
secure-to
filter-error
loading

Social Media Icons

github
google
qq
wechat
weibo
taobao
alipay
ie
apple

Weather Icons

qingtian
duoyunzhuanqing
qingzhuanduoyun
yintian
xiaoyu
zhongyu
dayu
baoyu
leizhenyu
leiyu
zhenyu
youwu
xiaoxue
zhongxue
daxue
baoxue
yujiaxue
yujiabingbao
bingbao
feng
shachenbao
richu
rila
yejianduoyun
yejianyouyu
yejianyouxue

User Icons

user
add-user
add-multiple-user
multiple-user
user-remove
male
woman
member
fingerprint

Chart & Data Icons

chart
chart-pie
data-up
data-glide
count
sort-up
exchange
fluctuate
grade
trendc-hart

Settings & Tools Icons

setting
seting-to
type
adjust
repair
lightn
scan
poweroff
shutdown
track
code
leak

Other Icons

love
like
dislike
assets
badge
annex
calendar
label
nail
floor
city
rocket
woman
branch
afferent
outgoing
read
illustrate
vertical-widen
vertical-reduce
horizontal-widen
menu-contract
menu-expand
magnifier-amplify
magnifier-reduce
inspiration
product
dollar-circle
rate
rate-null
rate-half
Show CodeArrow
CopyGitHub

Icon API

Attributes

AttributeDescriptionTypeAccepted ValuesDefault
iconIcon namestring-success-to
sizeIcon size (px)number-16
colorIcon colorstring--
typeIcon theme typestringdefault / primary / success / info / warning / danger-
customIconCustom icon namestring--

Slots

Slot NameDescription
defaultContent inside icon

Style Variables

The icon component uses the following style variables, which can be customized through SCSS variables:

Variable NameDescription
$theme-color-primaryTheme color - Primary
$theme-color-successTheme color - Success
$theme-color-infoTheme color - Info
$theme-color-warningTheme color - Warning
$theme-color-dangerTheme color - Danger

Released under the MIT License