For AI agents: the complete documentation index is available at https://a3s-lab.github.io/UI/llms.txt, the full documentation bundle is available at https://a3s-lab.github.io/UI/llms-full.txt, and this page is available as Markdown at https://a3s-lab.github.io/UI/components/resource-card.md.
  • 简体中文
  • next
  • 资源卡

    Resource Card 表示文件、模板、智能体、配置与其他工作台资源。强调色和预览区域用于传达类型,文本仍是信息的事实来源。

    Live previewHTML · CSS · JavaScript

    用途

    <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-kinddocumentspreadsheetpresentationagentdangerdocument强调色家族
    data-orientationhorizontal 或省略省略预览与文本布局
    --resource-grid-minCSS 长度12rem最小网格轨道宽度
    --resource-grid-gapCSS 长度1rem网格间距
    --resource-preview-heightCSS 长度8.5rem预览区域高度
    --resource-accentCSS 颜色类型令牌覆盖单个资源的强调色

    状态和变体

    按钮用于就地操作;链接用于导航。两者都提供悬停和焦点可见状态。 disabled 仅与按钮根一起使用。水平方向对于最近的文件列表和搜索结果非常有用。

    可访问性

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