← All templates

请求卡 <VerbCards />

3–4 张卡片,各有一个方法徽章(PUT/GET…)、请求行和一句说明;每按一次 → 一张卡底部像小票一样打出响应行。

Template and style descriptions are currently available in Chinese only.

See it in the demo deck →

Group
接口 · 3–4 个操作
Component
VerbCards · #verb-cards
Interaction
build: reveal 时每步打出一张卡的响应

Good for

  • 介绍一个 API 的几个核心操作
  • 每个操作都有“请求 → 响应”

Avoid when

  • 要展示完整代码:用 Terminal 或 CodeDiff
  • 操作超过 4 个:拆页

Content limits

1cards 3–4 张
2verb ≤ 6 个拉丁字符;path ≤ 28 个拉丁字符
3body ≤ 30 字;reply ≤ 28 个拉丁字符

Fields

FieldType
kicker · requiredstring标题上方的小节名,2–8 字
title · requiredstring | string[]页面标题;传数组可手动断行,每项一行
leadstring一到两句导语,≤ 60 字
sourcestring事实出处;页面上有任何数据或事实时必填
hintReactNode页眉中间的操作提示,可用 <kbd>
cards · required{ verb, path, body, reply }[]每个操作一张

Example

<VerbCards kicker="S3 API" title="…" cards={[{ verb: 'PUT', path: 'PUT /photos/a.jpg', body: '…', reply: '200 OK' }, …]} source="…" />