图标
图标会在文本中插入一个小图形,也可以选择在旁边显示文字。凡是接受icon的地方都可以使用相同的名称,例如卡片、侧边栏文件夹和标签页。
示例
启动 指南 身份验证
<Icon name="rocket">Launch</Icon> <Icon name="book-open">Guides</Icon> <Icon name="key">Authentication</Icon>属性
namestring必填要使用的图形,请从下方的名称中选择。名称的写法比较灵活:不区分大小写,空格和下划线都视为连字符,而且连字符可以省略,因此Book Open、book_open和bookopen都会绘制book-open。名称无效时不会显示任何内容,而不是显示损坏的图形。
childrentext显示在图形旁边的一两个词。若只想显示图形,请将标签留空。
所有名称
activity alert-circle alert-triangle archive arrow-right arrow-up-right award bar-chart battery bell-off bell-ring bell blocks bolt book-marked book-open book bookmark box boxes braces briefcase bug building-2 calendar-days calendar camera check-check check-circle check chevron-down chevron-right clipboard clock cloud code-2 code coffee columns command compass copy cpu credit-card database dollar-sign download edit external-link eye-off eye file-code file-json file-text file filter-x filter fingerprint flag flame folder-open folder-tree folder gauge gift git-branch git-commit git-pull-request github globe graduation-cap grid-3x3 grid hammer hard-drive hash heart help-circle history home hourglass image inbox info key-round key layers layout lightbulb link list loader-circle lock-keyhole lock log-in log-out mail map-pin map maximize megaphone menu message-circle mic minimize minus moon more-horizontal navigation newspaper package-check package panel-left paperclip pause pencil percent phone pin play plug plus power qr-code quote radar refresh repeat rocket rows rss save scan scissors scroll search send server settings-2 settings share shield-alert shield-check shield shopping-cart skip-forward sliders-vertical sliders smile sparkles star store sun table tag target terminal thumbs-down thumbs-up timer toggle trash trending-up truck type unlock upload user-check user-plus user-x user users video volume-2 wallet wand webhook wifi workflow wrench x-circle zap-off zap
其他可用名称
常见词语会匹配到最接近的图形,因此你很少需要查找名称。以下是其中一些:
| 你编写的内容 | 显示效果 |
|---|---|
gear, cog, config | settings |
docs, guide | book |
reference, tutorial | book-open |
api | code |
auth, authentication | key |
security | shield |
db, data | database |
email, envelope | mail |
chat, comment, message | message-circle |
warning, alert | alert-triangle |
error | x-circle |
tip, idea | lightbulb |
launch, quickstart | rocket |
delete, remove | trash |
pricing, money | dollar-sign |
payment | credit-card |
repo, git, branch | git-branch |
analytics | activity |
world, web | globe |