Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
fix: fixed mobile uic
dev_wandryd7348633038c
diff --git a/app/(home)/components/sections/bento-registry.tsx b/app/(home)/components/sections/bento-registry.tsxindex bc9a4762..6e10576c 100644--- a/app/(home)/components/sections/bento-registry.tsx+++ b/app/(home)/components/sections/bento-registry.tsx@@ -1,10 +1,10 @@"use client";import { Player, type PlayerRef } from "@remotion/player";-import { ArrowRight } from "lucide-react";+import { ArrowRight, Pause, Play } from "lucide-react";import { motion } from "motion/react";import Link from "next/link";-import { type CSSProperties, useRef } from "react";+import { type CSSProperties, useCallback, useRef, useState } from "react";import { Button } from "@/components/ui/button";import { SECTION, SPRING_SOFT } from "@/config/landing";import registry from "@/registry/__index__";@@ -25,9 +25,27 @@ function BentoCard({}) {const entry = registry[name];const playerRef = useRef<PlayerRef>(null);+ const [playing, setPlaying] = useState(false);- const handleEnter = () => playerRef.current?.play();- const handleLeave = () => playerRef.current?.pause();+ const handleEnter = () => {+ playerRef.current?.play();+ setPlaying(true);+ };+ const handleLeave = () => {+ playerRef.current?.pause();+ setPlaying(false);+ };+ const togglePlay = useCallback(() => {+ const p = playerRef.current;+ if (!p) return;+ if (p.isPlaying()) {+ p.pause();+ setPlaying(false);+ } else {+ p.play();+ setPlaying(true);+ }+ }, []);return (// biome-ignore lint/a11y/noStaticElementInteractions: hover-to-play is decorative video preview@@ -36,7 +54,7 @@ function BentoCard({onMouseLeave={handleLeave}whileHover={{ y: -4 }}transition={SPRING_SOFT}- className={`group relative flex flex-col overflow-hidden rounded-3xl border border-white/[0.06] bg-white/[0.03] backdrop-blur-2xl ${className}`}+ className={`group relative flex flex-col overflow-hidden rounded-2xl sm:rounded-3xl border border-white/[0.06] bg-white/[0.03] backdrop-blur-2xl ${className}`}style={{boxShadow: `0 20px 50px -20px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.06)`,}}@@ -66,8 +84,25 @@ function BentoCard({acknowledgeRemotionLicense/>) : null}+ <button+ type="button"+ onClick={togglePlay}+ aria-label={playing ? "Pause preview" : "Play preview"}+ className="absolute inset-0 flex items-center justify-center bg-transparent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/40 sm:hidden"+ >+ <span+ aria-hidden+ className="pointer-events-none flex size-12 items-center justify-center rounded-full bg-black/50 text-white backdrop-blur-md"+ >+ {playing ? (+ <Pause className="size-4" />+ ) : (+ <Play className="size-4 translate-x-0.5" />+ )}+ </span>+ </button></div>- <div className="relative flex-1 p-6">+ <div className="relative flex-1 p-5 sm:p-6"><h3 className="font-[var(--font-display)] text-base font-medium text-[#EDEDED]">{title}</h3>@@ -92,12 +127,12 @@ export function BentoRegistry() {};return (- <section id="components" className="relative py-32">+ <section id="components" className="relative py-20 sm:py-32"><div className={SECTION}><FadeUp>- <div className="mb-16 flex flex-col gap-6 sm:flex-row sm:items-end sm:justify-between">+ <div className="mb-12 sm:mb-16 flex flex-col gap-6 sm:flex-row sm:items-end sm:justify-between"><div className="max-w-2xl">- <h2 className="text-4xl font-semibold -tracking-wide text-[#EDEDED] md:text-5xl">+ <h2 className="text-3xl sm:text-4xl font-semibold -tracking-wide text-[#EDEDED] md:text-5xl">A registry of motion</h2><p className="mt-4 text-[#8B8A91]">@@ -129,7 +164,7 @@ export function BentoRegistry() {<divref={gridRef}onMouseMove={(e) => handleMove(e, gridRef.current)}- className="grid gap-6 md:grid-cols-3 md:grid-rows-2"+ className="grid gap-4 sm:gap-6 md:grid-cols-3 md:grid-rows-2"style={{ "--mx": "50%", "--my": "50%" } as CSSProperties}><BentoCard@@ -157,7 +192,7 @@ export function BentoRegistry() {<divref={grid2Ref}onMouseMove={(e) => handleMove(e, grid2Ref.current)}- className="mt-6 grid gap-6 md:grid-cols-2"+ className="mt-4 sm:mt-6 grid gap-4 sm:gap-6 md:grid-cols-2"style={{ "--mx": "50%", "--my": "50%" } as CSSProperties}><BentoCarddiff --git a/app/(home)/components/sections/final-cta.tsx b/app/(home)/components/sections/final-cta.tsxindex 042e8cf7..6811d311 100644--- a/app/(home)/components/sections/final-cta.tsx+++ b/app/(home)/components/sections/final-cta.tsx@@ -20,7 +20,7 @@ export function FinalCTA() {const reduced = useReducedMotion();return (- <section className="relative overflow-hidden py-40">+ <section className="relative overflow-hidden py-24 sm:py-40"><divaria-hiddenclassName="absolute inset-0 -z-10"@@ -32,7 +32,7 @@ export function FinalCTA() {<div className={`${SECTION} flex flex-col items-center text-center`}><motion.h2ref={ref}- className="text-balance font-[var(--font-display)] text-5xl font-semibold -tracking-wide text-[#EDEDED] md:text-6xl"+ className="text-balance font-[var(--font-display)] text-3xl sm:text-5xl font-semibold -tracking-wide text-[#EDEDED] md:text-6xl"initial={reduced ? false : { opacity: 0, y: 30, filter: "blur(14px)" }}diff --git a/app/(home)/components/sections/hero.tsx b/app/(home)/components/sections/hero.tsxindex 273d692f..5e08d2ac 100644--- a/app/(home)/components/sections/hero.tsx+++ b/app/(home)/components/sections/hero.tsx@@ -1,9 +1,10 @@"use client";-import { Player } from "@remotion/player";-import { ArrowRight } from "lucide-react";+import { Player, type PlayerRef } from "@remotion/player";+import { ArrowRight, Pause, Play } from "lucide-react";import { motion } from "motion/react";import Link from "next/link";+import { useCallback, useRef, useState } from "react";import Dither from "@/components/Dither";import { Button } from "@/components/ui/button";import { SECTION, SPRING_BOUNCE, SPRING_SOFT } from "@/config/landing";@@ -12,9 +13,27 @@ import { FadeUp } from "../fade-up";export function Hero() {const heroEntry = registry["browser-flow"];+ const playerRef = useRef<PlayerRef>(null);+ const [playing, setPlaying] = useState(true);++ const togglePlay = useCallback(() => {+ const p = playerRef.current;+ if (!p) return;+ if (p.isPlaying()) {+ p.pause();+ setPlaying(false);+ } else {+ p.play();+ setPlaying(true);+ }+ }, []);++ const aspectRatio = heroEntry+ ? `${heroEntry.config.compositionWidth} / ${heroEntry.config.compositionHeight}`+ : "16 / 9";return (- <section className="relative overflow-hidden pt-44 pb-28">+ <section className="relative overflow-hidden pt-32 pb-20 sm:pt-44 sm:pb-28"><div className="w-full h-screen absolute top-0 left-0"><DitherwaveColor={[@@ -33,7 +52,7 @@ export function Hero() {<div className={SECTION}><div className="flex flex-col items-center text-center"><FadeUp delay={0.08}>- <h1 className="mt-8 max-w-8xl text-balance font-sans text-5xl font-semibold leading-[1.05] -tracking-[0.04em] text-[#EDEDED] md:text-7xl">+ <h1 className="mt-8 max-w-8xl text-balance font-sans text-4xl font-semibold leading-[1.05] -tracking-[0.04em] text-[#EDEDED] sm:text-5xl md:text-7xl">Cinematic video components<br />Now copy-pasteable@@ -41,14 +60,14 @@ export function Hero() {</FadeUp><FadeUp delay={0.16}>- <p className="mt-6 max-w-2xl text-balance text-xl font-light leading-relaxed text-white">+ <p className="mt-6 max-w-2xl text-balance text-base sm:text-xl font-light leading-relaxed text-white">Build product demos, changelogs, and launch videos in React. Opensource and delightfully easy</p></FadeUp><FadeUp delay={0.24}>- <div className="mt-10 flex flex-col items-stretch gap-3 sm:flex-row sm:items-center">+ <div className="mt-10 flex flex-col items-center gap-3 sm:flex-row"><motion.divwhileHover={{ scale: 1.03 }}whileTap={{ scale: 0.97 }}@@ -74,9 +93,13 @@ export function Hero() {viewport={{ once: true, amount: 0.2 }}transition={{ ...SPRING_BOUNCE, delay: 0.1 }}>- <div className="relative w-[90vw] h-screen overflow-hidden rounded-3xl">+ <div+ className="group relative w-[92vw] max-w-6xl overflow-hidden rounded-2xl sm:rounded-3xl"+ style={{ aspectRatio }}+ >{heroEntry ? (<Player+ ref={playerRef}component={heroEntry.Component}inputProps={{ url: "remocn.dev" }}durationInFrames={heroEntry.config.durationInFrames}@@ -93,6 +116,24 @@ export function Hero() {acknowledgeRemotionLicense/>) : null}+ <button+ type="button"+ onClick={togglePlay}+ aria-label={playing ? "Pause preview" : "Play preview"}+ className="absolute inset-0 flex items-center justify-center bg-transparent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/40 focus-visible:ring-offset-0"+ >+ <span+ aria-hidden+ className="pointer-events-none flex size-14 items-center justify-center rounded-full bg-black/50 text-white opacity-0 backdrop-blur-md transition-opacity duration-200 group-hover:opacity-100 motion-reduce:transition-none data-[show=true]:opacity-100"+ data-show={!playing}+ >+ {playing ? (+ <Pause className="size-5" />+ ) : (+ <Play className="size-5 translate-x-0.5" />+ )}+ </span>+ </button></div></motion.div></FadeUp>diff --git a/app/(home)/components/sections/landing-code-showcase.tsx b/app/(home)/components/sections/landing-code-showcase.tsxindex a7af29da..7e70985f 100644--- a/app/(home)/components/sections/landing-code-showcase.tsx+++ b/app/(home)/components/sections/landing-code-showcase.tsx@@ -1,7 +1,9 @@"use client";-import { Player } from "@remotion/player";+import { Player, type PlayerRef } from "@remotion/player";+import { Pause, Play } from "lucide-react";import { motion } from "motion/react";+import { useCallback, useRef, useState } from "react";import { PEACH, SECTION, SPRING_SOFT } from "@/config/landing";import registry from "@/registry/__index__";import { FadeUp } from "../fade-up";@@ -11,14 +13,28 @@ export function LandingCodeShowcase() {const aspectRatio =entry &&`${entry.config.compositionWidth} / ${entry.config.compositionHeight}`;+ const playerRef = useRef<PlayerRef>(null);+ const [playing, setPlaying] = useState(true);++ const togglePlay = useCallback(() => {+ const p = playerRef.current;+ if (!p) return;+ if (p.isPlaying()) {+ p.pause();+ setPlaying(false);+ } else {+ p.play();+ setPlaying(true);+ }+ }, []);return (- <section id="showcase" className="relative py-32">+ <section id="showcase" className="relative py-20 sm:py-32">{/* Header sits inside the standard SECTION width for readable copy */}<div className={SECTION}><FadeUp>- <div className="mb-16 max-w-2xl">- <h2 className="text-4xl font-semibold -tracking-wide text-[#EDEDED] md:text-5xl">+ <div className="mb-12 sm:mb-16 max-w-2xl">+ <h2 className="text-3xl sm:text-4xl font-semibold -tracking-wide text-[#EDEDED] md:text-5xl">Type a prop<span className="text-[#8B8A91]"> ship a frame</span></h2>@@ -32,12 +48,12 @@ export function LandingCodeShowcase() {{/* Showcase block breaks out of the section width so the player hasroom for the wide composition. */}- <div className="mx-auto w-full max-w-400 px-6">+ <div className="mx-auto w-full max-w-[100rem] px-4 sm:px-6"><FadeUp delay={0.1}><motion.divwhileHover={{ y: -4 }}transition={SPRING_SOFT}- className="overflow-hidden rounded-3xl border border-white/6 bg-white/2 backdrop-blur-2xl"+ className="group relative overflow-hidden rounded-2xl sm:rounded-3xl border border-white/6 bg-white/2 backdrop-blur-2xl"style={{boxShadow: `0 30px 80px -30px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.05)`,}}@@ -45,6 +61,7 @@ export function LandingCodeShowcase() {<div className="w-full" style={{ aspectRatio }}>{entry ? (<Player+ ref={playerRef}component={entry.Component}inputProps={{ accentColor: PEACH }}durationInFrames={entry.config.durationInFrames}@@ -58,6 +75,24 @@ export function LandingCodeShowcase() {/>) : null}</div>+ <button+ type="button"+ onClick={togglePlay}+ aria-label={playing ? "Pause preview" : "Play preview"}+ className="absolute inset-0 flex items-center justify-center bg-transparent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/40"+ >+ <span+ aria-hidden+ data-show={!playing}+ className="pointer-events-none flex size-14 items-center justify-center rounded-full bg-black/50 text-white opacity-0 backdrop-blur-md transition-opacity duration-200 group-hover:opacity-100 motion-reduce:transition-none data-[show=true]:opacity-100"+ >+ {playing ? (+ <Pause className="size-5" />+ ) : (+ <Play className="size-5 translate-x-0.5" />+ )}+ </span>+ </button></motion.div></FadeUp></div>diff --git a/app/(home)/components/sections/stack-marquee.tsx b/app/(home)/components/sections/stack-marquee.tsxindex caecfd66..bb067a0f 100644--- a/app/(home)/components/sections/stack-marquee.tsx+++ b/app/(home)/components/sections/stack-marquee.tsx@@ -2,7 +2,7 @@ import { STACK } from "@/config/landing";export function StackMarquee() {return (- <section className="relative py-20">+ <section className="relative py-12 sm:py-20"><divclassName="relative overflow-hidden"style={{@@ -12,12 +12,12 @@ export function StackMarquee() {"linear-gradient(to right, transparent, black 15%, black 85%, transparent)",}}>- <div className="flex w-max animate-[remocn-marquee_36s_linear_infinite] gap-16">+ <div className="flex w-max animate-[remocn-marquee_36s_linear_infinite] gap-10 sm:gap-16 motion-reduce:animate-none motion-reduce:flex-wrap motion-reduce:justify-center">{[...STACK, ...STACK, ...STACK].map((item, i) => (<span// biome-ignore lint/suspicious/noArrayIndexKey: marquee duplicationkey={i}- className="whitespace-nowrap font-[var(--font-display)] text-2xl font-medium -tracking-wide text-white/30"+ className="whitespace-nowrap font-[var(--font-display)] text-lg sm:text-2xl font-medium -tracking-wide text-white/30">{item}</span>diff --git a/app/(home)/components/sections/use-cases.tsx b/app/(home)/components/sections/use-cases.tsxindex 64a20ad4..e3ec3b97 100644--- a/app/(home)/components/sections/use-cases.tsx+++ b/app/(home)/components/sections/use-cases.tsx@@ -160,11 +160,11 @@ function UseCaseCard({export function UseCases() {return (- <section id="use-cases" className="relative py-32">+ <section id="use-cases" className="relative py-20 sm:py-32"><div className={SECTION}><FadeUp>- <div className="mb-16 max-w-2xl">- <h2 className="font-[var(--font-display)] text-4xl font-semibold -tracking-wide text-[#EDEDED] md:text-5xl">+ <div className="mb-12 sm:mb-16 max-w-2xl">+ <h2 className="font-[var(--font-display)] text-3xl sm:text-4xl font-semibold -tracking-wide text-[#EDEDED] md:text-5xl">Built for three jobs</h2><p className="mt-4 text-[#8B8A91]">@@ -174,7 +174,7 @@ export function UseCases() {</div></FadeUp>- <div className="grid gap-6 md:grid-cols-3">+ <div className="grid gap-4 sm:gap-6 md:grid-cols-3"><FadeUp delay={0}><UseCaseCardlabel="Marketing"diff --git a/app/(home)/components/site-header.tsx b/app/(home)/components/site-header.tsxindex e13e6935..e7efc521 100644--- a/app/(home)/components/site-header.tsx+++ b/app/(home)/components/site-header.tsx@@ -1,8 +1,34 @@+"use client";++import { Menu } from "lucide-react";import Image from "next/image";import Link from "next/link";+import { useState } from "react";+import {+ Sheet,+ SheetContent,+ SheetHeader,+ SheetTitle,+ SheetTrigger,+} from "@/components/ui/sheet";import { type NavLink, SECTION } from "@/config/landing";+const GitHubIcon = ({ className }: { className?: string }) => (+ <svg+ viewBox="0 0 24 24"+ className={className}+ fill="currentColor"+ role="img"+ aria-label="GitHub"+ >+ <title>GitHub</title>+ <path d="M12 .5C5.65.5.5 5.65.5 12c0 5.08 3.29 9.39 7.86 10.91.58.11.79-.25.79-.56 0-.27-.01-1-.02-1.96-3.2.69-3.87-1.54-3.87-1.54-.52-1.33-1.28-1.69-1.28-1.69-1.05-.72.08-.7.08-.7 1.16.08 1.77 1.19 1.77 1.19 1.03 1.77 2.7 1.26 3.36.96.1-.75.4-1.26.73-1.55-2.55-.29-5.24-1.28-5.24-5.71 0-1.26.45-2.29 1.19-3.1-.12-.29-.52-1.47.11-3.06 0 0 .97-.31 3.18 1.18a11 11 0 0 1 5.79 0c2.21-1.49 3.18-1.18 3.18-1.18.63 1.59.23 2.77.11 3.06.74.81 1.19 1.84 1.19 3.1 0 4.44-2.7 5.41-5.27 5.7.41.36.78 1.06.78 2.14 0 1.55-.01 2.8-.01 3.18 0 .31.21.68.8.56C20.21 21.39 23.5 17.08 23.5 12 23.5 5.65 18.35.5 12 .5Z" />+ </svg>+);+export function SiteHeader({ navLinks }: { navLinks: NavLink[] }) {+ const [open, setOpen] = useState(false);+return (<header className="fixed inset-x-0 top-0 z-40 border-b border-white/[0.05] bg-[#141318]/60 backdrop-blur-2xl"><div className={`flex h-16 items-center justify-between ${SECTION}`}>@@ -19,14 +45,14 @@ export function SiteHeader({ navLinks }: { navLinks: NavLink[] }) {/>remocn</Link>- <nav className="flex items-center gap-7 text-sm text-[#8B8A91]">++ {/* Desktop nav */}+ <nav className="hidden sm:flex items-center gap-7 text-sm text-[#8B8A91]">{navLinks.map((link) => (<Linkkey={link.href}href={link.href}- className={`${- link.smOnly ? "hidden sm:inline" : ""- } transition-colors hover:text-white focus-visible:text-white focus-visible:outline-none`}+ className="transition-colors hover:text-white focus-visible:text-white focus-visible:outline-none">{link.label}</Link>@@ -37,19 +63,55 @@ export function SiteHeader({ navLinks }: { navLinks: NavLink[] }) {rel="noreferrer noopener"className="flex items-center gap-1.5 transition-colors hover:text-white focus-visible:text-white focus-visible:outline-none">- <svg- viewBox="0 0 24 24"- className="size-4"- fill="currentColor"- role="img"- aria-label="GitHub"- >- <title>GitHub</title>- <path d="M12 .5C5.65.5.5 5.65.5 12c0 5.08 3.29 9.39 7.86 10.91.58.11.79-.25.79-.56 0-.27-.01-1-.02-1.96-3.2.69-3.87-1.54-3.87-1.54-.52-1.33-1.28-1.69-1.28-1.69-1.05-.72.08-.7.08-.7 1.16.08 1.77 1.19 1.77 1.19 1.03 1.77 2.7 1.26 3.36.96.1-.75.4-1.26.73-1.55-2.55-.29-5.24-1.28-5.24-5.71 0-1.26.45-2.29 1.19-3.1-.12-.29-.52-1.47.11-3.06 0 0 .97-.31 3.18 1.18a11 11 0 0 1 5.79 0c2.21-1.49 3.18-1.18 3.18-1.18.63 1.59.23 2.77.11 3.06.74.81 1.19 1.84 1.19 3.1 0 4.44-2.7 5.41-5.27 5.7.41.36.78 1.06.78 2.14 0 1.55-.01 2.8-.01 3.18 0 .31.21.68.8.56C20.21 21.39 23.5 17.08 23.5 12 23.5 5.65 18.35.5 12 .5Z" />- </svg>+ <GitHubIcon className="size-4" />GitHub</Link></nav>++ {/* Mobile nav trigger */}+ <Sheet open={open} onOpenChange={setOpen}>+ <SheetTrigger+ render={+ <button+ type="button"+ aria-label="Open menu"+ className="sm:hidden inline-flex size-11 items-center justify-center rounded-md text-[#EDEDED] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/40"+ />+ }+ >+ <Menu className="size-5" aria-hidden="true" />+ </SheetTrigger>+ <SheetContent+ side="right"+ className="border-white/[0.06] bg-[#141318]/95 text-[#EDEDED] backdrop-blur-2xl"+ >+ <SheetHeader>+ <SheetTitle className="text-[#EDEDED]">Menu</SheetTitle>+ </SheetHeader>+ <nav className="flex flex-col px-6 pb-6 text-base">+ {navLinks.map((link) => (+ <Link+ key={link.href}+ href={link.href}+ onClick={() => setOpen(false)}+ className="py-3 text-[#EDEDED]/90 transition-colors hover:text-white focus-visible:text-white focus-visible:outline-none"+ >+ {link.label}+ </Link>+ ))}+ <Link+ href="https://github.com/kapishdima/remocn"+ target="_blank"+ rel="noreferrer noopener"+ onClick={() => setOpen(false)}+ className="mt-2 inline-flex items-center gap-2 py-3 text-[#EDEDED]/90 transition-colors hover:text-white focus-visible:text-white focus-visible:outline-none"+ >+ <GitHubIcon className="size-4" />+ GitHub+ </Link>+ </nav>+ </SheetContent>+ </Sheet></div></header>);diff --git a/config/landing.ts b/config/landing.tsindex 7293b830..2682579a 100644--- a/config/landing.ts+++ b/config/landing.ts@@ -3,7 +3,7 @@ export const PEACH = "#FFB38E";export const LAVENDER = "#D4B3FF";export const MINT = "#A1EEBD";-export const SECTION = "mx-auto w-full max-w-6xl px-6";+export const SECTION = "mx-auto w-full max-w-6xl px-4 sm:px-6";export const SPRING_BOUNCE = {type: "spring" as const,