基本用法
title 设置标题,description 补充说明,默认插槽承载正文。可用 as="article" 表示独立条目,as="section" 表示章节;titleAs 调整标题层级,默认 h3。
外观
默认 variant="outline" 显示细边框;soft 使用浅底,plain 仅保留内容留白;raised 在有底色的区域中以无边框的抬升表面区分卡片。根据所在区域选择一种分组方式,避免重复叠加容器。
密度
density="compact" 缩小容器留白,默认 comfortable 保留常规留白。内部按钮与输入框的尺寸单独设置。
插槽与分隔
header 替换完整头部;title、description、trailing 分别替换自动头部中的内容。footer 放置摘要或操作,divided 增加区域分隔线;未提供的区域不占空间。
自定义 header 时,为有语义的卡片提供 aria-label 或 aria-labelledby。
组合页签与表单
在正文中组合 Tabs、Input 和 Button。卡片只负责分组,操作由内部控件完成。
加载与空态
用 aria-busy 和 Skeleton 表达加载,用 EmptyState 提供空结果及后续动作。状态更新后,将焦点交给仍然可用的内容或操作。
长内容与窄屏
宽度由所在布局决定,长标题、说明与操作会换行。正文包含多段内容时,由正文容器设置段落间距。
API
QuireCard Props
Slots 内容位置
defaultMain content; omitted regions do not reserve padding.
anyheaderReplaces the complete automatic header, including its trailing area.
anytitleTitle content inside the selected heading element.
anydescriptionDescription content below the title.
anytrailingIndependent header actions or status; may wrap after the title.
anyfooterSummary, metadata or independent actions following the body.
any
Events 组件事件
无自定义事件。