Skip to content

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

feat: zoom-blur transition

dev_wandry85f7cc994282
diff --git a/components/docs/examples/zoom-blur-example.tsx b/components/docs/examples/zoom-blur-example.tsx
new file mode 100644
index 00000000..4fdcc23c
--- /dev/null
+++ b/components/docs/examples/zoom-blur-example.tsx
@@ -0,0 +1,76 @@
+"use client";
+
+import { linearTiming, TransitionSeries } from "@remotion/transitions";
+import { AbsoluteFill } from "remotion";
+import { zoomBlur } from "@/registry/remocn/zoom-blur";
+
+const FONT_FAMILY =
+ "var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif";
+
+function Scene({ label, background }: { label: string; background: string }) {
+ return (
+ <AbsoluteFill
+ style={{
+ background,
+ alignItems: "center",
+ justifyContent: "center",
+ }}
+ >
+ <span
+ style={{
+ fontFamily: FONT_FAMILY,
+ fontSize: 96,
+ fontWeight: 600,
+ letterSpacing: "-0.03em",
+ color: "#f2f2f2",
+ }}
+ >
+ {label}
+ </span>
+ </AbsoluteFill>
+ );
+}
+
+interface ZoomBlurExampleProps {
+ blur?: number;
+ rise?: number;
+}
+
+export function ZoomBlurExampleScene({ blur, rise }: ZoomBlurExampleProps) {
+ return (
+ <TransitionSeries>
+ <TransitionSeries.Sequence durationInFrames={70}>
+ <Scene label="Scene A" background="#141318" />
+ </TransitionSeries.Sequence>
+ <TransitionSeries.Transition
+ timing={linearTiming({ durationInFrames: 18 })}
+ presentation={zoomBlur({ blur, rise })}
+ />
+ <TransitionSeries.Sequence durationInFrames={70}>
+ <Scene label="Zoom Blur" background="#1a1922" />
+ </TransitionSeries.Sequence>
+ </TransitionSeries>
+ );
+}
+
+export const zoomBlurExampleCode = (values: Record<string, unknown>): string => {
+ const blur = (values.blur as number) ?? 16;
+ const rise = (values.rise as number) ?? 0;
+ return `import { TransitionSeries, linearTiming } from "@remotion/transitions";
+import { zoomBlur } from "@/components/remocn/zoom-blur";
+
+export const MyVideo = () => (
+ <TransitionSeries>
+ <TransitionSeries.Sequence durationInFrames={70}>
+ <SceneA />
+ </TransitionSeries.Sequence>
+ <TransitionSeries.Transition
+ timing={linearTiming({ durationInFrames: 18 })}
+ presentation={zoomBlur({ blur: ${blur}, rise: ${rise} })}
+ />
+ <TransitionSeries.Sequence durationInFrames={70}>
+ <SceneB />
+ </TransitionSeries.Sequence>
+ </TransitionSeries>
+);`;
+};
diff --git a/config/site.ts b/config/site.ts
index 89d7fe2e..6ab72d21 100644
--- a/config/site.ts
+++ b/config/site.ts
@@ -64,6 +64,7 @@ export const NEW_BADGE_PATHS = new Set<string>([
"/docs/transitions/whip-pan",
"/docs/transitions/push-through",
"/docs/transitions/focus-pull",
+ "/docs/transitions/zoom-blur",
]);
export const FOOTER_NAV: NavLink[] = [
diff --git a/content/docs/components.mdx b/content/docs/components.mdx
index dd2c438d..757b868b 100644
--- a/content/docs/components.mdx
+++ b/content/docs/components.mdx
@@ -361,6 +361,12 @@ Scene transitions, camera moves, and stylized wipes.
status: "stable",
href: "/docs/transitions/focus-pull",
},
+ {
+ name: "ZoomBlur",
+ description: "Push the outgoing scene through the viewer while the incoming one resolves out of blur",
+ status: "stable",
+ href: "/docs/transitions/zoom-blur",
+ },
]}
/>
diff --git a/content/docs/transitions/index.mdx b/content/docs/transitions/index.mdx
index 44997804..7440e35b 100644
--- a/content/docs/transitions/index.mdx
+++ b/content/docs/transitions/index.mdx
@@ -29,6 +29,12 @@ Pure CSS-transform physics, no dependencies beyond Remotion.
status: "stable",
href: "/docs/transitions/focus-pull",
},
+ {
+ name: "ZoomBlur",
+ description: "Push the outgoing scene through the viewer while the incoming one resolves out of blur",
+ status: "stable",
+ href: "/docs/transitions/zoom-blur",
+ },
]}
/>
diff --git a/content/docs/transitions/meta.json b/content/docs/transitions/meta.json
index d32b149c..061f16c9 100644
--- a/content/docs/transitions/meta.json
+++ b/content/docs/transitions/meta.json
@@ -13,6 +13,7 @@
"smoke-dissolve",
"whip-pan",
"push-through",
- "focus-pull"
+ "focus-pull",
+ "zoom-blur"
]
}
diff --git a/content/docs/transitions/zoom-blur.mdx b/content/docs/transitions/zoom-blur.mdx
new file mode 100644
index 00000000..8692c0da
--- /dev/null
+++ b/content/docs/transitions/zoom-blur.mdx
@@ -0,0 +1,66 @@
+---
+title: Zoom Blur
+description: Push the outgoing scene through the viewer while the incoming one resolves out of blur
+---
+
+<ComponentPreview name="zoom-blur" />
+
+## Installation
+
+<InstallBlock name="zoom-blur" />
+
+## Usage
+
+`zoomBlur()` is a Remotion transition presentation. Pass it to a
+`TransitionSeries.Transition` between two sequences. The outgoing scene scales
+past the viewer into blur while the incoming one resolves out of blur, riding
+a soft opacity crossfade — a depth punch-in. The presentation applies no
+internal easing, so the character comes entirely from the timing function.
+`linearTiming({ durationInFrames: 18 })` is the recommended default, and
+`springTiming` gives it a springy character. `rise` adds a vertical pickup to
+the move.
+
+```tsx
+import { TransitionSeries, linearTiming } from "@remotion/transitions";
+import { zoomBlur } from "@/components/remocn/zoom-blur";
+
+export const MyVideo = () => (
+ <TransitionSeries>
+ <TransitionSeries.Sequence durationInFrames={70}>
+ <SceneA />
+ </TransitionSeries.Sequence>
+ <TransitionSeries.Transition
+ timing={linearTiming({ durationInFrames: 18 })}
+ presentation={zoomBlur()}
+ />
+ <TransitionSeries.Sequence durationInFrames={70}>
+ <SceneB />
+ </TransitionSeries.Sequence>
+ </TransitionSeries>
+);
+```
+
+`push-through` is a scale push without the blur crossfade — reach for
+`zoomBlur` when the cut should feel like a depth punch-in.
+
+## Props
+
+`zoomBlur(props)` accepts:
+
+<PropsTable
+ rows={[
+ {
+ name: "blur",
+ type: "number",
+ default: "16",
+ description: "Peak blur in pixels at the edges of the transition.",
+ },
+ {
+ name: "rise",
+ type: "number",
+ default: "0",
+ description:
+ "Vertical pickup in pixels. The incoming scene rises into place while the outgoing one lifts away. 0 keeps the move purely depth-based.",
+ },
+ ]}
+/>
diff --git a/registry/__index__.tsx b/registry/__index__.tsx
index 7ec36b92..b86a73a0 100644
--- a/registry/__index__.tsx
+++ b/registry/__index__.tsx
@@ -90,6 +90,7 @@ import { waveWipeConfig } from "@/registry/remocn/wave-wipe/config";
import { whipPanConfig } from "@/registry/remocn/whip-pan/config";
import { xFollowCardConfig } from "@/registry/remocn/x-follow-card/config";
import { xFollowersOverviewConfig } from "@/registry/remocn/x-followers-overview/config";
+import { zoomBlurConfig } from "@/registry/remocn/zoom-blur/config";
import { accordionConfig } from "@/registry/remocn-ui/accordion/config";
import { alertDialogConfig } from "@/registry/remocn-ui/alert-dialog/config";
import { blurInConfig } from "@/registry/remocn-ui/blur-in/config";
@@ -588,6 +589,13 @@ const registry: Record<string, RegistryEntry> = {
})),
config: focusPullConfig,
},
+ "zoom-blur": {
+ load: () =>
+ import("@/components/docs/examples/zoom-blur-example").then((m) => ({
+ default: m.ZoomBlurExampleScene,
+ })),
+ config: zoomBlurConfig,
+ },
"warp-dissolve": {
load: () =>
import("@/components/docs/examples/warp-dissolve-example").then((m) => ({
diff --git a/registry/remocn/registry.json b/registry/remocn/registry.json
index c1250ed7..2eefe797 100644
--- a/registry/remocn/registry.json
+++ b/registry/remocn/registry.json
@@ -866,6 +866,20 @@
}
]
},
+ {
+ "name": "zoom-blur",
+ "type": "registry:component",
+ "title": "Zoom Blur",
+ "description": "A depth punch-in transition that pushes the outgoing scene through the viewer while the incoming one resolves out of blur.",
+ "dependencies": ["remotion", "@remotion/transitions"],
+ "files": [
+ {
+ "path": "zoom-blur/index.tsx",
+ "type": "registry:component",
+ "target": "components/remocn/zoom-blur.tsx"
+ }
+ ]
+ },
{
"name": "chat-to-preview-layout",
"type": "registry:component",
diff --git a/registry/remocn/zoom-blur/config.ts b/registry/remocn/zoom-blur/config.ts
new file mode 100644
index 00000000..1c96e0ba
--- /dev/null
+++ b/registry/remocn/zoom-blur/config.ts
@@ -0,0 +1,31 @@
+import { zoomBlurExampleCode } from "@/components/docs/examples/zoom-blur-example";
+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";
+
+export const zoomBlurConfig: ComponentConfig = {
+ componentName: "zoomBlur",
+ importPath: "@/components/remocn/zoom-blur",
+ controls: {
+ blur: {
+ type: "number",
+ default: 16,
+ min: 0,
+ max: 40,
+ step: 2,
+ label: "Blur",
+ },
+ rise: {
+ type: "number",
+ default: 0,
+ min: 0,
+ max: 160,
+ step: 10,
+ label: "Rise",
+ },
+ },
+ durationInFrames: 114,
+ fps: FPS,
+ compositionWidth: W,
+ compositionHeight: H,
+ previewBackdrop: { type: "color", value: "#141318" },
+ snippet: zoomBlurExampleCode,
+};
diff --git a/registry/remocn/zoom-blur/index.tsx b/registry/remocn/zoom-blur/index.tsx
new file mode 100644
index 00000000..7592e859
--- /dev/null
+++ b/registry/remocn/zoom-blur/index.tsx
@@ -0,0 +1,53 @@
+"use client";
+
+import type {
+ TransitionPresentation,
+ TransitionPresentationComponentProps,
+} from "@remotion/transitions";
+import type React from "react";
+import { AbsoluteFill } from "remotion";
+
+export type ZoomBlurProps = {
+ blur?: number;
+ rise?: number;
+};
+
+const ZoomBlurPresentation: React.FC<
+ TransitionPresentationComponentProps<ZoomBlurProps>
+> = ({
+ children,
+ presentationProgress,
+ presentationDirection,
+ passedProps,
+}) => {
+ const { blur = 16, rise = 0 } = passedProps;
+ const entering = presentationDirection === "entering";
+ const p = presentationProgress;
+
+ const style: React.CSSProperties = entering
+ ? {
+ opacity: p,
+ transform: `scale(${0.9 + p * 0.1})${
+ rise > 0 ? ` translateY(${(1 - p) * rise}px)` : ""
+ }`,
+ filter: p < 1 ? `blur(${(1 - p) * blur}px)` : undefined,
+ }
+ : {
+ opacity: 1 - p,
+ transform: `scale(${1 + p * 0.12})${
+ rise > 0 ? ` translateY(${-p * rise}px)` : ""
+ }`,
+ filter: p > 0 ? `blur(${p * blur}px)` : undefined,
+ };
+
+ return <AbsoluteFill style={style}>{children}</AbsoluteFill>;
+};
+
+export function zoomBlur(
+ props: ZoomBlurProps = {},
+): TransitionPresentation<ZoomBlurProps> {
+ return {
+ component: ZoomBlurPresentation,
+ props,
+ };
+}