Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
feat: short slide right
dev_wandry0e9fdd7b878d
diff --git a/content/docs/components.mdx b/content/docs/components.mdxindex 8be4a987..aa35410b 100644--- a/content/docs/components.mdx+++ b/content/docs/components.mdx@@ -207,6 +207,19 @@ Text effects, reveals, and kinetic type.]}/>+### Kinetic++<ComponentCardGrid+ items={[+ {+ name: "ShortSlideRight",+ description: "The whole phrase glides in from the left while words reveal in sequence",+ status: "stable",+ href: "/docs/typography/short-slide-right",+ },+ ]}+/>+## Environment & LightingBackgrounds, lighting, and atmosphere for your scenes.diff --git a/content/docs/typography/index.mdx b/content/docs/typography/index.mdxindex 3e7fcb86..f165e313 100644--- a/content/docs/typography/index.mdx+++ b/content/docs/typography/index.mdx@@ -204,3 +204,18 @@ Swap one phrase for another with motion.},]}/>++## Kinetic++Word-by-word builds with motion and momentum.++<ComponentCardGrid+ items={[+ {+ name: "ShortSlideRight",+ description: "The whole phrase glides in from the left while words reveal in sequence",+ status: "stable",+ href: "/docs/typography/short-slide-right",+ },+ ]}+/>diff --git a/content/docs/typography/meta.json b/content/docs/typography/meta.jsonindex c1bbc01d..ef462076 100644--- a/content/docs/typography/meta.json+++ b/content/docs/typography/meta.json@@ -17,6 +17,7 @@"fade-through","shared-axis-y","shared-axis-z",+ "short-slide-right","staggered-fade-up","mask-reveal-up","tracking-in",diff --git a/content/docs/typography/short-slide-right.mdx b/content/docs/typography/short-slide-right.mdxnew file mode 100644index 00000000..d22c6883--- /dev/null+++ b/content/docs/typography/short-slide-right.mdx@@ -0,0 +1,112 @@+---+title: Short Slide Right+description: The whole phrase glides in from the left while words reveal in sequence through opacity+---++<ComponentPreview name="short-slide-right" />++## Installation++<InstallBlock name="short-slide-right" />++## Usage++```tsx+// src/Root.tsx+import { Composition } from "remotion";+import { ShortSlideRight } from "@/components/remocn/short-slide-right";++const ShortSlideRightScene = () => (+ <ShortSlideRight text="Move with intent." distance={24} staggerDelay={3} />+);++export const RemotionRoot = () => (+ <Composition+ id="ShortSlideRight"+ component={ShortSlideRightScene}+ durationInFrames={60}+ fps={30}+ width={1280}+ height={720}+ />+);+```++The whole phrase shares one compact left-to-right slide while the words themselves reveal only through a staggered opacity cascade — motion stays controlled, the word order reads clearly.++### With Backdrop++The component renders transparent — supply the background via `Backdrop`. It ships single-theme; edit the copied file to re-theme colors.++Pair with `Backdrop` to place the text inside a full-frame fill with a rounded, shadowed content frame:++```tsx+import { Composition } from "remotion";+import { ShortSlideRight } from "@/components/remocn/short-slide-right";+import { Backdrop } from "@/components/remocn/backdrop";++const ShortSlideRightScene = () => (+ <Backdrop fill={{ type: "color", value: "#ffffff" }}>+ <ShortSlideRight text="Move with intent." distance={24} staggerDelay={3} />+ </Backdrop>+);++export const RemotionRoot = () => (+ <Composition+ id="ShortSlideRight"+ component={ShortSlideRightScene}+ durationInFrames={60}+ fps={30}+ width={1280}+ height={720}+ />+);+```++## Props++<PropsTable+ rows={[+ {+ name: "text",+ type: "string",+ required: true,+ description: "The text to reveal",+ },+ {+ name: "distance",+ type: "number",+ default: "24",+ description: "Horizontal slide distance in pixels the whole phrase travels from the left.",+ },+ {+ name: "staggerDelay",+ type: "number",+ default: "3",+ description: "Per-word delay in frames for the opacity reveal cascade.",+ },+ {+ name: "fontSize",+ type: "number",+ default: "72",+ description: "Font size in pixels",+ },+ {+ name: "fontWeight",+ type: "number",+ default: "600",+ description: "CSS font-weight",+ },+ {+ name: "color",+ type: "string",+ default: "\"#171717\"",+ description: "Text color (any valid CSS color)",+ },+ {+ name: "className",+ type: "string",+ description: "Optional className passed to the phrase container span",+ },+ ]}+/>diff --git a/registry/__index__.tsx b/registry/__index__.tsxindex 281a8bba..ff6f19f0 100644--- a/registry/__index__.tsx+++ b/registry/__index__.tsx@@ -35,6 +35,8 @@ import { SharedAxisY } from "@/registry/remocn/shared-axis-y";import { sharedAxisYConfig } from "@/registry/remocn/shared-axis-y/config";import { SharedAxisZ } from "@/registry/remocn/shared-axis-z";import { sharedAxisZConfig } from "@/registry/remocn/shared-axis-z/config";+import { ShortSlideRight } from "@/registry/remocn/short-slide-right";+import { shortSlideRightConfig } from "@/registry/remocn/short-slide-right/config";import { BrowserFlow } from "@/registry/remocn/browser-flow";import { browserFlowConfig } from "@/registry/remocn/browser-flow/config";import { ChatToPreviewLayout } from "@/registry/remocn/chat-to-preview-layout";@@ -232,6 +234,7 @@ const registry: Record<string, RegistryEntry> = {"fade-through": { Component: FadeThrough, config: fadeThroughConfig },"shared-axis-y": { Component: SharedAxisY, config: sharedAxisYConfig },"shared-axis-z": { Component: SharedAxisZ, config: sharedAxisZConfig },+ "short-slide-right": { Component: ShortSlideRight, config: shortSlideRightConfig },typewriter: { Component: Typewriter, config: typewriterConfig },"inline-highlight": {Component: InlineHighlight,diff --git a/registry/remocn/registry.json b/registry/remocn/registry.jsonindex 8005ba5b..0edc003f 100644--- a/registry/remocn/registry.json+++ b/registry/remocn/registry.json@@ -227,6 +227,22 @@}]},+ {+ "name": "short-slide-right",+ "type": "registry:component",+ "title": "Short Slide Right",+ "description": "The whole phrase glides in from the left as one compact move while words reveal in sequence through opacity.",+ "dependencies": [+ "remotion"+ ],+ "files": [+ {+ "path": "short-slide-right/index.tsx",+ "type": "registry:component",+ "target": "components/remocn/short-slide-right.tsx"+ }+ ]+ },{"name": "typewriter","type": "registry:component",diff --git a/registry/remocn/short-slide-right/config.ts b/registry/remocn/short-slide-right/config.tsnew file mode 100644index 00000000..d4ceb712--- /dev/null+++ b/registry/remocn/short-slide-right/config.ts@@ -0,0 +1,51 @@+import {+ type ComponentConfig,+ FONT_WEIGHT_OPTIONS,+ FPS,+ H,+ W,+} from "@/lib/customizer-config";++export const shortSlideRightConfig: ComponentConfig = {+ componentName: "ShortSlideRight",+ importPath: "@/components/remocn/short-slide-right",+ controls: {+ text: { type: "text", default: "Move with intent.", label: "Text" },+ distance: {+ type: "number",+ default: 24,+ min: 0,+ max: 120,+ step: 1,+ label: "Distance",+ },+ staggerDelay: {+ type: "number",+ default: 3,+ min: 0,+ max: 12,+ step: 1,+ label: "Stagger",+ },+ fontSize: {+ type: "number",+ default: 72,+ min: 12,+ max: 160,+ step: 1,+ label: "Font size",+ },+ color: { type: "color", default: "#171717", label: "Color" },+ fontWeight: {+ type: "select",+ default: "600",+ options: FONT_WEIGHT_OPTIONS,+ label: "Font weight",+ },+ },+ durationInFrames: 60,+ fps: FPS,+ compositionWidth: W,+ compositionHeight: H,+ previewBackdrop: { type: "color", value: "#ffffff" },+};diff --git a/registry/remocn/short-slide-right/index.tsx b/registry/remocn/short-slide-right/index.tsxnew file mode 100644index 00000000..b725cae6--- /dev/null+++ b/registry/remocn/short-slide-right/index.tsx@@ -0,0 +1,98 @@+"use client";++import { Easing, interpolate, useCurrentFrame } from "remotion";++export interface ShortSlideRightProps {+ text: string;+ distance?: number;+ staggerDelay?: number;+ fontSize?: number;+ color?: string;+ fontWeight?: number;+ speed?: number;+ className?: string;+}++export function ShortSlideRight({+ text,+ distance = 24,+ staggerDelay = 3,+ fontSize = 72,+ color = "#171717",+ fontWeight = 600,+ speed = 1,+ className,+}: ShortSlideRightProps) {+ const frame = useCurrentFrame() * speed;++ const words = text.split(" ");++ const enterDur = 16;+ const wordOpacityDur = 6;+ const easing = Easing.bezier(0.2, 0.8, 0.2, 1);++ const x = interpolate(frame, [0, enterDur], [-distance, 0], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing,+ });++ const blurVal = interpolate(frame, [0, enterDur], [1.2, 0], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing,+ });++ return (+ <div+ style={{+ position: "absolute",+ inset: 0,+ display: "flex",+ alignItems: "center",+ justifyContent: "center",+ background: "transparent",+ }}+ >+ <span+ className={className}+ style={{+ fontSize,+ fontWeight,+ color,+ letterSpacing: "-0.03em",+ fontFamily:+ "var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif",+ display: "inline-block",+ transform: `translateX(${x}px)`,+ filter: `blur(${blurVal}px)`,+ }}+ >+ {words.map((word, i) => {+ const opacity = interpolate(+ frame - i * staggerDelay,+ [0, wordOpacityDur],+ [0, 1],+ {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing,+ }+ );+ return (+ <span+ key={i}+ style={{+ display: "inline-block",+ marginRight: "0.25em",+ opacity,+ }}+ >+ {word}+ </span>+ );+ })}+ </span>+ </div>+ );+}