Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
feat: added swirl, dither shaders transition
dev_wandry6c5be0aa0576
diff --git a/components/docs/examples/dither-dissolve-example.tsx b/components/docs/examples/dither-dissolve-example.tsxnew file mode 100644index 00000000..4e396e1c--- /dev/null+++ b/components/docs/examples/dither-dissolve-example.tsx@@ -0,0 +1,87 @@+"use client";++import { AbsoluteFill } from "remotion";+import { TransitionSeries, linearTiming } from "@remotion/transitions";+import { ditherDissolve } from "@/registry/remocn/dither-dissolve";++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 DitherDissolveExampleProps {+ shape?: "simplex" | "warp" | "dots" | "wave" | "ripple" | "swirl" | "sphere";+ colorBack?: string;+ colorFront?: string;+ speed?: number;+}++export function DitherDissolveExampleScene({+ shape,+ colorBack,+ colorFront,+ speed,+}: DitherDissolveExampleProps) {+ return (+ <TransitionSeries>+ <TransitionSeries.Sequence durationInFrames={70}>+ <Scene label="Scene A" background="#141318" />+ </TransitionSeries.Sequence>+ <TransitionSeries.Transition+ timing={linearTiming({ durationInFrames: 40 })}+ presentation={ditherDissolve({ shape, colorBack, colorFront, speed })}+ />+ <TransitionSeries.Sequence durationInFrames={70}>+ <Scene label="Scene B" background="#1a1922" />+ </TransitionSeries.Sequence>+ </TransitionSeries>+ );+}++export const ditherDissolveExampleCode = (+ values: Record<string, unknown>,+): string => {+ const shape = (values.shape as string) ?? "simplex";+ const colorBack = (values.colorBack as string) ?? "#141318";+ const colorFront = (values.colorFront as string) ?? "#8f88ae";+ const speed = (values.speed as number) ?? 1.5;+ return `import { TransitionSeries, linearTiming } from "@remotion/transitions";+import { ditherDissolve } from "@/components/remocn/dither-dissolve";++export const MyVideo = () => (+ <TransitionSeries>+ <TransitionSeries.Sequence durationInFrames={70}>+ <SceneA />+ </TransitionSeries.Sequence>+ <TransitionSeries.Transition+ timing={linearTiming({ durationInFrames: 40 })}+ presentation={ditherDissolve({ shape: "${shape}", colorBack: "${colorBack}", colorFront: "${colorFront}", speed: ${speed} })}+ />+ <TransitionSeries.Sequence durationInFrames={70}>+ <SceneB />+ </TransitionSeries.Sequence>+ </TransitionSeries>+);`;+};diff --git a/components/docs/examples/swirl-dissolve-example.tsx b/components/docs/examples/swirl-dissolve-example.tsxnew file mode 100644index 00000000..68661f9c--- /dev/null+++ b/components/docs/examples/swirl-dissolve-example.tsx@@ -0,0 +1,87 @@+"use client";++import { AbsoluteFill } from "remotion";+import { TransitionSeries, linearTiming } from "@remotion/transitions";+import { swirlDissolve } from "@/registry/remocn/swirl-dissolve";++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 SwirlDissolveExampleProps {+ bandCount?: number;+ softness?: number;+ colorBack?: string;+ speed?: number;+}++export function SwirlDissolveExampleScene({+ bandCount,+ softness,+ colorBack,+ speed,+}: SwirlDissolveExampleProps) {+ return (+ <TransitionSeries>+ <TransitionSeries.Sequence durationInFrames={110}>+ <Scene label="Scene A" background="#141318" />+ </TransitionSeries.Sequence>+ <TransitionSeries.Transition+ timing={linearTiming({ durationInFrames: 104 })}+ presentation={swirlDissolve({ bandCount, softness, colorBack, speed })}+ />+ <TransitionSeries.Sequence durationInFrames={110}>+ <Scene label="Scene B" background="#1a1922" />+ </TransitionSeries.Sequence>+ </TransitionSeries>+ );+}++export const swirlDissolveExampleCode = (+ values: Record<string, unknown>,+): string => {+ const bandCount = (values.bandCount as number) ?? 10;+ const softness = (values.softness as number) ?? 0.35;+ const colorBack = (values.colorBack as string) ?? "#141318";+ const speed = (values.speed as number) ?? 1;+ return `import { TransitionSeries, linearTiming } from "@remotion/transitions";+import { swirlDissolve } from "@/components/remocn/swirl-dissolve";++export const MyVideo = () => (+ <TransitionSeries>+ <TransitionSeries.Sequence durationInFrames={110}>+ <SceneA />+ </TransitionSeries.Sequence>+ <TransitionSeries.Transition+ timing={linearTiming({ durationInFrames: 104 })}+ presentation={swirlDissolve({ bandCount: ${bandCount}, softness: ${softness}, colorBack: "${colorBack}", speed: ${speed} })}+ />+ <TransitionSeries.Sequence durationInFrames={110}>+ <SceneB />+ </TransitionSeries.Sequence>+ </TransitionSeries>+);`;+};diff --git a/config/site.ts b/config/site.tsindex c4d8714b..3bd82bc0 100644--- a/config/site.ts+++ b/config/site.ts@@ -53,31 +53,8 @@ export const NAV_LINKS: NavLink[] = [* tag another menu item — no component changes needed. See `withNewBadges`.*/export const NEW_BADGE_PATHS = new Set<string>([- "/docs/typography/number-wheel",- "/docs/typography/rolling-number",- "/docs/typography/soft-blur-in",- "/docs/typography/per-character-rise",- "/docs/typography/bottom-up-letters",- "/docs/typography/top-down-letters",- "/docs/typography/spring-scale-in",- "/docs/typography/micro-scale-fade",- "/docs/typography/scale-down-fade",- "/docs/typography/blur-out-up",- "/docs/typography/focus-blur-resolve",- "/docs/typography/line-by-line-slide",- "/docs/typography/mask-reveal-up",- "/docs/typography/per-word-crossfade",- "/docs/typography/fade-through",- "/docs/typography/shared-axis-y",- "/docs/typography/shared-axis-z",- "/docs/typography/short-slide-right",- "/docs/typography/kinetic-center-build",- "/docs/typography/short-slide-down",- "/docs/ui/components/message-bubble",- "/docs/ui/components/typing-indicator",- "/docs/ui/blocks/chat-flow",- "/docs/ui/blocks/telegram-chat-flow",- "/docs/ui/blocks/imessage-chat-flow",+ "/docs/transitions/swirl-dissolve",+ "/docs/transitions/dither-dissolve",]);export const FOOTER_NAV: NavLink[] = [diff --git a/content/docs/components.mdx b/content/docs/components.mdxindex 7ee81c05..3adc79d6 100644--- a/content/docs/components.mdx+++ b/content/docs/components.mdx@@ -396,6 +396,25 @@ Scene transitions, camera moves, and stylized wipes.]}/>+### Shader++<ComponentCardGrid+ items={[+ {+ name: "SwirlDissolve",+ description: "Unwind a swirl shader open and wind it shut to reveal the next scene",+ status: "stable",+ href: "/docs/transitions/swirl-dissolve",+ },+ {+ name: "DitherDissolve",+ description: "Dissolve one scene into the next through a drifting field of dither pixels",+ status: "stable",+ href: "/docs/transitions/dither-dissolve",+ },+ ]}+/>+## CompositionsFull scenes built by composing primitives and UI blocks.diff --git a/content/docs/transitions/dither-dissolve.mdx b/content/docs/transitions/dither-dissolve.mdxnew file mode 100644index 00000000..99a7a724--- /dev/null+++ b/content/docs/transitions/dither-dissolve.mdx@@ -0,0 +1,70 @@+---+title: Dither Dissolve+description: Dissolve one scene into the next through a drifting field of dither pixels+---++<ComponentPreview name="dither-dissolve" />++## Installation++<InstallBlock name="dither-dissolve" />++## Usage++`ditherDissolve()` is a Remotion transition presentation. Pass it to a+`TransitionSeries.Transition` between two sequences. It is content-agnostic —+the outgoing scene fades under the dither field while the incoming scene fades+in beneath it.++```tsx+import { TransitionSeries, linearTiming } from "@remotion/transitions";+import { ditherDissolve } from "@/components/remocn/dither-dissolve";++export const MyVideo = () => (+ <TransitionSeries>+ <TransitionSeries.Sequence durationInFrames={70}>+ <SceneA />+ </TransitionSeries.Sequence>+ <TransitionSeries.Transition+ timing={linearTiming({ durationInFrames: 40 })}+ presentation={ditherDissolve()}+ />+ <TransitionSeries.Sequence durationInFrames={70}>+ <SceneB />+ </TransitionSeries.Sequence>+ </TransitionSeries>+);+```++## Props++`ditherDissolve(props)` accepts:++<PropsTable+ rows={[+ {+ name: "colorBack",+ type: "string",+ default: '"#141318"',+ description: "Background color of the dither field.",+ },+ {+ name: "colorFront",+ type: "string",+ default: '"#8f88ae"',+ description: "Ink color of the dither pixels.",+ },+ {+ name: "shape",+ type: '"simplex" | "warp" | "dots" | "wave" | "ripple" | "swirl" | "sphere"',+ default: '"simplex"',+ description: "Pattern source driving the dither.",+ },+ {+ name: "speed",+ type: "number",+ default: "1.5",+ description: "Shader animation speed.",+ },+ ]}+/>diff --git a/content/docs/transitions/meta.json b/content/docs/transitions/meta.jsonindex d547a0eb..1dad5e7a 100644--- a/content/docs/transitions/meta.json+++ b/content/docs/transitions/meta.json@@ -8,6 +8,8 @@"spatial-push","frosted-glass-wipe","grid-pixelate-wipe",- "chromatic-aberration-wipe"+ "chromatic-aberration-wipe",+ "swirl-dissolve",+ "dither-dissolve"]}diff --git a/content/docs/transitions/swirl-dissolve.mdx b/content/docs/transitions/swirl-dissolve.mdxnew file mode 100644index 00000000..d55ee65a--- /dev/null+++ b/content/docs/transitions/swirl-dissolve.mdx@@ -0,0 +1,76 @@+---+title: Swirl Dissolve+description: Unwind a swirl shader open and wind it shut to reveal the next scene+---++<ComponentPreview name="swirl-dissolve" />++## Installation++<InstallBlock name="swirl-dissolve" />++## Usage++`swirlDissolve()` is a Remotion transition presentation. Pass it to a+`TransitionSeries.Transition` between two sequences. The incoming scene+resolves through the swirl as it winds shut, so give the transition enough+frames for the full open → hold → close motion (104 works well).++```tsx+import { TransitionSeries, linearTiming } from "@remotion/transitions";+import { swirlDissolve } from "@/components/remocn/swirl-dissolve";++export const MyVideo = () => (+ <TransitionSeries>+ <TransitionSeries.Sequence durationInFrames={110}>+ <SceneA />+ </TransitionSeries.Sequence>+ <TransitionSeries.Transition+ timing={linearTiming({ durationInFrames: 104 })}+ presentation={swirlDissolve()}+ />+ <TransitionSeries.Sequence durationInFrames={110}>+ <SceneB />+ </TransitionSeries.Sequence>+ </TransitionSeries>+);+```++## Props++`swirlDissolve(props)` accepts:++<PropsTable+ rows={[+ {+ name: "colors",+ type: "string[]",+ default: '["#1f1d29", "#413d56", "#8f88ae"]',+ description: "Swirl band colors.",+ },+ {+ name: "colorBack",+ type: "string",+ default: '"#141318"',+ description: "Solid color behind the swirl during the transition.",+ },+ {+ name: "bandCount",+ type: "number",+ default: "10",+ description: "Number of swirl bands.",+ },+ {+ name: "softness",+ type: "number",+ default: "0.35",+ description: "Edge softness of the bands.",+ },+ {+ name: "speed",+ type: "number",+ default: "1",+ description: "Shader animation speed.",+ },+ ]}+/>diff --git a/registry/__index__.tsx b/registry/__index__.tsxindex 08ed90ac..86d8a0b7 100644--- a/registry/__index__.tsx+++ b/registry/__index__.tsx@@ -47,6 +47,10 @@ import { DataFlowPipes } from "@/registry/remocn/data-flow-pipes";import { dataFlowPipesConfig } from "@/registry/remocn/data-flow-pipes/config";import { DirectionalWipe } from "@/registry/remocn/directional-wipe";import { directionalWipeConfig } from "@/registry/remocn/directional-wipe/config";+import { SwirlDissolveExampleScene } from "@/components/docs/examples/swirl-dissolve-example";+import { swirlDissolveConfig } from "@/registry/remocn/swirl-dissolve/config";+import { DitherDissolveExampleScene } from "@/components/docs/examples/dither-dissolve-example";+import { ditherDissolveConfig } from "@/registry/remocn/dither-dissolve/config";import { DynamicGrid } from "@/registry/remocn/dynamic-grid";import { dynamicGridConfig } from "@/registry/remocn/dynamic-grid/config";import { EcosystemConstellation } from "@/registry/remocn/ecosystem-constellation";@@ -425,6 +429,14 @@ const registry: Record<string, RegistryEntry> = {Component: DirectionalWipe,config: directionalWipeConfig,},+ "swirl-dissolve": {+ Component: SwirlDissolveExampleScene,+ config: swirlDissolveConfig,+ },+ "dither-dissolve": {+ Component: DitherDissolveExampleScene,+ config: ditherDissolveConfig,+ },"zoom-through-transition": {Component: ZoomThroughTransition,config: zoomThroughTransitionConfig,diff --git a/registry/remocn/dither-dissolve/config.ts b/registry/remocn/dither-dissolve/config.tsnew file mode 100644index 00000000..9d8dac31--- /dev/null+++ b/registry/remocn/dither-dissolve/config.ts@@ -0,0 +1,23 @@+import { ditherDissolveExampleCode } from "@/components/docs/examples/dither-dissolve-example";+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";++export const ditherDissolveConfig: ComponentConfig = {+ componentName: "ditherDissolve",+ importPath: "@/components/remocn/dither-dissolve",+ controls: {+ shape: {+ type: "select",+ default: "simplex",+ options: ["simplex", "warp", "dots", "wave", "ripple", "swirl", "sphere"],+ label: "Shape",+ },+ colorBack: { type: "color", default: "#141318", label: "Background" },+ colorFront: { type: "color", default: "#8f88ae", label: "Ink" },+ },+ durationInFrames: 100,+ fps: FPS,+ compositionWidth: W,+ compositionHeight: H,+ previewBackdrop: { type: "color", value: "#141318" },+ snippet: ditherDissolveExampleCode,+};diff --git a/registry/remocn/dither-dissolve/index.tsx b/registry/remocn/dither-dissolve/index.tsxnew file mode 100644index 00000000..dfea7324--- /dev/null+++ b/registry/remocn/dither-dissolve/index.tsx@@ -0,0 +1,82 @@+"use client";++import type React from "react";+import { AbsoluteFill, interpolate } from "remotion";+import type {+ TransitionPresentation,+ TransitionPresentationComponentProps,+} from "@remotion/transitions";+import { ShaderDithering } from "@/components/remocn/shader-dithering";++const clampOpts = {+ extrapolateLeft: "clamp" as const,+ extrapolateRight: "clamp" as const,+};++const coverEnvelope = (p: number) =>+ interpolate(p, [0, 0.3, 0.65, 1], [0, 1, 1, 0], clampOpts);++const coverChildOpacity = (p: number, entering: boolean) =>+ entering+ ? interpolate(p, [0.58, 0.66], [0, 1], clampOpts)+ : interpolate(p, [0.28, 0.36], [1, 0], clampOpts);++type DitherShape = NonNullable<+ React.ComponentProps<typeof ShaderDithering>["shape"]+>;++export type DitherDissolveProps = {+ colorBack?: string;+ colorFront?: string;+ shape?: DitherShape;+ speed?: number;+};++const DitherDissolvePresentation: React.FC<+ TransitionPresentationComponentProps<DitherDissolveProps>+> = ({+ children,+ presentationProgress,+ presentationDirection,+ passedProps,+}) => {+ const {+ colorBack = "#141318",+ colorFront = "#8f88ae",+ shape = "simplex",+ speed = 1.5,+ } = passedProps;+ const entering = presentationDirection === "entering";+ const p = presentationProgress;+ const size = interpolate(p, [0, 1], [1.6, 2.8], clampOpts);++ return (+ <AbsoluteFill>+ <AbsoluteFill style={{ opacity: coverChildOpacity(p, entering) }}>+ {children}+ </AbsoluteFill>+ {entering ? (+ <AbsoluteFill+ style={{ opacity: coverEnvelope(p), pointerEvents: "none" }}+ >+ <ShaderDithering+ speed={speed}+ colorBack={colorBack}+ colorFront={colorFront}+ shape={shape}+ size={size}+ />+ </AbsoluteFill>+ ) : null}+ </AbsoluteFill>+ );+};++export function ditherDissolve(+ props: DitherDissolveProps = {},+): TransitionPresentation<DitherDissolveProps> {+ return {+ component: DitherDissolvePresentation,+ props,+ };+}diff --git a/registry/remocn/registry.json b/registry/remocn/registry.jsonindex 136a473e..6bfab5c1 100644--- a/registry/remocn/registry.json+++ b/registry/remocn/registry.json@@ -823,6 +823,46 @@}]},+ {+ "name": "swirl-dissolve",+ "type": "registry:component",+ "title": "Swirl Dissolve",+ "description": "A swirl shader transition that unwinds open and winds shut to reveal the next scene.",+ "dependencies": [+ "remotion",+ "@remotion/transitions"+ ],+ "registryDependencies": [+ "@remocn/shader-swirl"+ ],+ "files": [+ {+ "path": "swirl-dissolve/index.tsx",+ "type": "registry:component",+ "target": "components/remocn/swirl-dissolve.tsx"+ }+ ]+ },+ {+ "name": "dither-dissolve",+ "type": "registry:component",+ "title": "Dither Dissolve",+ "description": "A dithering shader transition that dissolves one scene into the next.",+ "dependencies": [+ "remotion",+ "@remotion/transitions"+ ],+ "registryDependencies": [+ "@remocn/shader-dithering"+ ],+ "files": [+ {+ "path": "dither-dissolve/index.tsx",+ "type": "registry:component",+ "target": "components/remocn/dither-dissolve.tsx"+ }+ ]+ },{"name": "zoom-through-transition","type": "registry:component",diff --git a/registry/remocn/swirl-dissolve/config.ts b/registry/remocn/swirl-dissolve/config.tsnew file mode 100644index 00000000..c2cbd157--- /dev/null+++ b/registry/remocn/swirl-dissolve/config.ts@@ -0,0 +1,32 @@+import { swirlDissolveExampleCode } from "@/components/docs/examples/swirl-dissolve-example";+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";++export const swirlDissolveConfig: ComponentConfig = {+ componentName: "swirlDissolve",+ importPath: "@/components/remocn/swirl-dissolve",+ controls: {+ bandCount: {+ type: "number",+ default: 10,+ min: 1,+ max: 12,+ step: 1,+ label: "Bands",+ },+ softness: {+ type: "number",+ default: 0.35,+ min: 0,+ max: 1,+ step: 0.05,+ label: "Softness",+ },+ colorBack: { type: "color", default: "#141318", label: "Background" },+ },+ durationInFrames: 116,+ fps: FPS,+ compositionWidth: W,+ compositionHeight: H,+ previewBackdrop: { type: "color", value: "#141318" },+ snippet: swirlDissolveExampleCode,+};diff --git a/registry/remocn/swirl-dissolve/index.tsx b/registry/remocn/swirl-dissolve/index.tsxnew file mode 100644index 00000000..25e513d2--- /dev/null+++ b/registry/remocn/swirl-dissolve/index.tsx@@ -0,0 +1,86 @@+"use client";++import type React from "react";+import { AbsoluteFill, Easing, interpolate } from "remotion";+import type {+ TransitionPresentation,+ TransitionPresentationComponentProps,+} from "@remotion/transitions";+import { ShaderSwirl } from "@/components/remocn/shader-swirl";++const clampOpts = {+ extrapolateLeft: "clamp" as const,+ extrapolateRight: "clamp" as const,+};++const DEFAULT_COLORS = ["#1f1d29", "#413d56", "#8f88ae"];++export type SwirlDissolveProps = {+ colors?: string[];+ colorBack?: string;+ bandCount?: number;+ softness?: number;+ speed?: number;+};++const SwirlDissolvePresentation: React.FC<+ TransitionPresentationComponentProps<SwirlDissolveProps>+> = ({+ children,+ presentationProgress,+ presentationDirection,+ passedProps,+}) => {+ const {+ colors = DEFAULT_COLORS,+ colorBack = "#141318",+ bandCount = 10,+ softness = 0.35,+ speed = 1,+ } = passedProps;+ const entering = presentationDirection === "entering";+ const p = presentationProgress;++ const twist = interpolate(p, [0.1, 0.42, 0.64, 1], [1, 0, 0, 1], {+ ...clampOpts,+ easing: Easing.bezier(0.42, 0, 0.58, 1),+ });++ const childStyle: React.CSSProperties = entering+ ? {+ opacity: interpolate(p, [0.77, 0.87], [0, 1], clampOpts),+ transform: `scale(${interpolate(p, [0.77, 1], [0.3, 1], {+ ...clampOpts,+ easing: Easing.out(Easing.cubic),+ })})`,+ filter: `blur(${interpolate(p, [0.77, 0.93], [10, 0], clampOpts)}px)`,+ }+ : { opacity: interpolate(p, [0.06, 0.13], [1, 0], clampOpts) };++ return (+ <AbsoluteFill>+ {entering ? (+ <AbsoluteFill style={{ pointerEvents: "none" }}>+ <ShaderSwirl+ speed={speed}+ twist={twist}+ colors={colors}+ colorBack={colorBack}+ bandCount={bandCount}+ softness={softness}+ />+ </AbsoluteFill>+ ) : null}+ <AbsoluteFill style={childStyle}>{children}</AbsoluteFill>+ </AbsoluteFill>+ );+};++export function swirlDissolve(+ props: SwirlDissolveProps = {},+): TransitionPresentation<SwirlDissolveProps> {+ return {+ component: SwirlDissolvePresentation,+ props,+ };+}diff --git a/tsconfig.json b/tsconfig.jsonindex ca6fea9d..cb97109d 100644--- a/tsconfig.json+++ b/tsconfig.json@@ -112,6 +112,12 @@"@/components/remocn/dynamic-grid": ["./registry/remocn/dynamic-grid/index.tsx",],+ "@/components/remocn/shader-swirl": [+ "./registry/remocn/shader-swirl/index.tsx",+ ],+ "@/components/remocn/shader-dithering": [+ "./registry/remocn/shader-dithering/index.tsx",+ ],"@/components/remocn/*": ["./registry/remocn-ui/*/index.tsx"],"@/*": ["./*"],},