跳转到内容

Cards 卡片

响应式链接卡片网格与单卡片,可选图标。

card() 构建单张卡片;cards() 将任意数量卡片包进 Plumest 风格响应式网格。

cards([
{ title: 'Markdown 创作', description: '用纯 Markdown 写文档。', href: '/guides/example/', icon: 'lucide:file-text' },
{ title: '组件画廊', description: '全部构建器实时展示。', href: '/contribution/components/', icon: 'lucide:zap' },
{ title: '设计令牌', description: '单一事实来源。', href: '/contribution/styles/', icon: 'lucide:palette' },
]);
无图标卡片

纯卡片

无图标、无链接——纯内容块。

额外的 HTML 内容。

card({ title: '开始使用', description: '链接到某处的卡片。', href: '/guides/example/', icon: 'lucide:arrow-right' });
card({ title: '纯卡片', description: '无图标、无链接——纯内容块。', children: '<p>额外的 HTML 内容。</p>' });
card({ title: 'Plumest', description: '外链在新标签页打开。', href: 'https://github.com/CelPlume/CelestPlume', external: true, icon: 'lucide:external-link' });
参数类型默认值说明
titlestring卡片标题(必填)。
descriptionstring''说明文字。
hrefstring''目标地址——带它时卡片渲染为 <a>
externalbooleanfalse在新标签页打开链接。
iconstring''Iconify 图标名(如 lucide:zap)或原始 SVG。
childrenstring''说明下方的额外 HTML。
  • 图标经项目本地 @iconify-json 图标集解析——运行时绝不从 Iconify API 在线拉取。
  • cards() 接受 CardOptions[] 或单个预构建 HTML 字符串。