Imgcli

文字与标题

滚动选项

像选择器一样转动后停下:左侧是固定短语,右侧一列选项滚过、减速并停在答案上,答案被高亮,下方可显示一行网址。

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

安装

$ npx @imgcli/cli add list-roll

像选择器一样转动后停下:左侧是固定短语,右侧一列选项滚过、减速并停在答案上,答案被高亮,下方可显示一行网址。

安装

npx @imgcli/cli add list-roll

使用

import { ListRoll } from "@/components/imgcli/list-roll";

<ListRoll
  lead="Meet on"
  items={[
    "Monday",
    "Tuesday",
    "Wednesday",
    "Thursday",
    "Friday"
  ]}
  footer="Team sync · 10:00 AM"
/>;

默认示例:从工作日中选出周五,安排上午 10 点的团队例会。以 30 fps 渲染 114 帧(3.8 秒)。

参数类型默认值说明
lead
string"Meet on"
items
readonly string[]见使用示例
landOn
number—Which item the roll lands on. Defaults to the last.
footer
string"Team sync · 10:00 AM"A line shown under the result once it lands, such as a domain. Empty for none.
rollSeconds
number1.9Seconds the roll takes to come to rest.
fontSize
number56Type size in pixels on a 540px-tall canvas.
fontWeight
number600
fontFamily
string—A face from the Imgcli font list, or any loaded CSS font stack.
accentColor
string—
theme
Partial<ImgcliTheme>—
mode
"light" | "dark"—
speed
number1

许可

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

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

常见问题

如何在 Remotion 项目中使用滚动选项?

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

滚动选项能做什么?

像选择器一样转动后停下:左侧是固定短语,右侧一列选项滚过、减速并停在答案上,答案被高亮,下方可显示一行网址。

使用滚动选项前需要准备什么?

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