Skip to content

Production-ready animations, transitions, backgrounds, and scenes for Remotion

feat: added drift layout animation

dev_wandry246476264640
diff --git a/components/docs/examples/drift-example.tsx b/components/docs/examples/drift-example.tsx
new file mode 100644
index 00000000..59de0197
--- /dev/null
+++ b/components/docs/examples/drift-example.tsx
@@ -0,0 +1,113 @@
+"use client";
+
+import { AbsoluteFill } from "remotion";
+import { Drift } from "@/registry/remocn/drift";
+
+const FONT_FAMILY =
+ "var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif";
+
+function Stat({ value, label }: { value: string; label: string }) {
+ return (
+ <div>
+ <div
+ style={{
+ fontFamily: FONT_FAMILY,
+ fontSize: 32,
+ fontWeight: 600,
+ color: "#f2f2f2",
+ }}
+ >
+ {value}
+ </div>
+ <div
+ style={{
+ fontFamily: FONT_FAMILY,
+ fontSize: 16,
+ color: "#8a8794",
+ }}
+ >
+ {label}
+ </div>
+ </div>
+ );
+}
+
+function ReportCard() {
+ return (
+ <div
+ style={{
+ background: "#1a1922",
+ border: "1px solid rgba(255,255,255,0.08)",
+ borderRadius: 24,
+ padding: "48px 56px",
+ maxWidth: 720,
+ }}
+ >
+ <div
+ style={{
+ fontFamily: FONT_FAMILY,
+ fontSize: 56,
+ fontWeight: 600,
+ color: "#f2f2f2",
+ }}
+ >
+ Quarterly Report
+ </div>
+ <div
+ style={{
+ fontFamily: FONT_FAMILY,
+ fontSize: 24,
+ color: "#8a8794",
+ marginTop: 16,
+ }}
+ >
+ Revenue grew across every region this quarter.
+ </div>
+ <div
+ style={{
+ fontFamily: FONT_FAMILY,
+ fontSize: 24,
+ color: "#8a8794",
+ }}
+ >
+ Customer retention held steady above target.
+ </div>
+ <div
+ style={{
+ display: "flex",
+ gap: 40,
+ marginTop: 32,
+ }}
+ >
+ <Stat value="+18%" label="Revenue" />
+ <Stat value="94%" label="Retention" />
+ </div>
+ </div>
+ );
+}
+
+export function DriftExampleScene({ grow }: { grow?: number }) {
+ return (
+ <Drift grow={grow}>
+ <AbsoluteFill
+ style={{
+ alignItems: "center",
+ justifyContent: "center",
+ }}
+ >
+ <ReportCard />
+ </AbsoluteFill>
+ </Drift>
+ );
+}
+
+export const driftExampleCode = (values: Record<string, unknown>): string => {
+ const grow = (values.grow as number) ?? 0.035;
+ return `import { Drift } from "@/components/remocn/drift";
+
+export const MyScene = () => (
+ <Drift grow={${grow}}>
+ <YourScene />
+ </Drift>
+);`;
+};
diff --git a/config/site.ts b/config/site.ts
index 6ab72d21..17606f69 100644
--- a/config/site.ts
+++ b/config/site.ts
@@ -65,6 +65,7 @@ export const NEW_BADGE_PATHS = new Set<string>([
"/docs/transitions/push-through",
"/docs/transitions/focus-pull",
"/docs/transitions/zoom-blur",
+ "/docs/layout/drift",
]);
export const FOOTER_NAV: NavLink[] = [
diff --git a/content/docs/components.mdx b/content/docs/components.mdx
index 757b868b..00d43e18 100644
--- a/content/docs/components.mdx
+++ b/content/docs/components.mdx
@@ -5,6 +5,27 @@ description: Every component in remocn, grouped by category
A complete index of every component in remocn. Browse by category or jump straight to the one you need.
+## Layout
+
+Scene scaffolding — backgrounds and camera wrappers.
+
+<ComponentCardGrid
+ items={[
+ {
+ name: "Backdrop",
+ description: "Full-frame fill with an optional rounded, shadowed content frame for any scene",
+ status: "stable",
+ href: "/docs/layout/backdrop",
+ },
+ {
+ name: "Drift",
+ description: "Wrap any scene in a slow camera push-in so no frame is ever static",
+ status: "stable",
+ href: "/docs/layout/drift",
+ },
+ ]}
+/>
+
## Typography
Text effects, reveals, and kinetic type.
diff --git a/content/docs/layout/drift.mdx b/content/docs/layout/drift.mdx
new file mode 100644
index 00000000..52d5c656
--- /dev/null
+++ b/content/docs/layout/drift.mdx
@@ -0,0 +1,68 @@
+---
+title: Drift
+description: Wrap any scene in a slow camera push-in so no frame is ever static
+---
+
+<ComponentPreview name="drift" />
+
+## Installation
+
+<InstallBlock name="drift" />
+
+## Usage
+
+`Drift` wraps scene content in a constant-speed camera push-in, scaling it from `1` to `1 + grow` over the wrapping sequence's duration. The movement is linear on purpose — a constant creep that adds life to a scene without drawing attention to itself.
+
+`durationInFrames` comes from `useVideoConfig()`, which is Sequence-scoped. Inside a `TransitionSeries.Sequence`, the drift stretches exactly across that scene's own duration and peaks right at the cut. Put `Drift` inside the scene, under the transition, not around the whole series.
+
+A `grow` of `0.03` to `0.05` is the working range — beyond that it starts to read as a deliberate zoom rather than ambient motion. A negative `grow` turns it into a slow pull-back instead of a push-in.
+
+```tsx
+import { Drift } from "@/components/remocn/drift";
+
+export const MyScene = () => (
+ <Drift>
+ <YourScene />
+ </Drift>
+);
+```
+
+Inside a `TransitionSeries.Sequence`:
+
+```tsx
+import { TransitionSeries, linearTiming } from "@remotion/transitions";
+import { Drift } from "@/components/remocn/drift";
+import { zoomBlur } from "@/components/remocn/zoom-blur";
+
+export const MyVideo = () => (
+ <TransitionSeries>
+ <TransitionSeries.Sequence durationInFrames={90}>
+ <Drift>
+ <SceneA />
+ </Drift>
+ </TransitionSeries.Sequence>
+ <TransitionSeries.Transition
+ timing={linearTiming({ durationInFrames: 18 })}
+ presentation={zoomBlur()}
+ />
+ <TransitionSeries.Sequence durationInFrames={90}>
+ <Drift>
+ <SceneB />
+ </Drift>
+ </TransitionSeries.Sequence>
+ </TransitionSeries>
+);
+```
+
+## Props
+
+<PropsTable
+ rows={[
+ {
+ name: "grow",
+ type: "number",
+ default: "0.035",
+ description: "Scale gain reached at the end of the scene. 0.035 means the scene ends 3.5 percent larger. Negative values pull back instead.",
+ },
+ ]}
+/>
diff --git a/content/docs/layout/meta.json b/content/docs/layout/meta.json
index 2668cced..6b538281 100644
--- a/content/docs/layout/meta.json
+++ b/content/docs/layout/meta.json
@@ -1,5 +1,5 @@
{
"title": "Layout",
"collapsible": false,
- "pages": ["index", "backdrop"]
+ "pages": ["index", "backdrop", "drift"]
}
diff --git a/registry/__index__.tsx b/registry/__index__.tsx
index b86a73a0..735a3b99 100644
--- a/registry/__index__.tsx
+++ b/registry/__index__.tsx
@@ -13,6 +13,7 @@ import { claudeCodeConfig } from "@/registry/remocn/claude-code/config";
import { confettiConfig } from "@/registry/remocn/confetti/config";
import { dataFlowPipesConfig } from "@/registry/remocn/data-flow-pipes/config";
import { ditherDissolveConfig } from "@/registry/remocn/dither-dissolve/config";
+import { driftConfig } from "@/registry/remocn/drift/config";
import { dynamicGridConfig } from "@/registry/remocn/dynamic-grid/config";
import { ecosystemConstellationConfig } from "@/registry/remocn/ecosystem-constellation/config";
import { fadeThroughConfig } from "@/registry/remocn/fade-through/config";
@@ -729,6 +730,13 @@ const registry: Record<string, RegistryEntry> = {
})),
config: backdropConfig,
},
+ drift: {
+ load: () =>
+ import("@/components/docs/examples/drift-example").then((m) => ({
+ default: m.DriftExampleScene,
+ })),
+ config: driftConfig,
+ },
"claude-chat": {
load: () =>
import("@/registry/remocn/claude-chat").then((m) => ({
diff --git a/registry/remocn/drift/config.ts b/registry/remocn/drift/config.ts
new file mode 100644
index 00000000..743adfba
--- /dev/null
+++ b/registry/remocn/drift/config.ts
@@ -0,0 +1,23 @@
+import { driftExampleCode } from "@/components/docs/examples/drift-example";
+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";
+
+export const driftConfig: ComponentConfig = {
+ componentName: "Drift",
+ importPath: "@/components/remocn/drift",
+ controls: {
+ grow: {
+ type: "number",
+ default: 0.035,
+ min: -0.1,
+ max: 0.15,
+ step: 0.005,
+ label: "Grow",
+ },
+ },
+ durationInFrames: 90,
+ fps: FPS,
+ compositionWidth: W,
+ compositionHeight: H,
+ previewBackdrop: { type: "color", value: "#141318" },
+ snippet: driftExampleCode,
+};
diff --git a/registry/remocn/drift/index.tsx b/registry/remocn/drift/index.tsx
new file mode 100644
index 00000000..080a9898
--- /dev/null
+++ b/registry/remocn/drift/index.tsx
@@ -0,0 +1,20 @@
+"use client";
+
+import type React from "react";
+import { AbsoluteFill, interpolate, useCurrentFrame, useVideoConfig } from "remotion";
+
+export interface DriftProps {
+ children: React.ReactNode;
+ grow?: number;
+}
+
+export function Drift({ children, grow = 0.035 }: DriftProps) {
+ const frame = useCurrentFrame();
+ const { durationInFrames } = useVideoConfig();
+ const scale = interpolate(frame, [0, durationInFrames], [1, 1 + grow]);
+ return (
+ <AbsoluteFill style={{ transform: `scale(${scale})` }}>
+ {children}
+ </AbsoluteFill>
+ );
+}
diff --git a/registry/remocn/registry.json b/registry/remocn/registry.json
index 2eefe797..5a0125c8 100644
--- a/registry/remocn/registry.json
+++ b/registry/remocn/registry.json
@@ -1269,6 +1269,20 @@
}
]
},
+ {
+ "name": "drift",
+ "type": "registry:component",
+ "title": "Drift",
+ "description": "A slow linear camera push-in wrapper that scales its scene from 1 to 1+grow across the sequence so no frame is ever static.",
+ "dependencies": ["remotion"],
+ "files": [
+ {
+ "path": "drift/index.tsx",
+ "type": "registry:component",
+ "target": "components/remocn/drift.tsx"
+ }
+ ]
+ },
{
"name": "logo-enter",
"type": "registry:component",