snapcn
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesesnapcn
snapcn
Copy-paste components for Remotion videos. Components install via and land in
— you own the code.
shadcncomponents/snap-cn/面向 Remotion 视频的复制粘贴组件。组件通过 安装,并放入
——代码归你所有。
shadcncomponents/snap-cn/Installation
安装
Prerequisites: a Remotion project ().
npx create-video@latestbash
undefined前置条件:一个 Remotion 项目()。
npx create-video@latestbash
undefinedAdd any component (namespaced shadcn registry)
Add any component (namespaced shadcn registry)
shadcn add @snapcn/text-reveal
shadcn add @snapcn/text-reveal
Component lands at components/snap-cn/text-reveal.tsx
Component lands at components/snap-cn/text-reveal.tsx
`@snapcn/<name>` is the canonical namespaced form. It needs no `registries` entry — the
namespace is in the shadcn registry directory. The plain registry URL
`https://snapcn.dev/r/<name>.json` also works.
`@snapcn/<name>` 是规范的命名空间形式。它不需要 `registries` 条目——该命名空间
位于 shadcn registry 目录中。普通 registry URL
`https://snapcn.dev/r/<name>.json` 同样可用。Dependencies install automatically
依赖项自动安装
Many components pull others via — installs them transitively.
For example, also pulls ,
and .
registryDependenciesshadcnshadcn add @snapcn/search-typing@snapcn/snap-cn-ui@snapcn/input@snapcn/caret- is the shared core lib (timeline-fold hook, theme context, color math). Most UI Primitives depend on it. You rarely install it directly.
@snapcn/snap-cn-ui
许多组件会通过 引入其他组件—— 会传递安装它们。
例如, 还会引入 、
和 。
registryDependenciesshadcnshadcn add @snapcn/search-typing@snapcn/snap-cn-ui@snapcn/input@snapcn/caret- 是共享核心库(timeline-fold hook、theme context、color math)。 大多数 UI Primitives 都依赖它。你很少需要直接安装它。
@snapcn/snap-cn-ui
Two tiers
两个层级
snapcn has two kinds of components — they have different APIs:
- Animation tier () — text animations, transitions, backgrounds, UI-block sims, brand/social cards, full compositions. Frame-driven. Shared props:
snapcn(time multiplier), and for text:speed,fontSize,color.fontWeight - UI Primitives () — timeline-driven shadcn-style primitives. Two ship today:
snap-cn-uiandinput. State-based props (caret,state,style,size) — the open/typing state is a pure function of the timeline. Nothemeprop. Built onspeed.@snapcn/snap-cn-ui
snapcn 包含两类组件——它们的 API 不同:
- 动画层级()——文字动画、转场、背景、UI 区块模拟、 品牌/社交卡片、完整 composition。帧驱动。共享 props:
snapcn(时间倍增器), 文字组件还支持:speed、fontSize、color。fontWeight - UI Primitives()——由时间线驱动的 shadcn 风格 primitive。目前提供两个:
snap-cn-ui和input。基于状态的 props(caret、state、style、size)——打开/输入状态 是时间线的纯函数。没有themeprop。 基于speed构建。@snapcn/snap-cn-ui
Component categories
组件分类
Pick by what you're building. The catalog is split one file per component under
. Start at — a router table grouped by
these categories with a / signal per component. Scan it, pick candidates, then
open only the files you need (full props, example, all use / don't-use
notes). Don't read every file.
references/components/references/components/index.mdUse forAvoid forreferences/components/<name>.md| Category | Tier | Components |
|---|---|---|
| Text & Titles | | |
| Captions | | |
| AI Chat Input | | |
| Screens & Devices | | |
| Logos | | |
| Scenes | | |
| Social Proof | | |
| Effects | | |
| UI Primitives | | |
That is the whole free registry — 47 items (the live list is always
; 50 more are Pro, see below). There are no shaders, no standalone transition
components, no chart or social-card components, and no shadcn primitive beyond and
. If a scene needs one, build it ( §1) — do not emit a
for a name that is not in this table. maps the
older names that no longer install.
https://snapcn.dev/llms.txt?ref=skill-snapcninputcaretreferences/anatomy.mdshadcn addreferences/components/index.md根据你要构建的内容进行选择。目录采用每个组件一个文件的形式,位于
下。请从 开始——它是一张按
以下类别分组的路由表,每个组件都附有 适用场景 / 避免用于 提示。先浏览它,
挑选候选组件,然后只打开所需的 文件(完整 props、
示例以及所有适用/不适用说明)。不要读取每个文件。
references/components/references/components/index.mdreferences/components/<name>.md| 类别 | 层级 | 组件 |
|---|---|---|
| 文字与标题 | | |
| 字幕 | | |
| AI 聊天输入 | | |
| 屏幕与设备 | | |
| Logo | | |
| 场景 | | |
| 社会证明 | | |
| 效果 | | |
| UI Primitives | | |
以上就是全部免费 registry——共 47 项(实时列表始终为
;另外还有 50 个 Pro 组件,详见下文)。这里没有 shader、
没有独立转场组件、没有图表或社交卡片组件,除 和 外也没有其他 shadcn primitive。
如果场景需要其中某类组件,请自行构建( §1)——不要为表中不存在的名称
生成 命令。 映射了已无法安装的旧名称。
https://snapcn.dev/llms.txt?ref=skill-snapcninputcaretreferences/anatomy.mdshadcn addreferences/components/index.mdComponent patterns
组件模式
Conventions differ by tier — don't assume animation-tier props on a primitive.
不同层级的约定不同——不要将动画层级的 props 套用于 primitive。
Animation tier (snapcn
)
snapcn动画层级(snapcn
)
snapcn- Named interface per component (e.g.
Props).TextRevealProps - — global time multiplier (default
speed?: number), applied as1.frame * speed - Text components: ,
fontSize,color.fontWeight - Scene-to-scene transitions are not in this registry — use Remotion's own
(
@remotion/transitions,slide,wipe,fade) inside aflip.<TransitionSeries> - on the root.
className?: string
- 每个组件都定义命名的 interface(例如
Props)。TextRevealProps - ——全局时间倍增器(默认值为
speed?: number),按1应用。frame * speed - 文字组件:、
fontSize、color。fontWeight - 场景之间的转场 不在 此 registry 中——请在 内使用 Remotion 自带的
<TransitionSeries>(@remotion/transitions、slide、wipe、fade)。flip - 根节点支持 。
className?: string
UI Primitives (snap-cn-ui
)
snap-cn-uiUI Primitives(snap-cn-ui
)
snap-cn-ui- State-based, not -based:
speed(e.g.state/"open"),"closed",style,variant,size.theme?: Partial<SnapCnTheme> - The opened/closed/active state is a pure function of the timeline (keyframed presets).
- Compose modal-layer primitives (dialog, alert-dialog, drawer) with a trigger element — see each component's example.
- 基于状态,而不是基于 :
speed(例如state/"open")、"closed"、style、variant、size。theme?: Partial<SnapCnTheme> - 打开/关闭/激活状态是时间线的纯函数(关键帧预设)。
- 将模态层 primitive(dialog、alert-dialog、drawer)与触发元素组合——请参阅 每个组件的示例。
Animation API
动画 API
tsx
import { interpolate, spring, useCurrentFrame, useVideoConfig } from "remotion";
const opacity = interpolate(frame, [0, 30], [0, 1], { extrapolateRight: "clamp" });
const scale = spring({ fps, frame, config: { damping: 12, mass: 1, stiffness: 100 } });
// Deterministic randomness (NEVER Math.random())
import { random } from "@remotion/random";
const jitter = random(`seed-${frame}`);tsx
import { interpolate, spring, useCurrentFrame, useVideoConfig } from "remotion";
const opacity = interpolate(frame, [0, 30], [0, 1], { extrapolateRight: "clamp" });
const scale = spring({ fps, frame, config: { damping: 12, mass: 1, stiffness: 100 } });
// Deterministic randomness (NEVER Math.random())
import { random } from "@remotion/random";
const jitter = random(`seed-${frame}`);Composition structure
Composition 结构
tsx
import { Sequence, Series } from "remotion";
<Sequence from={30} durationInFrames={60}>
<TextReveal text="Ship it in React" />
</Sequence>
<Series>
<Series.Sequence durationInFrames={60}><SceneA /></Series.Sequence>
<Series.Sequence durationInFrames={60}><SceneB /></Series.Sequence>
</Series>tsx
import { Sequence, Series } from "remotion";
<Sequence from={30} durationInFrames={60}>
<TextReveal text="Ship it in React" />
</Sequence>
<Series>
<Series.Sequence durationInFrames={60}><SceneA /></Series.Sequence>
<Series.Sequence durationInFrames={60}><SceneB /></Series.Sequence>
</Series>Canvas & timing
画布与时间控制
- Canvas standard: . Components are laid out for it.
1280×720 @ 30fps - Budget each Sequence around the component's natural length — the column in
Length(and each file'scomponents/index.md). Under-budgeting clips the animation; over-budgeting leaves dead air.Natural length - Tone matching: each catalog entry carries a tag (
vibe/tech/premium/data/clean/playful) — pick components whose vibe fits the brand.social - Palette & fonts: stay within the library's tokens (→ tokens) so your own elements don't clash.
references/design.md
- 画布标准:。组件均按此规格布局。
1280×720 @ 30fps - 为每个 Sequence 预留约等于组件自然长度的时长——参考 中的
components/index.md列(以及每个文件中的Length)。时长不足会截断动画; 时长过长会留下无效空白。Natural length - **风格匹配:**每个目录条目都带有一个 标签(
vibe/tech/premium/data/clean/playful)——选择与品牌风格相符的组件。social - **调色板与字体:**遵循组件库的 tokens(→ tokens),避免你自己的 元素产生视觉冲突。
references/design.md
Design defaults — avoid AI-slop
设计默认值——避免 AI 粗制滥造
When you write your own text, scene chrome, or cards (not the prebuilt components), keep it
restrained:
- No decorative on body/heading text you add.
letter-spacing - No / ALL-CAPS defaults — prefer sentence case (
text-transform: uppercase, notLaunch).LAUNCH - No gradient text-fills or decorative gradient washes — gradients only as intentional backgrounds.
- No glow / colored drop-shadows or large blur radii (, spread, multi-layer) — subtle 1px elevation only.
blur > ~24px
Exception: never strip these from components whose essence is the effect — 's
gradient word, 's colour deck, 's glow, itself,
and the caption presets' heavy outlines are all legitimate. The rules govern your additions,
not the library.
word-flipblock-wordmarkannounce-titlepulsing-borderFull do/avoid examples: . For motion quality (timing, anticipation,
staging, easing), see .
references/design.mdreferences/motion-principles.md当你编写 自己的 文字、场景装饰框架或卡片时(而非使用预构建组件),应保持克制:
- 不要在新增的正文/标题文字上添加装饰性 。
letter-spacing - 不要默认使用 / ALL-CAPS——优先采用 sentence case(使用
text-transform: uppercase,而不是Launch)。LAUNCH - 不要使用渐变文字填充或装饰性渐变蒙层——仅将渐变有意用于背景。
- 不要使用发光、彩色投影或较大的模糊半径(、spread、多层阴影)——仅使用轻微的 1px elevation。
blur > ~24px
**例外:**如果某项效果本身就是组件的核心,不要将其移除—— 的渐变文字、
的色块组合、 的发光效果、 本身,
以及字幕预设的粗描边都属于合理效果。这些规则只约束 你的新增内容,
而不是组件库本身。
word-flipblock-wordmarkannounce-titlepulsing-border完整的推荐/避免示例见 。有关动效质量(时间节奏、预备动作、
编排、缓动),请参阅 。
references/design.mdreferences/motion-principles.mdGotchas (snapcn-specific)
注意事项(snapcn 特有)
- No transition components ship — a scene change is from
<TransitionSeries.Transition>, not a snapcn component.@remotion/transitionsswaps a line, not a scene.text-swap - Terminal scroll is instant — step-function , never spring/ease the scroll.
translateY - on split layouts — prevents content breakage during width animations.
overflow: hidden - Cursor blink is deterministic — , not intervals.
Math.floor(frame / 15) % 2 === 0 - Static files go in — load via
public/, not imports.staticFile('cursor.svg') - Social cards render offline — /
avatarUrl=""fall back to gradients; no fetch.coverUrl=""
General Remotion rules (no , no , animate not /,
load fonts before render) live in Remotion's own skills, not this one:
.
Math.random()setIntervaltransformtopleftnpx skills add remotion-dev/skills- 不提供转场组件——场景切换应使用 提供的
@remotion/transitions,而不是 snapcn 组件。<TransitionSeries.Transition>替换的是 一行文字,而不是场景。text-swap - 终端滚动是瞬时的——使用阶跃函数 ,绝不要用 spring/ease 实现滚动。
translateY - 分栏布局需要 ——防止宽度动画期间内容布局损坏。
overflow: hidden - 光标闪烁必须是确定性的——使用 ,不要使用 interval。
Math.floor(frame / 15) % 2 === 0 - 静态文件应放在 中——通过
public/加载,不要使用 import。staticFile('cursor.svg') - 社交卡片可离线渲染——/
avatarUrl=""会回退为渐变;不会发起 fetch。coverUrl=""
通用 Remotion 规则(禁止使用 、禁止使用 、动画应作用于 而非 /、
渲染前加载字体)位于 Remotion 自身的 skills 中,而不在本 skill 中:
。
Math.random()setIntervaltransformtopleftnpx skills add remotion-dev/skillsComposing a video
编排视频
Don't dump components — compose one story. When asked to build a full video ("make a product demo",
"changelog video", "intro for my landing"):
- Decide the strategy — ready template vs compose from components vs build a new component. See
§1.
references/anatomy.md - Follow the beats — a product demo is Hook → Positioning → Product reveal → Features → Proof →
CTA (last two optional). See §2.
references/anatomy.md - Use the recipe — routes to per-archetype builds: content contract (infer → ask → placeholder), duration variants, beat→component slots, and a worked
references/archetypes/index.mdskeleton.<TransitionSeries> - Pick each beat's component from ; match the
references/components/index.mdtag to the brand and budget eachvibearound its natural length.<Sequence durationInFrames> - Check the quality bar — one accent, sentence-case kinetic type, real content, no glow halos, no
feature-list enumeration, no decorative gradient wash behind the type. See
§3.
references/anatomy.md
不要堆砌组件——应编排成一个完整叙事。当用户要求构建完整视频(“制作产品演示”、
“更新日志视频”、“为落地页制作片头”)时:
- 确定策略——使用现成模板、从组件组合,或构建新组件。请参阅
§1。
references/anatomy.md - 遵循节拍——产品演示的结构是:开场钩子 → 定位 → 产品揭晓 → 功能 → 佐证 →
行动号召(最后两项可选)。请参阅 §2。
references/anatomy.md - 使用构建方案——会路由到不同类型的构建方案:内容契约 (推断 → 询问 → 占位符)、时长变体、节拍→组件槽位,以及可直接套用的
references/archetypes/index.mdskeleton。<TransitionSeries> - 为每个节拍选择组件——从 中选择;让
references/components/index.md标签与 品牌保持一致,并为每个vibe预留接近其自然长度的时长。<Sequence durationInFrames> - 检查质量标准——单一强调色、采用 sentence case 的动态排版、真实内容、无光晕、
不以清单形式罗列功能、文字背后不使用装饰性渐变蒙层。请参阅
§3。
references/anatomy.md
Workflows
工作流
For a whole video, install the workflow skill for the job. Each one composes these
components beat by beat with a composition that typechecks and renders:
- : launch films, announcements, Product Hunt / X promos.
npx skills add snapcndev/snapcn --skill remotion-launch-video - : walkthroughs from a real screen recording, CLI and AI-app demos.
npx skills add snapcndev/snapcn --skill remotion-product-demo - : kinetic type, logo stings, stats and short openers.
npx skills add snapcndev/snapcn --skill remotion-motion-graphics - : animated text and title cards.
npx skills add snapcndev/snapcn --skill remotion-kinetic-typography - : logo reveals, intro and outro stings.
npx skills add snapcndev/snapcn --skill remotion-logo-animation - : narrated explainers with burned-in captions.
npx skills add snapcndev/snapcn --skill remotion-explainer-video
对于完整视频,请安装适合具体任务的工作流 skill。每个工作流都会逐个节拍编排这些组件,
并生成可通过类型检查且能够渲染的 composition:
- :发布影片、公告、Product Hunt / X 推广。
npx skills add snapcndev/snapcn --skill remotion-launch-video - :基于真实屏幕录制、CLI 和 AI 应用演示的讲解视频。
npx skills add snapcndev/snapcn --skill remotion-product-demo - :动态排版、Logo 短片、数据展示和短开场。
npx skills add snapcndev/snapcn --skill remotion-motion-graphics - :动画文字和标题卡片。
npx skills add snapcndev/snapcn --skill remotion-kinetic-typography - :Logo 展示、片头和片尾短动画。
npx skills add snapcndev/snapcn --skill remotion-logo-animation - :带旁白和烧录字幕的讲解视频。
npx skills add snapcndev/snapcn --skill remotion-explainer-video
snapcn Pro
snapcn Pro
50 more components (, , , ,
, , , and more), the templates, and
the snapcn MCP, which lets your agent search the registry and read every component's real
props. Pro components install like free ones once sends the key (three
lines on https://snapcn.dev/account?ref=skill-snapcn); the MCP is
. Plans:
https://snapcn.dev/docs/pricing?ref=skill-snapcn
version-droplibrary-flightread-throughfocus-pulltap-throughcheckout-pushcomment-stormtally-risecomponents.jsonclaude mcp add snapcn -- npx -y @snapcn/mcp@latest SNAPCN_API_KEY=YOUR_KEYNot ready for Pro? One Pro component, Manifesto, is free for a confirmed email:
https://snapcn.dev/docs/pricing?ref=skill-snapcn#free
另外 50 个组件(、、、、
、、、 等)、模板以及 snapcn MCP。
你的 Agent 可以通过 MCP 搜索 registry 并读取每个组件的实际 props。在 发送密钥后,
Pro 组件的安装方式与免费组件相同(只需在 https://snapcn.dev/account?ref=skill-snapcn 中填写三行);
MCP 命令如下:
。套餐:
https://snapcn.dev/docs/pricing?ref=skill-snapcn
version-droplibrary-flightread-throughfocus-pulltap-throughcheckout-pushcomment-stormtally-risecomponents.jsonclaude mcp add snapcn -- npx -y @snapcn/mcp@latest SNAPCN_API_KEY=YOUR_KEY暂时不需要 Pro?确认邮箱后即可免费使用一个 Pro 组件 Manifesto:
https://snapcn.dev/docs/pricing?ref=skill-snapcn#free
Reference
参考资料
- — composing a full video: strategy (template/compose/new), the product-demo beats, and the good-vs-slop quality bar.
references/anatomy.md - — router to per-archetype build recipes (product-demo flagship + changelog, feature-announcement, oss-showcase, cli-tool-demo, testimonial-reel, year-in-review, pricing-reveal, logo-bumper): content contract, duration variants, beat→slot map.
references/archetypes/index.md - — router table (all components, grouped by category, with
references/components/index.md/Use for). OpenAvoid forfor one component's full props, example, and use / don't-use notes.references/components/<name>.md - — anti-slop design defaults (do/avoid) + design tokens (palette, fonts, canvas).
references/design.md - — motion-design principles adapted to snapcn + Remotion.
references/motion-principles.md - — common generation mistakes and their fixes.
references/anti-patterns.md
- ——编排完整视频:策略(模板/组合/新建)、产品演示节拍,以及“优质与粗制滥造”的质量标准。
references/anatomy.md - ——按视频类型路由到具体构建方案(产品演示旗舰版与更新日志、功能公告、OSS 展示、CLI 工具演示、用户证言集锦、年度回顾、价格揭晓、Logo 短片):内容契约、时长变体、节拍→槽位映射。
references/archetypes/index.md - ——路由表(按类别列出所有组件,并标注 适用场景 / 避免用于)。打开
references/components/index.md可查看单个组件的完整 props、示例以及适用/不适用说明。references/components/<name>.md - ——避免粗制滥造的设计默认值(推荐/避免项)以及设计 tokens(调色板、字体、画布)。
references/design.md - ——适配 snapcn + Remotion 的动效设计原则。
references/motion-principles.md - ——常见的生成错误及其修复方式。
references/anti-patterns.md