行动号召区块 <CtaBlock />
整页一块强调色浅底的大圆角区块:左边小节名、大标题、导语、一个“复制框”(等宽地址或命令)和按钮;右边 2–4 个编号步骤卡,逐个出现。
Template and style descriptions are currently available in Chinese only.
- Group
- 收尾 · 下一步做什么
- Component
CtaBlock·#cta-block- Interaction
- build 模式下每按一次 → 出现一个步骤
Good for
- 讲完之后告诉听众怎么开始、去哪里、敲什么命令
- 有一个明确的地址或命令
Avoid when
- 只想总结观点:用 Closing 或 Recap
- 步骤超过 4 个:用 StepTrack
Content limits
| 1 | title 1–2 行,每行 ≤ 10 字 |
| 2 | lead ≤ 50 字 |
| 3 | command ≤ 44 个字符;commandLabel ≤ 10 字 |
| 4 | actions 1–3 个,label ≤ 10 字 |
| 5 | steps 2–4 个:title ≤ 10 字,body ≤ 30 字 |
Fields
| Field | Type | |
|---|---|---|
kicker · required | string | 标题上方的小节名,2–8 字 |
title · required | string | string[] | 页面标题;传数组可手动断行,每项一行 |
lead | string | 一到两句导语,≤ 60 字 |
source | string | 事实出处;页面上有任何数据或事实时必填 |
hint | ReactNode | 页眉中间的操作提示,可用 <kbd> |
command | string | 复制框里的地址或命令 |
commandLabel | string | 复制框上方标签 |
actions | { label, kind?: 'primary' | 'ghost' | 'code', icon? }[] | 画出来的按钮 |
steps · required | { title, body }[] | 编号步骤 |
Example
<CtaBlock kicker="开始使用" title={['先在 U 盘上', '试一试']} command="fedoraproject.org/workstation/download" actions={[{ label: '下载 Workstation' }]} steps={[{ title: '制作启动盘', body: '…' }, …]} />