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/message-citation.md.

消息引用

消息引用把一项陈述连接到具名来源,同时保持阅读连续性。来源获取和预览行为由宿主应用负责。

实时预览

发布包为每个公开组件提供稳定语义选择器 1组件清单components.json。

用法

<a class="message-citation" href="#source-1">
  <span data-citation-index>1</span>
  <span data-citation-title>组件清单</span>
  <span data-citation-source>components.json</span>
</a>

参数

API取值用途
根 <a>必须跳转到来源的原生导航
data-citation-index可选紧凑引用序号
data-citation-title必须人可读的来源标题
data-citation-source可选主机、文件或发布方

状态与变体

来源不可用时保留文本并明确标记不可用,不要留下仍可操作的失效链接。

无障碍

链接名称脱离上下文后仍应有意义。关闭引用预览后将焦点恢复到引用链接。