Skip to content

Production-ready animations, transitions, backgrounds, and scenes for Remotion

feat: remocn studio announcement bar (#290)

KapishDima634682ff10f1
diff --git a/app/(home)/components/site-footer.tsx b/app/(home)/components/site-footer.tsx
index 93265bc2..27a013e5 100644
--- a/app/(home)/components/site-footer.tsx
+++ b/app/(home)/components/site-footer.tsx
@@ -1,11 +1,14 @@
+import { ArrowUpRight } from "lucide-react";
import Link from "next/link";
import {
+ externalLinkProps,
FOOTER_GROUPS,
GITHUB_URL,
SUPPORT_EMAIL,
THREADS_URL,
X_URL,
} from "@/config/site";
+import { cn } from "@/lib/utils";
import { GitHubIcon } from "./github-icon";
import { HeaderLogo } from "./header-parts";
import { ThreadsIcon } from "./threads-icon";
@@ -53,8 +56,19 @@ export function SiteFooter() {
{group.label}
</span>
{group.links.map((link) => (
- <Link key={link.href} href={link.href} className={LINK_CLASS}>
+ <Link
+ key={link.href}
+ href={link.href}
+ {...externalLinkProps(link, "footer_external")}
+ className={cn(
+ LINK_CLASS,
+ link.external && "inline-flex items-center gap-0.5",
+ )}
+ >
{link.label}
+ {link.external && (
+ <ArrowUpRight className="size-3.5" aria-hidden="true" />
+ )}
</Link>
))}
</nav>
diff --git a/app/(home)/components/sticky-header-shell.tsx b/app/(home)/components/sticky-header-shell.tsx
index 1bb10132..c29ed848 100644
--- a/app/(home)/components/sticky-header-shell.tsx
+++ b/app/(home)/components/sticky-header-shell.tsx
@@ -2,6 +2,7 @@
import { animate, motion, useMotionValue } from "motion/react";
import { type ReactNode, useEffect, useRef } from "react";
+import { StudioBar } from "@/components/studio-bar";
import { useScroll } from "@/hooks/use-scroll";
import { cn } from "@/lib/utils";
@@ -83,6 +84,7 @@ export function StickyHeaderShell({ children }: { children: ReactNode }) {
style={{ y }}
className="fixed inset-x-0 top-0 z-40"
>
+ <StudioBar collapsed={scrolled} />
<div
className={cn(
"transition-[height,background-color,box-shadow] duration-300",
@@ -96,7 +98,7 @@ export function StickyHeaderShell({ children }: { children: ReactNode }) {
</div>
</div>
</motion.header>
- <div aria-hidden className="h-16" />
+ <div aria-hidden className="h-26 in-data-[studio-bar=dismissed]:h-16" />
</>
);
}
diff --git a/app/layout.tsx b/app/layout.tsx
index 9ccfbc75..122bcfc8 100644
--- a/app/layout.tsx
+++ b/app/layout.tsx
@@ -4,6 +4,7 @@ import { ThemeProvider } from "next-themes";
import { NuqsAdapter } from "nuqs/adapters/next/app";
import "./globals.css";
import { OpenPanelComponent } from "@openpanel/nextjs";
+import { STUDIO_BAR_SCRIPT } from "@/lib/studio-bar";
import { cn } from "@/lib/utils";
import { ThemeShortcut } from "./theme-shortcut";
@@ -74,6 +75,12 @@ export default function RootLayout({
inter.variable,
)}
>
+ <head>
+ <script
+ // biome-ignore lint/security/noDangerouslySetInnerHtml: restores the dismissed studio bar before first paint
+ dangerouslySetInnerHTML={{ __html: STUDIO_BAR_SCRIPT }}
+ />
+ </head>
<body className="min-h-full flex flex-col">
<NuqsAdapter>
<ThemeProvider
diff --git a/components/docs/docs-header.tsx b/components/docs/docs-header.tsx
index 7a4746d6..d0a4c0af 100644
--- a/components/docs/docs-header.tsx
+++ b/components/docs/docs-header.tsx
@@ -3,6 +3,7 @@ import {
HeaderActions,
HeaderLogo,
} from "@/app/(home)/components/header-parts";
+import { StudioBar } from "@/components/studio-bar";
import { NAV_LINKS } from "@/config/site";
/**
@@ -33,23 +34,26 @@ import { NAV_LINKS } from "@/config/site";
*/
export function DocsHeader() {
return (
- <header className="relative z-40 h-16 w-full border-b border-border bg-background/70 backdrop-blur-xl">
- <div className="mx-auto flex h-16 w-full max-w-(--fd-layout-width) items-center [--fd-layout-width:97rem] md:[--fd-sidebar-width:268px] xl:[--fd-toc-width:268px]">
- <div className="flex shrink-0 items-center px-6 md:w-(--fd-sidebar-width)">
- <HeaderLogo />
- </div>
- <div className="flex min-w-0 flex-1 items-center">
- <div className="mx-auto flex w-full max-w-[900px] items-center justify-between px-4 md:px-6 xl:px-8">
- <NavDesktop links={NAV_LINKS} className="-ml-4" />
- <div className="xl:hidden">
- <HeaderActions />
+ <>
+ <StudioBar />
+ <header className="relative z-40 h-16 w-full border-b border-border bg-background/70 backdrop-blur-xl">
+ <div className="mx-auto flex h-16 w-full max-w-(--fd-layout-width) items-center [--fd-layout-width:97rem] md:[--fd-sidebar-width:268px] xl:[--fd-toc-width:268px]">
+ <div className="flex shrink-0 items-center px-6 md:w-(--fd-sidebar-width)">
+ <HeaderLogo />
+ </div>
+ <div className="flex min-w-0 flex-1 items-center">
+ <div className="mx-auto flex w-full max-w-[900px] items-center justify-between px-4 md:px-6 xl:px-8">
+ <NavDesktop links={NAV_LINKS} className="-ml-4" />
+ <div className="xl:hidden">
+ <HeaderActions />
+ </div>
</div>
</div>
+ <div className="hidden shrink-0 items-center justify-end pe-4 xl:flex xl:w-(--fd-toc-width)">
+ <HeaderActions />
+ </div>
</div>
- <div className="hidden shrink-0 items-center justify-end pe-4 xl:flex xl:w-(--fd-toc-width)">
- <HeaderActions />
- </div>
- </div>
- </header>
+ </header>
+ </>
);
}
diff --git a/components/studio-bar.tsx b/components/studio-bar.tsx
new file mode 100644
index 00000000..f5e5b295
--- /dev/null
+++ b/components/studio-bar.tsx
@@ -0,0 +1,63 @@
+"use client";
+
+import { ArrowRight, X } from "lucide-react";
+import { NewBadge } from "@/components/docs/new-badge";
+import { STUDIO_URL } from "@/config/site";
+import { STUDIO_BAR_STORAGE_KEY } from "@/lib/studio-bar";
+import { cn } from "@/lib/utils";
+
+function dismiss() {
+ document.documentElement.dataset.studioBar = "dismissed";
+ try {
+ localStorage.setItem(STUDIO_BAR_STORAGE_KEY, "dismissed");
+ } catch {
+ return;
+ }
+}
+
+export function StudioBar({ collapsed = false }: { collapsed?: boolean }) {
+ return (
+ <div
+ inert={collapsed}
+ className={cn(
+ "grid grid-rows-[1fr] bg-muted transition-[grid-template-rows] duration-300 ease-out in-data-[studio-bar=dismissed]:hidden",
+ collapsed && "grid-rows-[0fr]",
+ )}
+ >
+ <div className="overflow-hidden">
+ <div className="section relative flex h-10 items-center justify-center">
+ <a
+ href={STUDIO_URL}
+ target="_blank"
+ rel="noreferrer"
+ data-track="cta_clicked"
+ data-cta="studio_bar"
+ data-destination={STUDIO_URL}
+ className="group inline-flex min-w-0 items-center mx-8 gap-2 rounded-full px-2 text-[13px] text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50"
+ >
+ <NewBadge className="ms-0" />
+ <span className="font-medium text-foreground">Remocn Studio</span>
+ <span className="hidden md:inline">
+ Your agent builds the video, you tune it
+ </span>
+ <span className="inline-flex items-center gap-1 font-medium text-foreground underline-offset-4 group-hover:underline group-focus-visible:underline">
+ Get the app
+ <ArrowRight
+ className="size-3.5 transition-transform duration-150 ease-out group-hover:translate-x-0.5"
+ aria-hidden="true"
+ />
+ </span>
+ </a>
+ <button
+ type="button"
+ onClick={dismiss}
+ aria-label="Dismiss"
+ className="absolute right-2 inline-flex size-8 items-center justify-center rounded-full text-muted-foreground transition-[color,background-color] duration-150 ease-out before:absolute before:-inset-1 hover:bg-foreground/5 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 sm:right-4"
+ >
+ <X className="size-4" aria-hidden="true" />
+ </button>
+ </div>
+ </div>
+ </div>
+ );
+}
diff --git a/config/site.ts b/config/site.ts
index 8c2b7eac..1fb7c990 100644
--- a/config/site.ts
+++ b/config/site.ts
@@ -1,3 +1,4 @@
+import type { CtaId } from "@/lib/analytics";
import remocnRegistry from "@/registry/remocn/registry.json";
import remocnIconsRegistry from "@/registry/remocn-icons/registry.json";
import remocnUiRegistry from "@/registry/remocn-ui/registry.json";
@@ -14,6 +15,8 @@ export const X_URL = "https://x.com/_remocn";
export const THREADS_URL = "https://www.threads.com/@_remocn";
+export const STUDIO_URL = "https://remocn.studio";
+
export const SUPPORT_EMAIL = "[email protected]";
export const INSTALL_ALL_NAMES: string[] = [
@@ -46,13 +49,24 @@ export type NavLink = {
label: string;
/** Hidden on mobile (matches the existing `hidden sm:inline` pattern). */
smOnly?: boolean;
+ external?: boolean;
};
+export function externalLinkProps(link: NavLink, cta: CtaId) {
+ if (!link.external) return {};
+ return {
+ target: "_blank",
+ rel: "noreferrer",
+ "data-track": "cta_clicked",
+ "data-cta": cta,
+ "data-destination": link.href,
+ };
+}
+
// Единый источник топ-навигации для landing / sponsors / docs.
export const NAV_LINKS: NavLink[] = [
{ href: "/docs/typography", label: "Components" },
{ href: "/docs/shaders/getting-started/introduction", label: "Shaders" },
- { href: "/docs/icons/gallery", label: "Icons" },
{ href: "/showcases", label: "Showcases" },
{ href: "/blog", label: "Blog" },
{ href: "/sponsors", label: "Sponsors" },
@@ -105,6 +119,7 @@ export const FOOTER_GROUPS: FooterGroup[] = [
{
label: "Project",
links: [
+ { href: STUDIO_URL, label: "Studio", external: true },
{ href: "/showcases", label: "Showcases" },
{ href: "/sponsors", label: "Sponsors" },
{ href: "/legal", label: "Privacy & Terms" },
diff --git a/lib/analytics.ts b/lib/analytics.ts
index 95b50c8e..ef6f3939 100644
--- a/lib/analytics.ts
+++ b/lib/analytics.ts
@@ -17,7 +17,9 @@ export type CtaId =
| "hero_templates_badge"
| "how_it_works_setup"
| "final_cta"
- | "github_header";
+ | "github_header"
+ | "studio_bar"
+ | "footer_external";
type AnalyticsEvents = {
install_command_copied: {
diff --git a/lib/studio-bar.ts b/lib/studio-bar.ts
new file mode 100644
index 00000000..1ed27396
--- /dev/null
+++ b/lib/studio-bar.ts
@@ -0,0 +1,3 @@
+export const STUDIO_BAR_STORAGE_KEY = "remocn-studio-bar";
+
+export const STUDIO_BAR_SCRIPT = `try{if(localStorage.getItem("${STUDIO_BAR_STORAGE_KEY}")==="dismissed")document.documentElement.dataset.studioBar="dismissed"}catch(e){}`;