屏幕与设备
三屏展示
同一产品在三种屏幕上:笔记本先升起,平板和手机依次出现在前方,各自显示对应宽度的页面,随后带着纵深微微分开。
安装
npx @imgcli/cli add device-trio使用
import { DeviceTrio } from "@/components/imgcli/device-trio";
<DeviceTrio />默认参数下以 30 fps 渲染 132 帧(4.4 秒),预览画布为 960 × 540。
Use <DeviceTrio headline="Looks right on every screen." desktop="/desktop.png" tablet="/tablet.png" phone="/phone.png" /> for 132 frames at 30 fps (DEVICE_TRIO_SECONDS).
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
headline | string | — | |
desktop | string | — | 16:10 screenshot for the laptop. |
tablet | string | — | 3:4 portrait screenshot for the tablet. |
phone | string | — | 390 × 844 screenshot for the phone. |
fontFamily | string | — | A face from the Imgcli font list, or any loaded CSS font stack. |
bezelColor | string | — | The devices' body colour. |
theme | Partial<ImgcliTheme> | — | |
mode | "light" | "dark" | — | |
speed | number | — |
许可
MIT 许可,可免费用于个人及商业项目,保留版权和许可声明。
Copyright (c) 2026 Ricky (Imgcli) <https://imgcli.com>
常见问题
如何在 Remotion 项目中使用三屏展示?
运行 npx @imgcli/cli add device-trio。CLI 会把组件源码复制到项目的 components/imgcli/ 目录并安装依赖,之后可以直接修改源码。
三屏展示能做什么?
同一产品在三种屏幕上:笔记本先升起,平板和手机依次出现在前方,各自显示对应宽度的页面,随后带着纵深微微分开。
使用三屏展示前需要准备什么?
准备 Node.js 20.19 或更高版本,以及一个 Remotion 项目。新项目可以用 npx create-video@latest 创建。免费组件采用 MIT 许可证。