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

资源卡

Resource Card 表示文件、模板、助理、配置与其他工作台资源。克制的预览与明确文案共同传达类型和状态;静态卡片保持扁平。

实时预览

用法

<div class="resource-grid">
  <button type="button" class="resource-card" data-kind="agent">
    <figure>...</figure>
    <section><strong>Coding agent</strong><small>CLI + 6 skills</small></section>
  </button>
</div>

参数

参数可选值默认目的
data-kinddocument、spreadsheet、presentation、agent、dangerdocument语义资源类型;agent 使用 A3S 蓝
data-orientationhorizontal 或省略省略预览与文本布局
--resource-grid-minCSS 长度12rem最小网格轨道宽度
--resource-grid-gapCSS 长度1rem网格间距
--resource-preview-heightCSS 长度8.5rem预览区域高度
--resource-accentCSS 颜色类型令牌覆盖单个资源的强调色

状态和变体

按钮用于就地操作;链接用于导航。两者在悬停时只改变边界与底色,不上移。disabled 仅与按钮根一起使用。data-state="loading"、data-state="unavailable" 和 data-selected="true" 用于目录状态;水平方向适合最近文件和搜索结果。

可访问性

预览图稿件是装饰性的,除非它传达了独特的内容;使用 aria-hidden="true" 隐藏装饰性 SVG。保留标题文本并输入。避免在交互链接或按钮内交互式控件。