Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
feat: added new concept components
kapishdimae82ae99f1005
diff --git a/app/(home)/components/copyable-block.tsx b/app/(home)/components/copyable-block.tsxnew file mode 100644index 00000000..4de0cc7d--- /dev/null+++ b/app/(home)/components/copyable-block.tsx@@ -0,0 +1,105 @@+"use client";++import { Check, Copy } from "lucide-react";+import { useState } from "react";+import { Button } from "@/components/ui/button";+import { useTrackEvent } from "@/lib/analytics";+import { cn } from "@/lib/utils";++type CopyEvent = {+ component: string;+ packageManager: "pnpm" | "npm" | "yarn" | "bun" | "prompt";+ surface: "docs" | "landing" | "bento";+};++function useCopy(value: string, event: CopyEvent) {+ const [copied, setCopied] = useState(false);+ const trackEvent = useTrackEvent();++ return {+ copied,+ copy: () => {+ navigator.clipboard.writeText(value);+ setCopied(true);+ trackEvent("install_command_copied", {+ component: event.component,+ package_manager: event.packageManager,+ surface: event.surface,+ });+ setTimeout(() => setCopied(false), 1500);+ },+ };+}++export function CopyableButton({+ value,+ label,+ event,+ className,+}: {+ value: string;+ label: string;+ event: CopyEvent;+ className?: string;+}) {+ const { copied, copy } = useCopy(value, event);++ return (+ <Button+ variant="secondary"+ onClick={copy}+ aria-label={`Copy ${label.toLowerCase()}`}+ size="lg"+ className={cn("rounded-full font-medium", className)}+ >+ <span className="text-foreground">{label}</span>+ <span aria-hidden className="text-muted-foreground/70">+ {copied ? (+ <Check className="size-4 text-foreground" />+ ) : (+ <Copy className="size-4" />+ )}+ </span>+ </Button>+ );+}++export function CopyablePanel({+ value,+ caption,+ event,+ className,+}: {+ value: string;+ caption?: string;+ event: CopyEvent;+ className?: string;+}) {+ const { copied, copy } = useCopy(value, event);++ return (+ <div className={cn("flex flex-col gap-2", className)}>+ {caption && (+ <p className="text-sm text-muted-foreground">{caption}</p>+ )}+ <div className="surface-card relative flex items-start gap-3 rounded-2xl p-4 text-left sm:p-5">+ <p className="min-w-0 flex-1 text-pretty text-sm leading-relaxed text-foreground sm:text-base">+ {value}+ </p>+ <Button+ variant="ghost"+ size="icon"+ onClick={copy}+ aria-label="Copy prompt"+ className="shrink-0 rounded-full"+ >+ {copied ? (+ <Check className="size-4 text-foreground" />+ ) : (+ <Copy className="size-4 text-muted-foreground" />+ )}+ </Button>+ </div>+ </div>+ );+}diff --git a/app/(home)/components/install-all.tsx b/app/(home)/components/install-all.tsxindex 83205c06..87d4b0da 100644--- a/app/(home)/components/install-all.tsx+++ b/app/(home)/components/install-all.tsx@@ -1,42 +1,19 @@"use client";-import { Check, Copy } from "lucide-react";-import { useState } from "react";-import { Button } from "@/components/ui/button";import { INSTALL_ALL_COMMAND } from "@/config/site";-import { useTrackEvent } from "@/lib/analytics";--export function InstallAll() {- const [copied, setCopied] = useState(false);- const trackEvent = useTrackEvent();-- const copy = () => {- navigator.clipboard.writeText(INSTALL_ALL_COMMAND);- setCopied(true);- trackEvent("install_command_copied", {- component: "install_all",- package_manager: "npm",- surface: "landing",- });- setTimeout(() => setCopied(false), 1500);- };+import { CopyableButton } from "./copyable-block";+export function InstallAll({ className }: { className?: string }) {return (- <Button- variant="secondary"- onClick={copy}- aria-label="Copy command to install all components"- size="lg"- className="rounded-full font-medium"- >- <span className="text-foreground">Install all</span>- <span aria-hidden className="text-muted-foreground/70">- {copied ? (- <Check className="size-4 text-foreground" />- ) : (- <Copy className="size-4" />- )}- </span>- </Button>+ <CopyableButton+ value={INSTALL_ALL_COMMAND}+ label="Install all"+ event={{+ component: "install_all",+ packageManager: "npm",+ surface: "landing",+ }}+ className={className}+ />);}diff --git a/app/(home)/components/prompt-quickstart.tsx b/app/(home)/components/prompt-quickstart.tsxnew file mode 100644index 00000000..0bb58a5d--- /dev/null+++ b/app/(home)/components/prompt-quickstart.tsx@@ -0,0 +1,25 @@+"use client";++import { QUICKSTART_PROMPT } from "@/config/site";+import { CopyablePanel } from "./copyable-block";++export function PromptQuickstart({+ caption,+ className,+}: {+ caption?: string;+ className?: string;+}) {+ return (+ <CopyablePanel+ value={QUICKSTART_PROMPT}+ caption={caption}+ event={{+ component: "quickstart_prompt",+ packageManager: "prompt",+ surface: "landing",+ }}+ className={className}+ />+ );+}diff --git a/app/(home)/components/sections/developer-entry.tsx b/app/(home)/components/sections/developer-entry.tsxnew file mode 100644index 00000000..7b5cd5b0--- /dev/null+++ b/app/(home)/components/sections/developer-entry.tsx@@ -0,0 +1,54 @@+"use client";++import { ArrowRight } from "lucide-react";+import Link from "next/link";+import { INSTALL_ALL_NAMES } from "@/config/site";+import { useTrackEvent } from "@/lib/analytics";+import { cn } from "@/lib/utils";+import { FadeUp } from "../fade-up";+import { InstallAll } from "../install-all";++export function DeveloperEntry({ className }: { className?: string }) {+ const trackEvent = useTrackEvent();++ return (+ <section+ id="for-developers"+ className={cn("relative py-14 sm:py-20", className)}+ >+ <div className="section">+ <FadeUp>+ <div className="surface-card flex flex-col gap-6 rounded-3xl p-6 sm:p-8 lg:flex-row lg:items-center lg:justify-between">+ <div className="max-w-xl">+ <h2 className="text-2xl font-semibold tracking-tight text-balance text-foreground sm:text-3xl">+ Already write React?+ </h2>+ <p className="mt-3 text-base leading-relaxed text-pretty text-muted-foreground">+ Skip all of the above. It's a shadcn registry —{" "}+ {INSTALL_ALL_NAMES.length} components, MIT, built on Remotion.+ Install what you need and own the code.+ </p>+ </div>++ <div className="flex shrink-0 flex-col items-start gap-3 sm:flex-row sm:items-center">+ <InstallAll />+ <Link+ href="/docs/getting-started/introduction"+ onClick={() =>+ trackEvent("cta_clicked", {+ cta: "developer_docs",+ destination: "/docs/getting-started/introduction",+ })+ }+ className="inline-flex items-center gap-1.5 text-sm text-muted-foreground transition-colors hover:text-foreground"+ >+ Component docs+ <ArrowRight aria-hidden className="size-4" />+ </Link>+ </div>+ </div>+ </FadeUp>+ </div>+ </section>+ );+}diff --git a/app/(home)/components/sections/director-quotes.tsx b/app/(home)/components/sections/director-quotes.tsxnew file mode 100644index 00000000..add62720--- /dev/null+++ b/app/(home)/components/sections/director-quotes.tsx@@ -0,0 +1,67 @@+"use client";++import { ArrowRight } from "lucide-react";+import Link from "next/link";+import { DIRECTOR_QUOTES } from "@/config/landing";+import { useTrackEvent } from "@/lib/analytics";+import { cn } from "@/lib/utils";+import { FadeUp } from "../fade-up";+import { SectionHeading } from "../section-heading";++const EYEBROW = "Direction";+const TITLE = "Talk to it like a director.";+const LEAD =+ "You don't set easing curves or keyframes. You say what feels wrong, and it fixes it.";++function Quote({ text, index }: { text: string; index: number }) {+ return (+ <FadeUp delay={index * 0.06}>+ <p+ className={cn(+ "surface-card rounded-2xl px-5 py-4 text-base leading-relaxed text-pretty text-foreground sm:text-lg",+ )}+ >+ “{text}”+ </p>+ </FadeUp>+ );+}++export function DirectorQuotes({ className }: { className?: string }) {+ const trackEvent = useTrackEvent();++ return (+ <section id="direction" className={cn("relative py-14 sm:py-20", className)}>+ <div className="section">+ <SectionHeading eyebrow={EYEBROW} title={TITLE} lead={LEAD} />++ <div className="mt-10 grid grid-cols-1 gap-3 sm:mt-12 sm:grid-cols-2 sm:gap-4">+ {DIRECTOR_QUOTES.map((quote, i) => (+ <Quote key={quote} text={quote} index={i} />+ ))}+ </div>++ <FadeUp delay={0.1}>+ <p className="mt-8 max-w-2xl text-base leading-relaxed text-pretty text-muted-foreground">+ Every piece in remocn is documented for agents as much as for people+ — what it does, how long it runs, when to reach for it. Your agent+ picks, you react.+ </p>+ <Link+ href="/docs/guides/directing-your-agent"+ onClick={() =>+ trackEvent("cta_clicked", {+ cta: "director_guide",+ destination: "/docs/guides/directing-your-agent",+ })+ }+ className="mt-4 inline-flex items-center gap-1.5 text-sm text-muted-foreground transition-colors hover:text-foreground sm:text-base"+ >+ How to direct your agent+ <ArrowRight aria-hidden className="size-4" />+ </Link>+ </FadeUp>+ </div>+ </section>+ );+}diff --git a/app/(home)/components/sections/faq.tsx b/app/(home)/components/sections/faq.tsxnew file mode 100644index 00000000..abeb90d3--- /dev/null+++ b/app/(home)/components/sections/faq.tsx@@ -0,0 +1,38 @@+import {+ Accordion,+ AccordionContent,+ AccordionItem,+ AccordionTrigger,+} from "@/components/ui/accordion";+import { FAQ_ITEMS } from "@/config/landing";+import { cn } from "@/lib/utils";+import { FadeUp } from "../fade-up";+import { SectionHeading } from "../section-heading";++const EYEBROW = "Questions";+const TITLE = "Before you ask";++export function Faq({ className }: { className?: string }) {+ return (+ <section id="faq" className={cn("relative py-14 sm:py-20", className)}>+ <div className="section">+ <SectionHeading eyebrow={EYEBROW} title={TITLE} />++ <FadeUp className="mt-10 sm:mt-12">+ <Accordion className="max-w-3xl">+ {FAQ_ITEMS.map((item) => (+ <AccordionItem key={item.question} value={item.question}>+ <AccordionTrigger className="text-base sm:text-lg">+ {item.question}+ </AccordionTrigger>+ <AccordionContent className="text-sm leading-relaxed text-pretty text-muted-foreground sm:text-base">+ {item.answer}+ </AccordionContent>+ </AccordionItem>+ ))}+ </Accordion>+ </FadeUp>+ </div>+ </section>+ );+}diff --git a/app/(home)/components/sections/how-it-works.tsx b/app/(home)/components/sections/how-it-works.tsxnew file mode 100644index 00000000..bddf6f32--- /dev/null+++ b/app/(home)/components/sections/how-it-works.tsx@@ -0,0 +1,88 @@+"use client";++import { ArrowRight } from "lucide-react";+import Link from "next/link";+import { type HowItWorksStep, HOW_IT_WORKS_STEPS } from "@/config/landing";+import { useTrackEvent } from "@/lib/analytics";+import { cn } from "@/lib/utils";+import { FadeUp } from "../fade-up";+import { PromptQuickstart } from "../prompt-quickstart";+import { SectionHeading } from "../section-heading";++const EYEBROW = "How it works";+const TITLE = "Two things: an agent and an empty folder.";+const LEAD =+ "No editor to learn, no timeline to scrub. You describe, it builds, you watch it happen.";++function StepRow({+ step,+ index,+ children,+}: {+ step: HowItWorksStep;+ index: number;+ children?: React.ReactNode;+}) {+ return (+ <div+ className={cn(+ "flex flex-col gap-3 py-6 sm:flex-row sm:gap-6",+ index > 0 && "border-t border-border/60",+ )}+ >+ <span className="shrink-0 font-mono text-sm text-muted-foreground/70 sm:pt-1">+ {String(index + 1).padStart(2, "0")}+ </span>+ <div className="min-w-0 flex-1">+ <p className="text-base font-medium text-foreground sm:text-lg">+ {step.title}+ </p>+ <p className="mt-1.5 text-sm leading-relaxed text-pretty text-muted-foreground sm:text-base">+ {step.detail}+ </p>+ {children}+ </div>+ </div>+ );+}++export function HowItWorks({ className }: { className?: string }) {+ const trackEvent = useTrackEvent();++ return (+ <section+ id="how-it-works"+ className={cn("relative py-14 sm:py-20", className)}+ >+ <div className="section">+ <SectionHeading eyebrow={EYEBROW} title={TITLE} lead={LEAD} />++ <FadeUp className="mt-10 sm:mt-14">+ <div className="surface-card rounded-3xl px-5 py-1 sm:px-8">+ {HOW_IT_WORKS_STEPS.map((step, i) => (+ <StepRow key={step.title} step={step} index={i}>+ {i === 1 && <PromptQuickstart className="mt-4" />}+ </StepRow>+ ))}+ </div>+ </FadeUp>++ <FadeUp delay={0.1}>+ <Link+ href="/docs/guides/setup"+ onClick={() =>+ trackEvent("cta_clicked", {+ cta: "how_it_works_setup",+ destination: "/docs/guides/setup",+ })+ }+ className="mt-6 inline-flex items-center gap-1.5 text-sm text-muted-foreground transition-colors hover:text-foreground sm:text-base"+ >+ First time? The setup guide takes ten minutes+ <ArrowRight aria-hidden className="size-4" />+ </Link>+ </FadeUp>+ </div>+ </section>+ );+}diff --git a/app/(home)/components/sections/showcase.tsx b/app/(home)/components/sections/showcase.tsxnew file mode 100644index 00000000..432306d8--- /dev/null+++ b/app/(home)/components/sections/showcase.tsx@@ -0,0 +1,43 @@+import { ArrowRight } from "lucide-react";+import Link from "next/link";+import { getShowcases } from "@/lib/showcases";+import { cn } from "@/lib/utils";+import { ShowcaseGrid } from "../../showcases/components/showcase-grid";+import { SectionHeading } from "../section-heading";++const EYEBROW = "Showcase";+const TITLE = "This is what ships";+const LEAD =+ "Every video here is React code in someone's repo. Open it, read it, change a number.";++const LIMIT = 6;++export async function Showcase({ className }: { className?: string }) {+ const showcases = await getShowcases().catch(() => []);+ if (showcases.length === 0) return null;++ return (+ <section id="showcase" className={cn("relative py-14 sm:py-20", className)}>+ <div className="section">+ <SectionHeading+ eyebrow={EYEBROW}+ title={TITLE}+ lead={LEAD}+ action={+ <Link+ href="/showcases"+ className="inline-flex items-center gap-1.5 text-sm text-muted-foreground transition-colors hover:text-foreground sm:text-base"+ >+ See all+ <ArrowRight aria-hidden className="size-4" />+ </Link>+ }+ />++ <div className="mt-10 sm:mt-12">+ <ShowcaseGrid showcases={showcases.slice(0, LIMIT)} />+ </div>+ </div>+ </section>+ );+}diff --git a/config/landing.ts b/config/landing.tsnew file mode 100644index 00000000..8738af59--- /dev/null+++ b/config/landing.ts@@ -0,0 +1,67 @@+export type HowItWorksStep = {+ title: string;+ detail: string;+};++export const HOW_IT_WORKS_STEPS: HowItWorksStep[] = [+ {+ title: "Open an AI agent in an empty folder",+ detail:+ "Claude Code, Cursor, ChatGPT — whichever one you already use.",+ },+ {+ title: "Paste one prompt",+ detail:+ "It sets up the project, installs the remocn skill and opens a preview.",+ },+ {+ title: "A player opens in your browser",+ detail: "That's your video. Say what to change and it changes.",+ },+];++export const DIRECTOR_QUOTES: string[] = [+ "Make the logo land harder.",+ "The middle drags — cut two seconds.",+ "Use my brand colors.",+ "Show the pricing table after the features, not before.",+ "Slow the whole thing down.",+];++export type FaqItem = {+ question: string;+ answer: string;+};++export const FAQ_ITEMS: FaqItem[] = [+ {+ question: "Do I need to know how to code?",+ answer:+ "No, but you'll be working through an AI coding agent. If you've used Claude Code, Cursor or ChatGPT to build something before, you're already set. If not, the setup guide walks you through it in about ten minutes.",+ },+ {+ question: "Do I need After Effects or a video editor?",+ answer:+ "No. Everything happens in your browser and your agent. Nothing else to install, nothing else to learn.",+ },+ {+ question: "What am I actually installing?",+ answer:+ "A small video project on your machine, plus the pieces your video uses. Your agent sets it up. Nothing runs on our servers and nothing phones home.",+ },+ {+ question: "Can I change things after it's built?",+ answer:+ "Yes, by saying what to change. The preview updates while you watch, so you react to the video instead of guessing at settings.",+ },+ {+ question: "Is it free?",+ answer:+ "MIT. Everything copies onto your machine and it's yours — no account, no runtime, no lock-in.",+ },+ {+ question: "How long does the first video take?",+ answer:+ "An afternoon while you get the hang of it. After that, under an hour.",+ },+];diff --git a/lib/analytics.ts b/lib/analytics.tsindex cd2f8015..34635e9c 100644--- a/lib/analytics.ts+++ b/lib/analytics.ts@@ -10,9 +10,12 @@ export type PreviewSurface =| "docs";export type CtaId =- | "hero_browse"+ | "hero_start"+ | "hero_showcases"| "hero_ui_badge"- | "bento_browse"+ | "how_it_works_setup"+ | "director_guide"+ | "developer_docs"| "final_cta"| "github_header";