import React from "react";
import { useCurrentFrame, useVideoConfig, interpolate, spring, Sequence } from "remotion";
import * as contractModule from "./contract";
const palette: any = (contractModule as any).palette ?? (contractModule as any).default ?? {
background: "#101114",
foreground: "#F5F5F2",
accent: "#B8F36B",
secondary: "#78B9ED",
muted: "#B1B4BC",
};
export const BenchmarkVideo: React.FC = () => {
return (
);
};
const Background: React.FC = () => {
const frame = useCurrentFrame();
const drift = interpolate(frame, [0, 360], [0, 40], { extrapolateRight: "clamp" });
return (
{/* subtle grid */}
{/* accent glow */}
{/* vignette */}
);
};
const TopBar: React.FC = () => {
const frame = useCurrentFrame();
const opacity = interpolate(frame, [0, 15, 345, 360], [0, 1, 1, 0]);
return (
);
};
const BottomSafeLine: React.FC = () => {
const frame = useCurrentFrame();
const progress = interpolate(frame, [0, 360], [0, 1]);
return (
);
};
const Intro: React.FC = () => {
const frame = useCurrentFrame();
const { fps } = useVideoConfig();
const logoSpring = spring({ frame, fps, config: { damping: 14, stiffness: 180 } });
const tagSpring = spring({ frame: frame - 12, fps, config: { damping: 16 } });
const lineProgress = spring({ frame: frame - 6, fps, config: { damping: 20 } });
const fadeOut = interpolate(frame, [78, 90], [1, 0], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
const logoY = interpolate(logoSpring, [0, 1], [40, 0]);
const logoOpacity = interpolate(logoSpring, [0, 1], [0, 1]);
const tagY = interpolate(tagSpring, [0, 1], [20, 0]);
const tagOpacity = interpolate(tagSpring, [0, 1], [0, 1]);
return (
Make room for focused work
Plan • Protect • Progress
A calmer way to plan together
{/* floating cards hint */}
{["Mon", "Tue", "Wed"].map((d, i) => (
{d}
{i === 1 ? "Focus block" : "Team sync"}
{i === 1 ? "2h protected" : "9:30 AM"}
))}
);
};
const Middle: React.FC = () => {
const frame = useCurrentFrame();
const { fps } = useVideoConfig();
// feature index 0,1,2
const featureIndex = Math.min(2, Math.floor(frame / 60));
const featureNames = ["Plan together", "Protect focus time", "See progress"];
const featureDescriptions = [
"Share a single team plan everyone can follow",
"Block time for deep work — and keep it",
"Track momentum without the noise",
];
const featureAccent = [palette.accent, palette.secondary, palette.accent];
const fadeInOuter = interpolate(frame, [0, 12], [0, 1], { extrapolateRight: "clamp" });
return (
{/* header row */}
0{featureIndex + 1} — 03
Relay workspace
{featureNames[featureIndex]}
{featureDescriptions[featureIndex]}
{[0, 1, 2].map((i) => {
const isActive = i === featureIndex;
const w = isActive ? 44 : 14;
return (
);
})}
{/* product window */}
{/* chrome */}
R
Relay
Next week • May 12—16
● Live
Share
Publish plan
{[0, 1, 2].map((i) => (
{String.fromCharCode(65 + i)}
))}
{/* content area with crossfade */}
{/* PLAN TOGETHER */}
{/* PROTECT */}
{/* SEE PROGRESS */}
{/* bottom status */}
Updating in real time
•
3 editors • Last edit 2m ago
⌘ K to command
{featureIndex === 0 ? "Plan together" : featureIndex === 1 ? "Protect focus" : "See progress"}
);
};
const PlanTogetherContent: React.FC<{ frame: number; fps: number; active: boolean }> = ({ frame, fps, active }) => {
const local = frame - 0;
const enter = spring({ frame: local, fps, config: { damping: 18 } });
const dragProgress = active ? interpolate(local, [18, 38], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" }) : 0;
const dragSpring = spring({ frame: Math.max(0, local - 18), fps, config: { damping: 14 } });
return (
<>
{/* sidebar */}
Projects
{[
{ name: "Website launch", active: true, count: 8 },
{ name: "Q2 Roadmap", active: false, count: 12 },
{ name: "Hiring sprint", active: false, count: 5 },
].map((p) => (
{p.name}
{p.count}
))}
Team
{[
{ n: "Alex Rivera", r: "Design", c: palette.accent },
{ n: "Sam Chen", r: "Engineering", c: palette.secondary },
{ n: "Maya Patel", r: "Product", c: "#FFC857" },
].map((u, idx) => (
))}
Everyone in sync
Changes update live. No extra meetings needed.
{/* kanban */}
{[
{ title: "To do", items: [{ t: "Homepage hero", tag: "Design", c: palette.muted }, { t: "Pricing table", tag: "Content", c: palette.secondary }], accent: false },
{ title: "In progress", items: [{ t: "Checkout flow", tag: "Engineering", c: palette.accent }, { t: "Brand review", tag: "Design", c: "#FFC857" }], accent: true },
{ title: "Done", items: [{ t: "Research synthesis", tag: "Research", c: palette.muted }], accent: false },
].map((col, colIndex) => (
{col.title}
{col.items.length}
{col.items.map((it, idx) => {
const isDragging = col.title === "To do" && idx === 1 && active;
const dragX = isDragging ? interpolate(dragSpring, [0, 1], [0, 280]) : 0;
const dragY = isDragging ? interpolate(dragSpring, [0, 1], [0, -4]) : 0;
const dragRotate = isDragging ? interpolate(dragSpring, [0, 1], [0, -1.5]) : 0;
const dragOpacity = isDragging && dragProgress > 0.85 ? 0 : 1;
return (
{it.t}
Due Fri
◐ 3 subtasks
);
})}
{/* ghost card that appears in In progress after drag */}
{col.title === "In progress" && (
0.5 ? interpolate(dragSpring, [0, 1], [0, 1]) : 0,
transform: `scale(${interpolate(dragSpring, [0, 1], [0.96, 1])})`,
height: dragProgress > 0.5 ? "auto" : 0,
overflow: "hidden",
}}
>
Pricing table
Moved by Sam • just now
)}
+ Add task
))}
>
);
};
const ProtectFocusContent: React.FC<{ frame: number; fps: number; active: boolean }> = ({ frame, fps, active }) => {
const local = frame - 60;
const enter = spring({ frame: Math.max(0, local), fps, config: { damping: 18 } });
const focusGrow = active ? interpolate(local, [10, 32], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" }) : 0;
const toggle = active ? interpolate(local, [14, 28], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" }) : 0;
const days = ["Mon", "Tue", "Wed", "Thu", "Fri"];
const hours = ["9 AM", "11 AM", "1 PM", "3 PM", "5 PM"];
return (
<>
Focus control
Protect focus time
Block calendar automatically
0.5 ? palette.accent : `${palette.foreground}18`,
position: "relative",
transition: "background 0.3s",
display: "flex",
alignItems: "center",
padding: 2,
}}
>
{[
{ l: "Do not disturb", v: "On", on: true },
{ l: "Decline new meetings", v: "Focus blocks", on: true },
{ l: "Slack status", v: "Auto • Focusing", on: true },
].map((row) => (
))}
✓
Focus time protected
No interruptions until 3 PM
{days.map((day, di) => (
{/* hour lines */}
{hours.map((_, hi) => (
))}
{/* meeting blocks */}
{/* focus block - grows */}
{di !== 2 && (
)}
{di === 2 && (
✕
Declined
)}
))}
Hours shown in your timezone
14 hours protected →
>
);
};
const SeeProgressContent: React.FC<{ frame: number; fps: number; active: boolean }> = ({ frame, fps, active }) => {
const local = frame - 120;
const s1 = spring({ frame: Math.max(0, local), fps, config: { damping: 16 } });
const s2 = spring({ frame: Math.max(0, local - 8), fps, config: { damping: 16 } });
const s3 = spring({ frame: Math.max(0, local - 16), fps, config: { damping: 16 } });
const bars = [56, 72, 48, 86, 64];
return (
{[
{ k: "Tasks done", v: "24", sub: "+6 this week", col: palette.accent },
{ k: "Focus time", v: "18.5h", sub: "82% of goal", col: palette.secondary },
{ k: "On track", v: "91%", sub: "3 at risk", col: "#FFC857" },
].map((stat, i) => (
{stat.k}
{stat.v} {stat.sub}
↗
))}
Weekly momentum
Last 5 days
{bars.map((h, i) => {
const barSpring = spring({ frame: Math.max(0, local - i * 3), fps, config: { damping: 14 } });
const height = h * (active ? barSpring : 0);
return (
{i === 3 && (
Peak focus
)}
{["Mon", "Tue", "Wed", "Thu", "Fri"][i]}
{["6", "8", "5", "9", "7"][i]} tasks
);
})}
Compared to last week
+18% focus time
Project health
{Math.round(interpolate(s3, [0, 1], [0, 91]))}%
on track
{[
{ l: "On track", v: 12, c: palette.accent },
{ l: "At risk", v: 2, c: "#FFC857" },
{ l: "Blocked", v: 1, c: palette.muted },
].map((r) => (
))}
Maya moved 3 tasks to done today. Nice momentum.
Weekly summary
Ready to share
→
);
};
const Outro: React.FC = () => {
const frame = useCurrentFrame();
const { fps } = useVideoConfig();
const s1 = spring({ frame, fps, config: { damping: 16, stiffness: 140 } });
const s2 = spring({ frame: frame - 10, fps, config: { damping: 18 } });
const s3 = spring({ frame: frame - 18, fps, config: { damping: 18 } });
const lineW = interpolate(spring({ frame: frame - 6, fps, config: { damping: 20 } }), [0, 1], [0, 1]);
// Ensure final message fully readable for at least 60 frames (2 seconds) - from frame 30 to 90 in this sequence (which is 300-360 global). Keep opacity 1.
const holdOpacity = interpolate(frame, [0, 16], [0, 1], { extrapolateRight: "clamp" });
return (
Relay is ready
Start your next week
with
Relay
Get started at relay.so →
See how it works
Free for teams • No credit card required • Set up in 2 minutes
© Relay 2025 • Made for focused teams
relay.so • privacy • terms
);
};