屏幕与设备
选项选择
做出一个选择:悬停框依次经过各个选项,指针点中其中一个,单选圆点填满,下方按钮变为可用并被按下。
安装
npx @imgcli/cli add option-pick使用
import { OptionPick } from "@/components/imgcli/option-pick";
<OptionPick />默认参数下以 30 fps 渲染 132 帧(4.4 秒),预览画布为 960 × 540。
Use <OptionPick title="Choose a template" options={[{ title: "Product launch", detail: "30 s" }]} choose={0} cta="Continue" /> for 132 frames at 30 fps (OPTION_PICK_SECONDS).
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
title | string | "Choose a template" | |
options | readonly OptionPickOption[] | [
{ title: "Product launch", detail: "30 s · overview and three features" },
{ title: "Feature demo", detail: "24 s · one feature, start to result" },
{ title: "App wal | |
choose | number | 2 | Which option gets chosen. |
cta | string | "Continue" | |
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 option-pick。CLI 会把组件源码复制到项目的 components/imgcli/ 目录并安装依赖,之后可以直接修改源码。
选项选择能做什么?
做出一个选择:悬停框依次经过各个选项,指针点中其中一个,单选圆点填满,下方按钮变为可用并被按下。
使用选项选择前需要准备什么?
准备 Node.js 20.19 或更高版本,以及一个 Remotion 项目。新项目可以用 npx create-video@latest 创建。免费组件采用 MIT 许可证。