Imgcli

社交内容

通知堆叠

团队通知接连到来:新卡片从顶部落下,把旧卡片往下推,旧卡片随之变淡。

制作视频
类型
动画
时长
4.3s
分类
社交内容
来源
Imgcli

安装

$ npx @imgcli/cli add message-stack

团队通知接连到来:新卡片从顶部落下,把旧卡片往下推,旧卡片随之变淡。

安装

npx @imgcli/cli add message-stack

使用

import { MessageStack } from "@/components/imgcli/message-stack";

<MessageStack
  messages={[
    {
      "app": "Projects",
      "title": "Design review approved",
      "body": "Maya approved the checkout flow",
      "time": "now"
    },
    {
      "app": "Calendar",
      "title": "Team sync in 10 minutes",
      "body": "Product team · 10:00 AM",
      "time": "now"
    },
    {
      "app": "Files",
      "title": "New handoff files",
      "body": "Checkout screens · 4 updated files",
      "time": "now"
    },
    {
      "app": "Messages",
      "title": "Ready for a quick review?",
      "body": "Alex shared the new onboarding flow",
      "time": "now"
    }
  ]}
/>;

默认示例:用四条通知展示设计获批、会议提醒、文件交接和评审请求。以 30 fps 渲染 129 帧(4.3 秒)。

参数类型默认值说明
messages
readonly MessageStackItem[]见使用示例In arrival order; the last one ends on top.
gap
number0.7Seconds between arrivals.
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 message-stack。CLI 会把组件源码复制到项目的 components/imgcli/ 目录并安装依赖,之后可以直接修改源码。

通知堆叠能做什么?

团队通知接连到来:新卡片从顶部落下,把旧卡片往下推,旧卡片随之变淡。

使用通知堆叠前需要准备什么?

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