Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
{
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
"name": "collab-lockup",
"title": "Collab Lockup",
"description": "The Remocn logo and a partner logo join with an x under a glowing arc and caption.",
"dependencies": ["remotion", "@remotion/google-fonts"],
"files": [
{
"path": "registry/remocn/collab-lockup/index.tsx",
"content": "\"use client\";\n\nimport { loadFont as loadSerif } from \"@remotion/google-fonts/InstrumentSerif\";\nimport { loadFont as loadManrope } from \"@remotion/google-fonts/Manrope\";\nimport type React from \"react\";\nimport { useId } from \"react\";\nimport {\n AbsoluteFill,\n Easing,\n interpolate,\n spring,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\n\nconst manrope = loadManrope(\"normal\", {\n weights: [\"400\", \"500\", \"600\"],\n subsets: [\"latin\"],\n});\nconst sans = manrope.fontFamily;\nconst { fontFamily: serif } = loadSerif(\"italic\", {\n weights: [\"400\"],\n subsets: [\"latin\"],\n});\n\nexport interface CollabLockupProps {\n left?: string;\n right?: string;\n leftLogo?: React.ReactNode;\n rightLogo?: React.ReactNode;\n joiner?: \"×\" | \"&\";\n caption?: string;\n accent?: string;\n theme?: \"dark\" | \"light\";\n speed?: number;\n}\n\nconst DEFAULT_LEFT = \"remocn\";\nconst DEFAULT_RIGHT = \"Kitebase\";\n\n/** Manrope 500 advance widths (per 1000 em) for ASCII 32–126. */\nconst MANROPE_500 = [\n 200, 329, 417, 924, 602, 901, 657, 229, 435, 435, 446, 575, 278, 420, 270,\n 402, 626, 406, 578, 562, 596, 580, 621, 512, 591, 621, 314, 318, 622, 750,\n 622, 534, 907, 646, 619, 723, 681, 575, 510, 714, 697, 249, 476, 612, 518,\n 846, 696, 732, 616, 732, 640, 630, 600, 708, 616, 949, 622, 574, 630, 412,\n 402, 412, 673, 660, 506, 562, 600, 561, 600, 590, 362, 600, 604, 249, 263,\n 510, 249, 865, 604, 600, 600, 600, 374, 530, 412, 604, 523, 779, 536, 538,\n 531, 430, 269, 430, 680,\n];\nconst TRACK = -0.03;\n/** RemocnLogo width in em: R mark (0.76em tall) + 0.04em gap + \"emocn\" in Manrope 600 at -0.025em. */\nconst LOGO_EM = (0.76 * 124.06) / 134.26 + 0.04 + 3.271 - 5 * 0.025;\nconst MANROPE_BASELINE = 0.883;\n\nconst REMOCN_R_PATH =\n \"M 0.01 0.81 C 0.01 1.73, 0.36 2.79, 1.09 4.13 C 4.91 11.04, 13.45 17.16, 21.7 18.9 C 22.94 19.16, 23.18 19.16, 51.39 19.27 C 76.07 19.36, 80.02 19.4, 81.32 19.57 C 89.89 20.69, 96.2 24.68, 99.38 31.01 C 103.19 38.56, 102.53 50.1, 97.91 57.07 C 94.66 61.96, 89.68 64.99, 83.26 66 C 82.81 66.07, 70.18 66.83, 55.2 67.69 C 24.82 69.43, 27.03 69.23, 24.18 70.4 C 19.9 72.15, 14.84 75.7, 10.65 79.89 C 4.86 85.68, 1.3 91.91, 0.25 98.13 C 0.12 98.85, 0.08 103.13, 0.04 116.66 L 0 134.26 9.5 134.26 L 19 134.26 19.05 119.41 C 19.1 103.27, 19.08 103.82, 19.82 101.04 C 21.79 93.65, 27.86 88.75, 36.45 87.63 C 37.23 87.53, 39.41 87.5, 43.57 87.53 C 50.12 87.59, 50.75 87.65, 53.22 88.45 C 56.61 89.56, 59.67 91.86, 62.02 95.07 C 62.52 95.76, 69.35 103.85, 77.2 113.07 C 85.04 122.28, 91.63 130.04, 91.85 130.32 C 92.07 130.59, 92.5 131.34, 92.82 131.97 C 93.52 133.35, 94.11 133.93, 95.06 134.13 C 95.5 134.23, 98.97 134.26, 106.36 134.23 L 117.01 134.19 100.82 113.07 C 91.91 101.45, 84.52 91.78, 84.39 91.57 C 83.36 89.89, 83.66 87.53, 85.09 86 C 85.79 85.25, 86.36 84.94, 88.07 84.38 C 96.18 81.72, 104.15 76.62, 109.97 70.36 C 120.59 58.93, 124.06 44.32, 119.44 30.43 C 114.59 15.81, 101.93 4.02, 87.64 0.83 C 83.93 0.01, 88.09 0.08, 41.85 0.04 L 0.01 0 0.01 0.81 Z\";\n\n/** Full logo as on remocn.dev: R mark (0.76em tall, baseline-aligned) + \"emocn\" in Manrope 600, tracking-tight. */\nfunction RemocnLogo({ fontSize, color }: { fontSize: number; color: string }) {\n return (\n <div\n style={{\n display: \"flex\",\n alignItems: \"baseline\",\n color,\n fontFamily: manrope.fontFamily,\n fontWeight: 600,\n fontSize,\n letterSpacing: \"-0.025em\",\n lineHeight: 1,\n whiteSpace: \"nowrap\",\n }}\n >\n <svg\n viewBox=\"0 0 124.06 134.26\"\n style={{ height: \"0.76em\", width: \"auto\" }}\n aria-hidden\n >\n <path fill=\"currentColor\" d={REMOCN_R_PATH} />\n </svg>\n <span style={{ marginLeft: \"0.04em\" }}>emocn</span>\n </div>\n );\n}\n\nconst EASE_OUT = Easing.bezier(0.22, 1, 0.36, 1);\nconst EASE_IO = Easing.bezier(0.65, 0, 0.35, 1);\nconst CLAMP = {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n} as const;\n\nconst THEMES = {\n // gradients.sh \"radial-glow\": a lit horizon arc rising under the lockup.\n dark: {\n bg: \"#020204\",\n fg: \"#F3F2EF\",\n muted: \"#9A98A6\",\n rule: \"rgba(243,241,255,0.26)\",\n arc: [\n \"rgba(243,241,255,0.78)\",\n \"rgba(157,180,255,0.42)\",\n \"rgba(90,70,203,0.26)\",\n ],\n haze: \"rgba(90,70,203,0.2)\",\n grain: 0.07,\n },\n // gradients.sh \"pixel-glass\" (light): the same arc in violet, pink and blue.\n light: {\n bg: \"#F4F3F1\",\n fg: \"#121214\",\n muted: \"#6A6870\",\n rule: \"rgba(18,18,20,0.22)\",\n arc: [\n \"rgba(122,60,255,0.46)\",\n \"rgba(255,79,184,0.24)\",\n \"rgba(61,107,255,0.12)\",\n ],\n haze: \"rgba(61,107,255,0.08)\",\n grain: 0.045,\n },\n} as const;\n\nfunction em(text: string) {\n let w = 0;\n for (const ch of text) {\n const code = ch.charCodeAt(0);\n w += (code >= 32 && code < 127 ? MANROPE_500[code - 32] : 600) / 1000;\n w += TRACK;\n }\n return w;\n}\n\nfunction Grain({ opacity }: { opacity: number }) {\n const id = `g${useId().replace(/[^a-zA-Z0-9_-]/g, \"\")}`;\n return (\n <svg\n width=\"100%\"\n height=\"100%\"\n style={{ position: \"absolute\", inset: 0, opacity, pointerEvents: \"none\" }}\n aria-hidden\n >\n <filter id={id}>\n <feTurbulence\n type=\"fractalNoise\"\n baseFrequency=\"0.9\"\n numOctaves={2}\n seed={17}\n stitchTiles=\"stitch\"\n />\n <feColorMatrix values=\"0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0.9 0\" />\n </filter>\n <rect width=\"100%\" height=\"100%\" filter={`url(#${id})`} />\n </svg>\n );\n}\n\nfunction KiteMark({ size, color }: { size: number; color: string }) {\n return (\n <svg width={size} height={size} viewBox=\"0 0 48 48\" aria-hidden>\n <path d=\"M24 4 L41 20 L24 44 Z\" fill={color} />\n <path d=\"M24 4 L7 20 L24 44 Z\" fill={color} opacity={0.55} />\n </svg>\n );\n}\n\nfunction isRemocn(name: string) {\n return name.trim().toLowerCase() === \"remocn\";\n}\n\nfunction sideEm(name: string, logo: boolean) {\n if (isRemocn(name) && !logo) return LOGO_EM;\n return (logo ? 0.78 + 0.24 : 0) + em(name);\n}\n\nfunction Side({\n name,\n logo,\n size,\n color,\n}: {\n name: string;\n logo: React.ReactNode;\n size: number;\n color: string;\n}) {\n if (isRemocn(name) && !logo) {\n return <RemocnLogo fontSize={size} color={color} />;\n }\n return (\n <div\n style={{\n display: \"flex\",\n alignItems: \"baseline\",\n gap: logo ? size * 0.24 : 0,\n whiteSpace: \"nowrap\",\n }}\n >\n {logo ? (\n <div\n style={{\n alignSelf: \"baseline\",\n display: \"flex\",\n transform: `translateY(${size * 0.02}px)`,\n }}\n >\n {logo}\n </div>\n ) : null}\n <span\n style={{\n fontFamily: sans,\n fontWeight: 500,\n fontSize: size,\n lineHeight: 1,\n letterSpacing: `${TRACK}em`,\n color,\n }}\n >\n {name}\n </span>\n </div>\n );\n}\n\nexport function CollabLockup({\n left = DEFAULT_LEFT,\n right = DEFAULT_RIGHT,\n leftLogo,\n rightLogo,\n joiner = \"×\",\n caption = \"Launch videos, rendered from every Kitebase workspace.\",\n accent = \"#3B5BFD\",\n theme = \"dark\",\n speed = 1,\n}: CollabLockupProps) {\n const t = useCurrentFrame() * speed;\n const { width: W, height: H, fps } = useVideoConfig();\n const u = H / 720;\n const c = THEMES[theme];\n\n const joinerEm = joiner === \"&\" ? 0.62 : 0.42;\n const joinerScale = 1.7;\n const natural =\n sideEm(left, !!leftLogo) +\n sideEm(\n right,\n rightLogo === undefined ? right === DEFAULT_RIGHT : !!rightLogo,\n ) +\n joinerEm * joinerScale +\n 0.9;\n const N = Math.min(92 * u, (W * 0.8) / natural);\n const lockupW = natural * N + N * 0.2;\n const J = N * joinerScale;\n const markSize = N * 0.78;\n\n const lLogo = leftLogo ?? null;\n const rLogo =\n rightLogo ??\n (right === DEFAULT_RIGHT ? (\n <KiteMark size={markSize} color={c.fg} />\n ) : null);\n\n const glide = (start: number) => (frame: number) =>\n interpolate(frame, [start, start + 26], [0, 1], {\n ...CLAMP,\n easing: EASE_OUT,\n });\n const gL = glide(0);\n const gR = glide(2);\n const travel = W * 0.36;\n\n const drop = spring({\n frame: t - 16,\n fps,\n config: { damping: 22, stiffness: 170, mass: 0.9 },\n });\n const dropIn = interpolate(t, [16, 22], [0, 1], CLAMP);\n const impact = spring({\n frame: t - 25,\n fps,\n config: { damping: 11, stiffness: 220, mass: 0.6 },\n });\n const recoil = Math.sin(Math.min(1, impact) * Math.PI) * 7 * u;\n\n const rule = interpolate(t, [34, 62], [0, 1], { ...CLAMP, easing: EASE_IO });\n const cap = interpolate(t, [54, 78], [0, 1], { ...CLAMP, easing: EASE_OUT });\n const push = interpolate(t, [0, 150], [0, 1], CLAMP);\n\n const baseline = H * 0.47;\n const dawn = interpolate(t, [8, 70], [0, 1], { ...CLAMP, easing: EASE_IO });\n const arcY = 134 - dawn * 6 - push * 2;\n const ground = [\n `radial-gradient(64% 78% at 50% ${arcY}%, transparent 55%, ${c.arc[0]} 58.4%, ${c.arc[1]} 61.5%, ${c.arc[2]} 69%, transparent 84%)`,\n `radial-gradient(90% 55% at 50% ${arcY - 22}%, ${c.haze} 0%, transparent 70%)`,\n ].join(\", \");\n const gap = N * 0.42;\n\n const sideLayer = (side: \"l\" | \"r\") => {\n const g = side === \"l\" ? gL : gR;\n const dir = side === \"l\" ? -1 : 1;\n const x = (frame: number) => dir * (1 - g(frame)) * travel;\n const now = x(t);\n const v = now - x(t - 1);\n const off = now + dir * recoil;\n const opacity = interpolate(t, side === \"l\" ? [0, 9] : [2, 11], [0, 1], {\n ...CLAMP,\n });\n const node = (\n <Side\n name={side === \"l\" ? left : right}\n logo={side === \"l\" ? lLogo : rLogo}\n size={N}\n color={c.fg}\n />\n );\n const speedPx = Math.abs(v);\n const ghosts = speedPx > 2 * u ? [1, 2, 3] : [];\n return (\n <div\n style={{\n position: \"relative\",\n display: \"flex\",\n alignItems: \"baseline\",\n }}\n >\n {ghosts.map((k) => (\n <div\n key={k}\n style={{\n position: \"absolute\",\n left: 0,\n bottom: 0,\n opacity: opacity * (0.22 / k) * Math.min(1, speedPx / (20 * u)),\n transform: `translateX(${off - v * k * 0.45}px)`,\n }}\n >\n {node}\n </div>\n ))}\n <div\n style={{\n opacity,\n transform: `translateX(${off}px)`,\n }}\n >\n {node}\n </div>\n </div>\n );\n };\n\n const jy = (1 - drop) * -H * 0.55;\n const jr = (1 - drop) * (joiner === \"×\" ? -45 : -10);\n\n return (\n <AbsoluteFill style={{ background: c.bg, overflow: \"hidden\" }}>\n <AbsoluteFill\n style={{ background: ground, opacity: 0.25 + 0.75 * dawn }}\n />\n <AbsoluteFill\n style={{\n transform: `scale(${1 + push * 0.03})`,\n transformOrigin: `50% ${(baseline / H) * 100}%`,\n }}\n >\n <div\n style={{\n position: \"absolute\",\n left: 0,\n right: 0,\n bottom: H - baseline - N * (1 - MANROPE_BASELINE),\n display: \"flex\",\n justifyContent: \"center\",\n }}\n >\n <div\n style={{\n position: \"relative\",\n display: \"flex\",\n alignItems: \"baseline\",\n gap,\n }}\n >\n {sideLayer(\"l\")}\n {joiner === \"&\" ? (\n <span\n style={{\n fontFamily: serif,\n fontStyle: \"italic\",\n fontWeight: 400,\n fontSize: J,\n lineHeight: 0.8,\n color: accent,\n opacity: dropIn,\n display: \"inline-block\",\n transform: `translateY(${jy + J * 0.1}px) rotate(${jr}deg)`,\n transformOrigin: \"50% 70%\",\n }}\n >\n &\n </span>\n ) : (\n <svg\n width={N * 0.7}\n height={N * 0.7}\n viewBox=\"0 0 100 100\"\n aria-hidden\n style={{\n alignSelf: \"baseline\",\n opacity: dropIn,\n overflow: \"visible\",\n transform: `translateY(${jy - N * 0.01}px) rotate(${jr}deg)`,\n }}\n >\n <path d=\"M8 18 L18 8 L92 82 L82 92 Z\" fill={accent} />\n <path d=\"M82 8 L92 18 L18 92 L8 82 Z\" fill={accent} />\n </svg>\n )}\n {sideLayer(\"r\")}\n </div>\n </div>\n <div\n style={{\n position: \"absolute\",\n left: (W - lockupW) / 2,\n width: lockupW,\n top: baseline + N * 0.3,\n height: Math.max(1, u),\n background: c.rule,\n transform: `scaleX(${rule})`,\n }}\n />\n {caption ? (\n <div\n style={{\n position: \"absolute\",\n left: 0,\n right: 0,\n top: baseline + N * 0.3 + 30 * u,\n textAlign: \"center\",\n fontFamily: sans,\n fontWeight: 500,\n fontSize: 21 * u,\n lineHeight: 1.2,\n letterSpacing: \"-0.01em\",\n color: c.muted,\n opacity: cap,\n transform: `translateY(${(1 - cap) * 12 * u}px)`,\n whiteSpace: \"nowrap\",\n }}\n >\n {caption}\n </div>\n ) : null}\n </AbsoluteFill>\n <Grain opacity={c.grain} />\n </AbsoluteFill>\n );\n}\n",
"type": "registry:component",
"target": "components/remocn/collab-lockup.tsx"
}
],
"type": "registry:component"
}