Skip to content
On this page

Icon

Kunlun Design provides a set of common icons.

Install

To use icons, you need to install the @kl-design/icons icon package:

shell
# Choose a package manager you like

# NPM
$ npm install @kl-design/icons
# Yarn
$ yarn add @kl-design/icons
# Pnpm
$ pnpm install @kl-design/icons

Register all icons

You need to import all the icons from @kl-design/icons and globally register them:

typescript
// main.ts

import * as KlIconCpns from '@kl-design/icons'
import '@kl-design/icons/style.css'

const app = createApp(App)
for (const [key, component] of Object.entries(KlIconCpns)) {
    app.component(key, component)
}

Once this is done, you can use the icon as a use case anywhere in your project.

Basic usage

Customize the color and size of the icon by setting the color and size properties.

<>
<template>
    <div class="kl-icon">
        <KlSystemAdd />
        <KlSystemAdd size="40" color="red" />
    </div>
</template>

Note: The unit of the size property is px. When you specify the size property, it sets the width and height of the icon to the size. If the size attribute is not set, the width and height of the icon default to 1.5em.

Customize icon styles through classes

Set the className property to customize the icon style.

<>
<template>
    <div class="kl-icon">
        <KlSystemAdd />
        <KlSystemAdd className="add-icon" />
    </div>
</template>

<style scoped>
.add-icon {
    height: 40px;
    width: 40px;
    color: red;
}
</style>

Note: The 'size' and 'color' attributes have higher precedence than the 'className' attributes.

Icon set

Click on the icon and copy and paste with one click.

Logo
Alipay
Android
Angularjs
Apple
Baidu
Bilibili
Chrome
Dingding
Dropbox
Edge
Firefox
Github
Gitlab
Ie
Qq
Reactjs
StackOverflow
Twitter
Vuejs
Weibo
Windows
Youtube
Arrow
Bottom
CircleBottom
CircleLeft
CircleRight
CircleTop
DoubleLeft
DoubleRight
GoBack
Grow
Left
LineLeft
LineRight
OutlineHorizontal
OutlineVertical
Rank
Right
ScreenFull
ScreenMini
Shrink
Top
Document
ArticleFill
ArticleLine
BillFill
BillLine
BookFill
BookLine
FileAddFill
FileAddLine
FileCodeFill
FileCodeLine
FileCopyFill
FileCopyLine
FileFill
FileLine
FileListFill
FileListLine
FileListReelFill
FileListReelLine
FilePaperFill
FilePaperLine
FileUserFill
FileUserLine
FileZipFill
FileZipLine
FolderAddFill
FolderAddLine
FolderFill
FolderLine
NumbersFill
NumbersLine
System
Add
Admin
Calendar
Delete
Edit
Exit
EyeClose
EyeOpen
Folder
GoBack
Heart
Hint
Home
List
Load
Lock
Login
Message
More
PullDown
Refresh
Search
Setting
Start
Success
Upload
Workbench
Media
CameraFill
CameraLine
DiscFill
DiscLine
ImageFill
ImageLine
MicFill
MicLine
MicOffFill
MicOffLine
MovieFill
MovieLine
Pause
PlayListFill
PlayListLine
Play
RepeatOne
Repeat
Shuffle
SkipBackFill
SkipBackLine
SkipForwardFill
SkipForwardLine
VideoFill
VideoLine
VidiconFill
VidiconLine
VolumeMuteFill
VolumeMuteLine
VolumeUpFill
VolumeUpLine
Sport
Badminton
BaseballBat
Basketball
Football
Scoreboard
Sneaker
Spinning
Stockings
SwimRing
TennisRacket
Tennis
Volleyball
WeighingScale
Whistle
Food
Bag
Beer
Cake
Coffee
Crab
Drinks
Drumsticks
Fish
Frenchfries
Hamburger
MilkTea
Noodle
Pizza
Popsicle
Pot
Ration
Shrimp
Weather
ClearOcDt
ClearOcNgRain
ClearOcNg
DaytimeFill
DaytimeLine
Fog
Gale
Hailstone
HeavyRain
LightRain
NightFill
NightLine
Overcast
Sleet
Snowflake
Snowstorm
Thundershower
Traffic
Anchor
EBike
GasStation
MapPin
Navigation
PinDistance
Pushpin
Railway
Riding
Rocket
Run
Ship
Subway
Taxi
TrafficLight
Truck
Other
AlertFill
AlertLine
CorrectCircleFill
CorrectCircleLine
Correct
ErrorCircle
Error
EyeCloseFill
EyeCloseLine
EyeOpenFill
EyeOpenLine
Link
Loading
MessageFill
MessageLine
UploadFill
WarningFill
WarningLine

API

Attributes

namedescriptiontypeDefault valuerequired
colorIcon component colorstringno
sizeIcon component sizenumber/stringno
classNameclass of the icon componentstringno

Source code

Released under the MIT License.