Card
将相关内容组合在一起的容器,包含头部、标题、描述、操作、内容和底部等部分。
可用框架
Angular: 可用 Vue: 可用 React: 可用 React Native: 可用
用法
Storage
Recordings kept on this device.
12.4 GB of 20 GB used across 38 recordings.
Weekly sync
Tuesday 14:00 · 42 min
Ada Park will share the launch checklist on Friday.
<div class="demo-row" style="align-items: flex-start">
<section soneCard style="width: 22rem">
<header soneCardHeader>
<h3 soneCardTitle>Storage</h3>
<p soneCardDescription>Recordings kept on this device.</p>
<button soneCardAction soneBtn variant="ghost" size="sm" type="button">Reveal</button>
</header>
<div soneCardContent>12.4 GB of 20 GB used across 38 recordings.</div>
<footer soneCardFooter>
<button soneBtn variant="outline" size="sm" type="button">Free up space</button>
<button soneBtn variant="ghost" size="sm" type="button">Settings</button>
</footer>
</section>
<section soneCard size="sm" style="width: 18rem">
<header soneCardHeader>
<h3 soneCardTitle>Weekly sync</h3>
<p soneCardDescription>Tuesday 14:00 · 42 min</p>
</header>
<div soneCardContent>Ada Park will share the launch checklist on Friday.</div>
<footer soneCardFooter>
<button soneBtn size="sm" type="button">Open note</button>
</footer>
</section>
</div>导入
import {
SoneCardActionDirective,
SoneCardContentDirective,
SoneCardDescriptionDirective,
SoneCardDirective,
SoneCardFooterDirective,
SoneCardHeaderDirective,
SoneCardTitleDirective,
} from "@surface-one/angular/card";API 参考
SoneCardActionDirective指令
SoneCardContentDirective指令
SoneCardDescriptionDirective指令
SoneCardDirective指令
| 名称 | 类型 | 默认值 |
|---|---|---|
size | CardSize | "default" |