For AI agents: the complete documentation index is available at https://a3s-lab.github.io/UI/v0.4.0/llms.txt, the full documentation bundle is available at https://a3s-lab.github.io/UI/v0.4.0/llms-full.txt, and this page is available as Markdown at https://a3s-lab.github.io/UI/v0.4.0/components/icon.md.

图标

为宿主提供统一尺寸、笔画和对齐的图形槽,适用于装饰提示或带有明确名称的独立图标。

实时预览

用法

<span class="icon" role="img" aria-label="Verified">
  <svg viewBox="0 0 24 24" aria-hidden="true"><path d="M20 6 9 17l-5-5" /></svg>
</span>

契约

接口值
根选择器.icon
原生根元素<span>
状态ready, decorative, labeled, host-provided
事件—
方法—

产品边界

图标不内置供应商品牌,也不能替代按钮标签和状态文字。官方品牌标识使用 Brand Lockup,不通过普通 Icon 伪装。

组件只发布可复用的交互边界。数据获取、持久化、权限、可信内容与业务实体继续由宿主产品拥有。

可访问性

装饰图标使用 aria-hidden;承担信息时使用 role=img 和名称。不要用 Unicode 字符代替一致的图标资产。