完整场景
版本号滚动
像里程表一样宣布新版本:先出现产品名,版本号的每一位数字从左到右依次滚动并停在对应数值上。
安装
npx @imgcli/cli add version-roll使用
import { VersionRoll } from "@/components/imgcli/version-roll";
<VersionRoll />默认参数下以 30 fps 渲染 108 帧(3.6 秒),预览画布为 960 × 540。
Use <VersionRoll product="Acme" version="v2.0" tag="Now with teams." /> for 108 frames at 30 fps (VERSION_ROLL_SECONDS). Digits roll; other characters fade in.
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
product | string | "imgcli" | |
version | string | "v2.0" | |
tag | string | "Video templates are here." | A short line under the version. Empty for none. |
fontSize | number | 168 | Version type size in pixels on a 540px-tall canvas. |
fontFamily | string | — | A face from the Imgcli font list, or any loaded CSS font stack. |
accentColor | string | — | |
theme | Partial<ImgcliTheme> | — | |
mode | "light" | "dark" | — | |
speed | number | 1 |
许可
MIT 许可,可免费用于个人及商业项目,保留版权和许可声明。
Copyright (c) 2026 Ricky (Imgcli) <https://imgcli.com>
常见问题
如何在 Remotion 项目中使用版本号滚动?
运行 npx @imgcli/cli add version-roll。CLI 会把组件源码复制到项目的 components/imgcli/ 目录并安装依赖,之后可以直接修改源码。
版本号滚动能做什么?
像里程表一样宣布新版本:先出现产品名,版本号的每一位数字从左到右依次滚动并停在对应数值上。
使用版本号滚动前需要准备什么?
准备 Node.js 20.19 或更高版本,以及一个 Remotion 项目。新项目可以用 npx create-video@latest 创建。免费组件采用 MIT 许可证。