Elements

组件

图标 Icon

Icon:图标容器。用一个标准盒子让 inline svg 保持光学尺寸,并继承文字颜色;图标本身不携带颜色和尺寸。可以通过 `name` 从注册表取图标,也可以传入自定义图标。

#基础用法

icon/basic Vue React

The stroke falls where the light leaves it and the line goes on.

icon/in-text Vue React

Moonlight fills the vessel and the page keeps still.

icon/sizes Vue React

#属性

#Icon

属性类型默认值描述
sizeString"inherit"尺寸档位随周围字号变化;默认为 inherit,即图标所在文本的 1em
labelStringundefined无障碍名称;未设置时图标仅用于呈现,并从无障碍树中隐藏
glyphObjectundefinedA glyph from the registry, imported directly. Ignored when a default slot is given — an explicit glyph always wins.
nameStringundefined图标库中的字形;提供默认插槽时忽略该属性,插槽内容优先于图标库