Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
feat: replace hero player with intro video
dev_wandryb14110211fe2
diff --git a/app/(home)/components/sections/bento-registry.tsx b/app/(home)/components/sections/bento-registry.tsxindex 258d60c3..21fd694b 100644--- a/app/(home)/components/sections/bento-registry.tsx+++ b/app/(home)/components/sections/bento-registry.tsx@@ -229,10 +229,11 @@ export function BentoRegistry() {<FadeUp delay={0.18}><SpotlightSurface className="mt-4 grid gap-4 sm:mt-6 sm:gap-6 md:grid-cols-3"><BentoCard- name="shimmer-sweep"- title="Shimmer Sweep"- description="Light pass across text for AI accents"- inputProps={{ text: "Generating" }}+ name="kinetic-center-build"+ title="Kinetic Center Build"+ description="Words push left as each new one builds from the center"+ inputProps={{ text: "Words push left." }}+ backdrop={{ type: "color", value: "#ffffff" }}/><BentoCardname="x-followers-overview"@@ -241,9 +242,9 @@ export function BentoRegistry() {backdrop={{ type: "color", value: "#ffffff" }}/><BentoCard- name="grid-pixelate-wipe"- title="Grid Pixelate Wipe"- description="The screen breaks into squares and reassembles into a new scene"+ name="shader-swirl"+ title="Shader Swirl"+ description="Twisting bands of color churn behind your scene"/></SpotlightSurface></FadeUp>diff --git a/app/(home)/components/sections/hero.tsx b/app/(home)/components/sections/hero.tsxindex 46fc11f6..a582a2db 100644--- a/app/(home)/components/sections/hero.tsx+++ b/app/(home)/components/sections/hero.tsx@@ -1,6 +1,5 @@"use client";-import { Player, type PlayerRef } from "@remotion/player";import { ArrowRight, Pause, Play } from "lucide-react";import { motion } from "motion/react";import Link from "next/link";@@ -9,60 +8,36 @@ import { Badge } from "@/components/ui/badge";import { Button } from "@/components/ui/button";import { SPRING_BOUNCE } from "@/config/site";import { useTrackEvent } from "@/lib/analytics";-import { HERO_CODE } from "@/lib/config/snippets";-import registry from "@/registry/__index__";-import { Backdrop } from "@/registry/remocn/backdrop";import { FadeUp } from "../fade-up";import { InstallAll } from "../install-all";-import { useAutoplay } from "../use-autoplay";--const GlassCodeBlock = registry["glass-code-block"]?.Component;--function HeroComposition(props: Record<string, unknown>) {- return (- <Backdrop- fill={{ type: "image", src: "/hero.png" }}- padding={0}- radius={0}- shadow=""- >- {GlassCodeBlock ? <GlassCodeBlock {...props} /> : null}- </Backdrop>- );-}export function Hero() {- const heroEntry = registry["glass-code-block"];- const playerRef = useRef<PlayerRef>(null);+ const videoRef = useRef<HTMLVideoElement>(null);const [playing, setPlaying] = useState(true);const trackEvent = useTrackEvent();const togglePlay = useCallback(() => {- const p = playerRef.current;- if (!p) return;- if (p.isPlaying()) {- p.pause();- setPlaying(false);- trackEvent("preview_paused", {+ const v = videoRef.current;+ if (!v) return;+ if (v.paused) {+ void v.play();+ setPlaying(true);+ trackEvent("preview_played", {component: "glass-code-block",surface: "hero",+ trigger: "click",});} else {- p.play();- setPlaying(true);- trackEvent("preview_played", {+ v.pause();+ setPlaying(false);+ trackEvent("preview_paused", {component: "glass-code-block",surface: "hero",- trigger: "click",});}}, [trackEvent]);- useAutoplay(playerRef);-- const aspectRatio = heroEntry- ? `${heroEntry.config.compositionWidth} / ${heroEntry.config.compositionHeight}`- : "16 / 9";+ const aspectRatio = "16 / 9";return (<section className="relative overflow-hidden pt-10 pb-16 sm:pt-16 sm:pb-24">@@ -151,26 +126,17 @@ export function Hero() {className="group surface-card relative w-full overflow-hidden rounded-2xl shadow-2xl shadow-black/5 sm:rounded-3xl dark:shadow-black/40"style={{ aspectRatio }}>- {heroEntry ? (- <Player- ref={playerRef}- component={HeroComposition}- inputProps={{- code: HERO_CODE,- title: "LaunchScene.tsx",- width: 860,- height: 480,- }}- durationInFrames={heroEntry.config.durationInFrames}- fps={heroEntry.config.fps}- compositionWidth={heroEntry.config.compositionWidth}- compositionHeight={heroEntry.config.compositionHeight}- style={{ width: "100%", height: "100%", display: "block" }}- loop- initiallyMuted- acknowledgeRemotionLicense- />- ) : null}+ {/* biome-ignore lint/a11y/useMediaCaption: decorative hero loop, muted with no dialogue */}+ <video+ ref={videoRef}+ src="/introducing-remocn.mp4"+ autoPlay+ muted+ loop+ playsInline+ preload="auto"+ className="block h-full w-full object-cover"+ /><buttontype="button"onClick={togglePlay}diff --git a/config/site.ts b/config/site.tsindex 58f52d1d..c4d8714b 100644--- a/config/site.ts+++ b/config/site.ts@@ -42,6 +42,7 @@ export type NavLink = {// Единый источник топ-навигации для landing / sponsors / docs.export const NAV_LINKS: NavLink[] = [{ href: "/docs/typography", label: "Components" },+ { href: "/docs/shaders/getting-started/introduction", label: "Shaders" },{ href: "/sponsors", label: "Sponsors" },{ href: "/docs/getting-started/introduction", label: "Docs" },];