Imgcli

文字与标题

逐词对焦

词语从模糊中逐个清晰,节奏由慢到快:开头的词留足阅读时间,后面的词加速跟上,整句一起落定。

制作视频
类型
动画
时长
3.4s
分类
文字与标题
来源
Imgcli

安装

$ npx @imgcli/cli add focus-in

词语从模糊中逐个清晰,节奏由慢到快:开头的词留足阅读时间,后面的词加速跟上,整句一起落定。

安装

npx @imgcli/cli add focus-in

使用

import { FocusIn } from "@/components/imgcli/focus-in";

<FocusIn />

默认参数下以 30 fps 渲染 102 帧(3.4 秒),预览画布为 960 × 540。

Use <FocusIn text="Make the demo that ships the same day as the feature." /> for 102 frames at 30 fps (FOCUS_IN_SECONDS). duration sets how long the whole line takes; maxWidth wraps it.

参数类型默认值说明
text
string"Make the demo that ships the same day as the feature."
duration
number1.8Seconds for the whole line to resolve.
fontSize
number52Type size in pixels on a 540px-tall canvas.
fontWeight
number600
maxWidth
number0.72Widest a line may run, as a fraction of the frame.
fontFamily
string—A face from the Imgcli font list, or any loaded CSS font stack.
theme
Partial<ImgcliTheme>—
mode
"light" | "dark"—
speed
number1

许可

MIT 许可,可免费用于个人及商业项目,保留版权和许可声明。

Copyright (c) 2026 Ricky (Imgcli) <https://imgcli.com>

常见问题

如何在 Remotion 项目中使用逐词对焦?

运行 npx @imgcli/cli add focus-in。CLI 会把组件源码复制到项目的 components/imgcli/ 目录并安装依赖,之后可以直接修改源码。

逐词对焦能做什么?

词语从模糊中逐个清晰,节奏由慢到快:开头的词留足阅读时间,后面的词加速跟上,整句一起落定。

使用逐词对焦前需要准备什么?

准备 Node.js 20.19 或更高版本,以及一个 Remotion 项目。新项目可以用 npx create-video@latest 创建。免费组件采用 MIT 许可证。