Skip to content

Icon 图标

Ryxon 常用图标集合

安装

使用包管理器

shell
# NPM
$ npm install @ryxon/icons
# Yarn
$ yarn add @ryxon/icons
# pnpm
$ pnpm install @ryxon/icons

注册所有图标(不推荐)

需要从 @ryxon/icons 中导入所有图标并进行全局注册。

ts
// main.ts

// 如果您正在使用CDN引入,请删除下面一行。
import * as RyxonIconsVue from '@ryxon/icons'

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

浏览器直接引入

直接通过浏览器的 HTML 标签导入 Ryxon,然后就可以使用全局变量 RyxonIconsVue 了。

根据不同的 CDN 提供商有不同的引入方式, 根据不同的 CDN 提供商有不同的引入方式, 我们在这里以 unpkgjsDelivr 举例。 你也可以使用其它的 CDN 供应商

unpkg

html
<script src="//unpkg.com/@ryxon/icons"></script>

jsDelivr

html
<script src="//cdn.jsdelivr.net/npm/@ryxon/icons"></script>

TIP

我们建议使用 CDN 引入 Ryxon 的用户在链接地址上锁定版本,以免将来 Ryxon 升级时受到非兼容性更新的影响。 锁定版本的方法请查看 unpkg.com

自动导入

使用 unplugin-iconsunplugin-auto-import 从 iconify 中自动导入任何图标集。

ts
// vite.config.ts

// 待补充

使用

WARNING

因为 HTML 标准已经定义了一个名为 menu 的标签, 如果您注册的 menu 无法正常工作,您需要使用别名来渲染图标。

vue
<!-- 使用 r-icon 为 SVG 图标提供属性 -->
<template>
  <div>
    <r-icon :size="size" :color="color">
      <Edit />
    </r-icon>
    <!-- 或者独立使用它,不从父级获取属性 -->
    <Edit />
  </div>
</template>

结合 r-icon 使用

r-icon 为 raw SVG 图标提供额外的属性, 提供的详细属性。

直接使用 SVG 图标

结合 r-badge 使用

设置 dot 属性后,会在图标右上角展示一个小红点;设置 badge 属性后,会在图标右上角展示相应的徽标。

图标集合

复制SVG内容
复制图标代码
System
  • Plus
  • Minus
  • CirclePlus
  • Search
  • Female
  • Male
  • House
  • FullScreen
  • Loading
  • Link
  • Service
  • Pointer
  • Star
  • Notification
  • Connection
  • ChatDotRound
  • Setting
  • Clock
  • Position
  • Discount
  • Odometer
  • ChatSquare
  • ChatRound
  • ChatLineRound
  • ChatLineSquare
  • ChatDotSquare
  • View
  • Hide
  • Unlock
  • Lock
  • RefreshRight
  • RefreshLeft
  • Refresh
  • Bell
  • Sound
  • MuteNotification
  • User
  • Check
  • CircleCheck
  • Warning
  • CircleClose
  • Close
  • PieChart
  • More
  • Filter
  • Switch
  • Select
  • SemiSelect
  • CloseBold
  • EditPen
  • Edit
  • Message
  • TurnOff
  • Finished
  • Delete
  • Crop
  • SwitchButton
  • Operation
  • Open
  • Remove
  • ZoomOut
  • ZoomIn
  • InfoFilled
  • CircleCheckFilled
  • SuccessFilled
  • WarningFilled
  • CircleCloseFilled
  • QuestionFilled
  • WarnTriangleFilled
  • UserFilled
  • MoreFilled
  • Tools
  • HomeFilled
  • Menu
  • UploadFilled
  • Avatar
  • HelpFilled
  • Share
  • StarFilled
  • Comment
  • Histogram
  • Grid
  • Promotion
  • DeleteFilled
  • RemoveFilled
  • CirclePlusFilled
Arrow
  • ArrowLeft
  • ArrowUp
  • ArrowRight
  • ArrowDown
  • ArrowLeftBold
  • ArrowUpBold
  • ArrowRightBold
  • ArrowDownBold
  • DArrowRight
  • DArrowLeft
  • Download
  • Upload
  • Top
  • Bottom
  • Back
  • Right
  • TopRight
  • TopLeft
  • BottomRight
  • BottomLeft
  • Sort
  • SortUp
  • SortDown
  • Rank
  • CaretLeft
  • CaretTop
  • CaretRight
  • CaretBottom
  • DCaret
  • Expand
  • Fold
Document
  • DocumentAdd
  • Document
  • Notebook
  • Tickets
  • Memo
  • Collection
  • Postcard
  • ScaleToOriginal
  • SetUp
  • DocumentDelete
  • DocumentChecked
  • DataBoard
  • DataAnalysis
  • CopyDocument
  • FolderChecked
  • Files
  • Folder
  • FolderDelete
  • FolderRemove
  • FolderOpened
  • DocumentCopy
  • DocumentRemove
  • FolderAdd
  • DataLine
  • Ticket
  • TrendCharts
  • List
Media
  • Microphone
  • Mute
  • Mic
  • VideoPause
  • VideoCamera
  • VideoPlay
  • Headset
  • Monitor
  • Camera
  • Picture
  • PictureRounded
  • Iphone
  • Cellphone
  • VideoCameraFilled
  • PhotoFilled
  • PhotoFailFilled
  • Platform
  • CameraFilled
  • BellFilled
Traffic
  • Location
  • LocationInformation
  • DeleteLocation
  • OfficeBuilding
  • School
  • AddLocation
  • MapLocation
  • Place
  • CompanyFilled
  • LocationFilled
Items
  • Calendar
  • Present
  • Help
  • Coin
  • Goods
  • Sell
  • SoldOut
  • Key
  • ShoppingCart
  • ShoppingCartFull
  • ShoppingTrolley
  • Phone
  • Handbag
  • ShoppingBag
  • CollectionTag
  • PriceTag
  • PhoneFilled
  • EmailFilled
  • GoodsFilled
  • Flag
  • Stamp
Aeon
  • Aeon
  • AeonArrowDown
  • AeonAttention
  • AeonBell
  • AeonClose
  • AeonCollection
  • AeonComputer
  • AeonCropper
  • AeonData
  • AeonDataLine
  • AeonDataAnalysis
  • AeonDelete
  • AeonDownload
  • AeonDownloadSquare
  • AeonEdit
  • AeonEmoji
  • AeonFitUp
  • AeonFolder
  • AeonFolderAdd
  • AeonGrid
  • AeonLikes
  • AeonLine
  • AeonList
  • AeonMore
  • AeonOrder
  • AeonPoint
  • AeonStart
  • AeonPause
  • AeonPeople
  • AeonPhoneCircle
  • AeonPhone
  • AeonPicture
  • AeonPlus
  • AeonPromotion
  • AeonRankBold
  • AeonFullScreen
  • AeonRestoreScreen
  • AeonReward
  • AeonRotate
  • AeonSearch
  • AeonService
  • AeonSetting
  • AeonShare
  • AeonShareFill
  • AeonShoppingCart
  • AeonSortDown
  • AeonSortFilter
  • AeonSort
  • AeonStack
  • AeonStarOff
  • AeonTools
  • AeonTopic
  • AeonUpgrade
  • AeonUpload
  • AeonUploading
  • AeonValidCode
  • AeonVideoMute
  • AeonVideoPause
  • AeonVideoSound
  • AeonViewFilled
  • AeonViewHideFilled
  • AeonView
  • AeonZoomIn
  • AeonZoomOut
  • AeonArrowDownBold
  • AeonArrowUpBold
  • AeonHandshake
  • AeonBellFilled
  • AeonChatDotSquare
  • AeonCaretRight
  • AeonCheckBold
  • AeonCloseBold
  • AeonDeleteFilled
  • AeonSuccessFilled
  • AeonCloseFilled
  • AeonCoinFilled
  • AeonEmail
  • AeonGridFilled
  • AeonGridCheckedFilled
  • AeonEditFilled
  • AeonEditOrderFilled
  • AeonGoodsFilled
  • AeonGrade
  • AeonHeartFilled
  • AeonHomeFilled
  • AeonHome
  • AeonLikesFilled
  • AeonLocation
  • AeonMoreFilled
  • AeonOrderFilled
  • AeonPeopleFilled
  • AeonPresentFilled
  • AeonPlusSquare
  • AeonShop
  • AeonShoppingCartFilled
  • AeonStarOn
  • AeonToolsFilled
  • AeonUserDesign
  • AeonWarnTriangleFilled
  • AeonCirclePlus
  • AeonRemove
  • AeonWarning
  • AeonCircleCalendar
  • AeonCircleDataLine
  • AeonCircleNotebook
  • AeonCircleOrder
  • AeonCircleSales
  • AeonCircleView
  • AeonComplexChat
  • AeonComplexCoin
  • AeonComplexCrown
  • AeonComplexEdit
  • AeonComplexUpload
Other
  • ChromeFilled
  • Shop

API

Attributes

属性名说明类型默认值
name图片链接string-
dot是否显示图标右上角小红点booleanfalse
badge图标右上角徽标的内容number / string-
badge-props自定义徽标的属性,传入的对象会被透传给 Badge 组件的 propsBadgeProps-
colorsvg 的 fill 颜色stringinherit
sizeSVG 图标的大小,如 20px 2em,默认单位为 pxnumber / stringinherit
class-prefix类名前缀,用于使用自定义图标stringr-icon
tag根节点对应的 HTML 标签名stringi

Slots

名称说明
default自定义默认内容

Released under the MIT License.