# Tags Expand Into a Card (能力标签展开成卡片)

A row of tags pops in one by one, then one of them grows into a card while the rest fade outward, and a one-line description appears. For listing capabilities, then zooming into one.

- Ref: `video/motion-list-tags-then-focus` (code video · motion · any · any · 6s at 30fps)
- Page: https://uifino.com/en/videos/motion-list-tags-then-focus
- Markdown: https://uifino.com/md/videos/motion-list-tags-then-focus.md
- Preview image: https://uifino.com/videos/motion-list-tags-then-focus/poster.jpg

## Install

- ZIP: https://uifino.com/videos/motion-list-tags-then-focus/source.zip

A row of tags pops in one by one, then one of them grows into a card while the rest fade outward, and a one-line description appears. For listing capabilities, then zooming into one.

Rendered video: https://uifino.com/videos/motion-list-tags-then-focus/preview.mp4

## Beats

- 0.4-1.38s List the capabilities: Five tags scale 0.9 to 1 and fade in 0.12 s apart, power3.out 0.5 s, no overshoot Camera: static. On-screen text: "Chat / Completion / Prediction / Memory / Tool use".
- 1.38-2.2s Let the viewer read the row: Fully still for 0.82 s Camera: static.
- 2.2-2.9s Pick one: The Prediction tag itself grows into a 840x264 card, radius 64 to 24 px, power3.inOut 0.7 s; the other four fade out and move 40 px outward Camera: static. On-screen text: "Prediction".
- 2.8-3.15s Give the description: The description starts fading in 0.1 s before the expansion ends and settles up 12 px Camera: static. On-screen text: "It guesses the next line before you finish".
- 3.15-6s Let the viewer read: Fully still for 2.85 s Camera: static.

## Parameters

- `focusIndex` Which tag opens: default 3, range 1 to 5
- `startAt` First tag enters: default 0.4s, range 0 to 1s
- `stagger` Gap between tag entrances: default 0.12s, range 0.08 to 0.25s
- `popDuration` Entrance duration per tag: default 0.5s, range 0.3 to 0.8s
- `expandAt` Expansion start: default 2.2s, range 1.8 to 3s
- `expandDuration` Expansion duration: default 0.7s, range 0.5 to 1s
- `expandEase` Expansion ease: default power3.inOut
- `shift` Outward shift of the other tags: default 40px, range 16 to 80px
- `cardRadius` Card corner radius: default 24px, range 8 to 24px
- `cardW` Card width: default 840px, range 800 to 1200px
- `cardH` Card height: default 264px, range 240 to 360px
- `textLead` Description lead time: default 0.1s, range 0 to 0.3s

## Good for

- Listing three to six capabilities, then opening one
- Short one-word tags
- Works in Chinese and English; tag size shrinks to fit

## Not for

- Tags that need icons or pictures
- Opening several tags in turn
- Descriptions longer than one line

## Source files (plain text)

- https://uifino.com/videos/motion-list-tags-then-focus/source/SPEC.md
- https://uifino.com/videos/motion-list-tags-then-focus/source/PROMPT.md
- https://uifino.com/videos/motion-list-tags-then-focus/source/NOTICE.md
- https://uifino.com/videos/motion-list-tags-then-focus/source/project/assets/fonts/OFL.txt
- https://uifino.com/videos/motion-list-tags-then-focus/source/project/compositions/tags.html
- https://uifino.com/videos/motion-list-tags-then-focus/source/project/hyperframes.json
- https://uifino.com/videos/motion-list-tags-then-focus/source/project/index.html

## How to use

- Copy the beats and parameters; replace only the copy, the accent color and the product screenshots.
- `PROMPT.md` has two prompts: one to reproduce this video exactly, one to learn only the technique.
- Build with HyperFrames (`/hyperframes`); the project in the ZIP is a ready starting point.

## Files

| Path | Role | Size |
| :--- | :--- | ---: |
| PROMPT.md | doc | 2.9 KB |
| SPEC.md | doc | 6.3 KB |

### PROMPT.md

```md
# PROMPT：motion-list-tags-then-focus

## 照抄复刻
用 `/hyperframes` 做一个 1920×1080、30 fps、6 秒的「标签展开成卡片」动效。底色 `#F6F5F2`，标签和卡片填充 `#FFFFFF`，字色 `#121212`，说明句色 `#6B6966`，描边 `#E2DFD8`。字体：中文思源黑体、西文 Hanken Grotesk，用 `@font-face` 指向 `assets/fonts/`，不联网。

版式：五个标签一排，水平居中，垂直中心 y = 540。标签高 128px，左右内边距 56px，间距 28px，宽度跟字走，全圆角（圆角 64px）；字 64px、字重 600、字距 -0.01em。填充白色，外加 `0 0 0 2px #E2DFD8` 描边和 `0 8px 24px rgba(18,18,18,0.08)` 近影。没有图标和表情。

文案：「对话」「补全」「预测」「记忆」「工具调用」，展开第三个「预测」，说明句「你还没写完，它已经猜到下一行」，36px、字重 400、色 `#6B6966`。

动作：
1. 标签入场：scale 0.9→1 加透明度 0→1，`power3.out`，0.5 秒，不过冲；起点 0.40 / 0.52 / 0.64 / 0.76 / 0.88 秒，间隔 0.12 秒。1.38 到 2.20 秒完全静止。
2. 展开（2.20 到 2.90 秒，`power3.inOut`，0.7 秒）：「预测」这个标签自己变形，不另起一张卡。位置移到画面正中（卡片 840×264，left 540，top 408），宽 240→840、高 128→264，圆角 64→24px；标题字从标签正中同步移到卡片左上（距左 64px、距上 56px）。填充、描边、阴影、字色全程不变。宽高用 `width`、`height`，位置用 `x`、`y`。
3. 同一时刻，其余四个标签向外移 40px（左边两个向左、右边两个向右），`power3.inOut` 0.7 秒；透明度 1→0，`power2.out`，0.42 秒。
4. 说明句 2.80 秒开始（展开结束前 0.1 秒）：透明度 0→1 加上移 12px 落定，`power2.out`，0.35 秒；位置在标题下 12px、与标题左对齐。
5. 3.15 到 6.00 秒完全静止，不呼吸、不漂浮。

需要替换的地方：
- 文案：变量 `tag1` 到 `tag5`、`detail`（英文例：Chat / Completion / Prediction / Memory / Tool use，说明 It guesses the next line before you finish）；英文时标签字号会自动缩小到整排不超过 1600px。
- 展开哪一个：`focusIndex`（1 到 5）。
- 颜色：`bg`、`surface`、`ink`、`muted`、`line`。
- 时间和尺寸：`startAt`、`stagger`、`popDuration`、`expandAt`、`expandDuration`、`expandEase`、`shift`、`cardRadius`、`cardW`、`cardH`、`textLead`。
- 标签数量固定为 5；要增减，复制或删除一个标签元素并同步改脚本里的列表。

## 只学手法
被选中的标签自己长成卡片，不另起一张：0.7 秒 `power3.inOut` 里它的位置、宽高和圆角（全圆角 64px→24px）连续变化，字从中间移到左上，底色和阴影不变；其余标签同时淡出并外移 40px；说明句在展开结束前 0.1 秒开始淡入。展开前标签依次入场，间隔 0.12 秒，全部停稳 0.8 秒后才展开。
```

### SPEC.md

```md
# SPEC：motion-list-tags-then-focus

## LOOK
- 色值（中性色 5 个，无强调色出镜）：底 `#F6F5F2`，标签和卡片填充 `#FFFFFF`，字 `#121212`，次要字 `#6B6966`，描边 `#E2DFD8`。BRIEF 给的强调色 `#D4412A` 没有用上：展开时不许换色，画面上也没有需要强调的字，不硬塞。
- 字体：西文 Hanken Grotesk（`assets/fonts/hanken-grotesk.woff2`），中文 Noto Sans SC（`assets/fonts/noto-sans-sc.woff2`），门禁按用到的字生成子集，OFL。字体栈先西文后中文。
- 字号：两档。标签字和卡片里的标题字同一档 64px、字重 600、字距 -0.01em、行高 80px；说明句 36px、字重 400、行高 54px、色 `#6B6966`。英文版标签一排放不下时，标签字号自动缩小，缩到刚好让整排宽度不超过 1600px（英文默认约 54px），标签的高度、内边距、间距按字号等比缩。
- 圆角：两档。标签是全圆角（圆角 = 高度的一半，64px，视觉上等于 999px，用 999 会让缓动前半段什么都看不出来），展开后卡片 24px。BRIEF 点名要这个胶囊到 24px 的过渡，所以标签上写了 `data-lint-ignore`。
- 阴影：一档。标签和卡片都有 `0 0 0 2px #E2DFD8`（描边）加 `0 8px 24px rgba(18,18,18,0.08)`（近影），光从上方来，展开前后不变。
- 版式：五个标签 1440px 宽一排，水平居中，垂直中心 y = 540。标签高 128px，左右内边距 56px，相邻间距 28px，宽度跟字走（对话/补全/预测/记忆 各 240px，工具调用 368px）。展开后的卡片 840 × 264px，居中（left 540，top 408），内边距：标题左 64px、上 56px；说明句在标题下 12px，左对齐在同一条左边线上。没有图标、表情、编号。

## MOTION
- 标签入场：每个标签 scale 0.9 到 1 加透明度 0 到 1，`power3.out`，0.5 秒，不过冲。依次错开 0.12 秒：起点 0.40 / 0.52 / 0.64 / 0.76 / 0.88 秒，全部落定在 1.38 秒。
- 停稳：1.38 到 2.20 秒完全不动，共 0.82 秒（BRIEF 要求至少 0.8 秒）。
- 展开：2.20 到 2.90 秒，`power3.inOut`，0.7 秒。「预测」那个标签自己变形，没有另起一张卡：位置 left 776→540、top 476→408，宽 240→840、高 128→264，圆角 64→24px；标题字从标签正中间同步移到卡片左上（x 56→64，y 24→56）。填充、描边、阴影、字色全程不变。
  - 标签起点位置由代码按字宽算出：五个标签总宽 1440，从 x = 240 起，预测左边是 240 + 2 × (240 + 28) = 776。
- 其他四个标签：同一时刻起，向外移 40px（左边两个向左，右边两个向右），`power3.inOut` 0.7 秒；透明度 1→0，`power2.out`，0.42 秒（展开时长的 0.6）。淡出比移动先结束，避免被长大的卡片压住时还半透明地露着。
- 说明句：从 2.80 秒开始（展开结束前 0.1 秒），透明度 0→1 加向上 12px 落定，`power2.out`，0.35 秒，3.15 秒完全显示。
- 3.15 到 6.00 秒完全静止，2.85 秒（BRIEF 要求说明完整显示后至少静止 2.8 秒）。没有退场、呼吸、漂浮。
- 没有快速移动，不开运动模糊。

## 逐拍节拍表
| 拍 | 起止秒 | 画面 | 镜头 | 转场 | 屏幕文案原文 |
| --- | --- | --- | --- | --- | --- |
| tags | 0.40 - 1.38 | 五个标签依次放大淡入 | 固定 | 无 | 对话 / 补全 / 预测 / 记忆 / 工具调用 |
| settle | 1.38 - 2.20 | 五个标签停稳 | 固定 | 无 | 同上 |
| expand | 2.20 - 2.90 | 「预测」长成卡片，其余四个淡出外移 | 固定 | 共享元素展开 | 预测 |
| reveal | 2.80 - 3.15 | 说明句淡入落定 | 固定 | 无 | 你还没写完，它已经猜到下一行 |
| hold | 3.15 - 6.00 | 完全静止 | 固定 | 无 | 同上 |

英文版：「Chat / Completion / Prediction / Memory / Tool use」，展开「Prediction」，说明「It guesses the next line before you finish」。标签字号自动缩到适合宽度，动效数字不变。

## 参数接线
全部是 `project/compositions/tags.html` 根元素 `data-composition-variables` 里的变量，用户的 AI 在挂载处用 `data-variable-values` 覆盖：
- 文案：`tag1` 到 `tag5`、`detail`。
- `focusIndex`（3，1–5）：第几个标签展开，其余四个向它的两侧外移。
- 颜色：`bg`（`#F6F5F2`）、`surface`（`#FFFFFF`）、`ink`（`#121212`）、`muted`（`#6B6966`）、`line`（`#E2DFD8`）。
- 入场：`startAt`（0.4）、`stagger`（0.12）、`popDuration`（0.5）。
- 展开：`expandAt`（2.2）、`expandDuration`（0.7）、`expandEase`（`power3.inOut`）、`shift`（40）、`cardRadius`（24）、`cardW`（840）、`cardH`（264）、`textLead`（0.1）。
不是变量的常量（都在同一个文件的脚本里）：标签入场起始缩放 0.9 和 `power3.out`；淡出的 `power2.out` 和 0.6 倍时长；说明句 0.35 秒、12px、`power2.out`；字号 64、标签高度 = 字号 × 2、内边距 = 字号 × 0.875、间距 = 字号 × 0.4375；卡片内边距 64 / 56 / 12，说明句宽 = cardW − 128，top = 卡片 top + 56 + 行高 80 + 12（改标题字号 64 要同步）；整排宽度上限 1600。总时长 6 秒由 `index.html` 的 `data-duration` 决定。`index.html` 和 `#root` 的底色 `#F6F5F2` 写死在 `index.html` 的样式里，换 `bg` 时那里也要改。

## 禁用项
标签上的图标和表情、展开时闪白或换色、另起一张卡淡入、弹簧过冲和抖动、点击光圈、标签的呼吸和漂浮、光效和渐变、编号和注释、说明句之外的小字。

## 已知取舍
- `W6`（同一阴影用在 5 个元素上）：五个标签和展开后的卡片是同一种东西，同一档阴影是有意的。
- `F8`（画面文字 25 个汉字，限 24）：五个标签加一句说明是任务书逐字指定的屏幕文案，展开时另四个标签已淡出，同一时刻画面上最多 5 个标签字或「预测」加说明句共 16 字。
- 英文版（已临时换成英文变量跑过门禁和截帧）：标签字号自动缩到 54px，整排落在 1600px 内，卡片内说明一行放得下，动效数字不变。字体子集只含中文默认文案用到的字，换英文文案后要重跑一次门禁补子集。
- `first_frame_empty`：标签 0.4 秒才开始入场，第 0 帧只有底色。入场动效第一帧本来就是空的，封面（`poster`）取 4.0 秒，卡片和说明都已落定。
```
