Skip to content

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

feat: Inspired by page, end credits for the people remocn learned from

kapishdima472ef08d5acc
diff --git a/app/(home)/inspired-by/credits-config.ts b/app/(home)/inspired-by/credits-config.ts
new file mode 100644
index 00000000..1a319edc
--- /dev/null
+++ b/app/(home)/inspired-by/credits-config.ts
@@ -0,0 +1,98 @@
+export const CREDIT_MODES = ["roller", "cards", "static"] as const;
+export const CREDIT_ORDERS = ["listed", "shuffled"] as const;
+export const CREDIT_FONTS = ["sans", "mono"] as const;
+
+export type CreditMode = (typeof CREDIT_MODES)[number];
+
+/**
+ * Everything the credits render from. The page is a pure function of this
+ * object: the seed drives the shuffled order and the film-gate weave, so a
+ * saved config reproduces exactly what was saved.
+ */
+export type CreditsConfig = {
+ seed: number;
+ mode: CreditMode;
+ order: (typeof CREDIT_ORDERS)[number];
+ slate: string;
+ endCard: string;
+ /** roller: crawl speed, px per second */
+ speed: number;
+ /** roller: empty run between loops, in viewport heights */
+ loopGap: number;
+ /** cards: names per card */
+ perCard: number;
+ /** cards: seconds each card holds */
+ hold: number;
+ /** cards: crossfade, ms */
+ fade: number;
+ font: (typeof CREDIT_FONTS)[number];
+ uppercase: boolean;
+ fontSize: number;
+ /** letter-spacing, em */
+ tracking: number;
+ avatar: number;
+ /** distance from the center axis to the avatar and to the handle, px */
+ gutter: number;
+ rowGap: number;
+ /** space around the slate and the end card, px */
+ blockGap: number;
+ /** avatar grayscale at rest, 0..1 */
+ mute: number;
+ /** text opacity at rest, 0..1 */
+ dim: number;
+ /** film-gate weave amplitude, px */
+ weave: number;
+ /** projector flicker depth, 0..1 */
+ flicker: number;
+};
+
+export const DEFAULT_CREDITS: CreditsConfig = {
+ seed: 1,
+ mode: "roller",
+ order: "listed",
+ slate: "Inspired by",
+ endCard: "Thank you",
+ speed: 28,
+ loopGap: 0.6,
+ perCard: 1,
+ hold: 2.6,
+ fade: 700,
+ font: "sans",
+ uppercase: true,
+ fontSize: 15,
+ tracking: 0.14,
+ avatar: 36,
+ gutter: 14,
+ rowGap: 44,
+ blockGap: 120,
+ mute: 1,
+ dim: 0.82,
+ weave: 0.4,
+ flicker: 0.04,
+};
+
+/** mulberry32: a tiny seeded PRNG, so every random choice replays from the seed. */
+export function seeded(seed: number) {
+ let a = seed >>> 0;
+ return () => {
+ a = (a + 0x6d2b79f5) >>> 0;
+ let t = a;
+ t = Math.imul(t ^ (t >>> 15), t | 1);
+ t ^= t + Math.imul(t ^ (t >>> 7), t | 61);
+ return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
+ };
+}
+
+export function orderedHandles(
+ handles: readonly string[],
+ config: Pick<CreditsConfig, "order" | "seed">,
+) {
+ if (config.order === "listed") return [...handles];
+ const random = seeded(config.seed);
+ const out = [...handles];
+ for (let i = out.length - 1; i > 0; i--) {
+ const j = Math.floor(random() * (i + 1));
+ [out[i], out[j]] = [out[j], out[i]];
+ }
+ return out;
+}
diff --git a/app/(home)/inspired-by/credits.json b/app/(home)/inspired-by/credits.json
new file mode 100644
index 00000000..0b66039a
--- /dev/null
+++ b/app/(home)/inspired-by/credits.json
@@ -0,0 +1,24 @@
+{
+ "seed": 189486,
+ "mode": "roller",
+ "order": "shuffled",
+ "slate": "Inspired by",
+ "endCard": "Thank you",
+ "speed": 53,
+ "loopGap": 1.35,
+ "perCard": 1,
+ "hold": 2.6,
+ "fade": 700,
+ "font": "sans",
+ "uppercase": false,
+ "fontSize": 16,
+ "tracking": 0.04,
+ "avatar": 34,
+ "gutter": 8,
+ "rowGap": 42,
+ "blockGap": 120,
+ "mute": 1,
+ "dim": 0.72,
+ "weave": 0.4,
+ "flicker": 0.04
+}
diff --git a/app/(home)/inspired-by/credits.tsx b/app/(home)/inspired-by/credits.tsx
new file mode 100644
index 00000000..140123aa
--- /dev/null
+++ b/app/(home)/inspired-by/credits.tsx
@@ -0,0 +1,342 @@
+"use client";
+
+import { useReducedMotion } from "motion/react";
+import {
+ type CSSProperties,
+ type RefObject,
+ useEffect,
+ useRef,
+ useState,
+} from "react";
+import { cn } from "@/lib/utils";
+import { type CreditsConfig, orderedHandles, seeded } from "./credits-config";
+
+/**
+ * End credits for the people remocn learned from, in the site theme. The
+ * constraints are the film roller's: one size, one center axis (avatar on
+ * the left of it, handle on the right), hierarchy by spacing alone, a slate
+ * up front and an end card at the close.
+ */
+export function Credits({
+ config,
+ handles,
+}: {
+ config: CreditsConfig;
+ handles: readonly string[];
+}) {
+ const reduced = useReducedMotion();
+ const mode = reduced ? "static" : config.mode;
+ const gate = useRef<HTMLDivElement>(null);
+ useFilmGate(gate, config, !reduced);
+
+ const names = orderedHandles(handles, config);
+
+ return (
+ <div
+ className={cn(
+ "relative w-full text-foreground",
+ config.font === "mono" && "font-mono",
+ mode === "static" ? "py-24 md:py-32" : "h-[min(88svh,960px)]",
+ )}
+ >
+ <div ref={gate} className="h-full w-full will-change-transform">
+ {mode === "roller" && <Roller config={config} names={names} />}
+ {mode === "cards" && <Cards config={config} names={names} />}
+ {mode === "static" && <Reel config={config} names={names} />}
+ </div>
+ </div>
+ );
+}
+
+/**
+ * Gate weave and flicker: the whole frame jitters a fraction of a pixel and
+ * breathes in brightness at 24 fps, the way a print sits in a projector gate.
+ * Every frame's offsets come from the seed, so the motion replays exactly.
+ */
+function useFilmGate(
+ ref: RefObject<HTMLDivElement | null>,
+ { seed, weave, flicker }: CreditsConfig,
+ enabled: boolean,
+) {
+ useEffect(() => {
+ const el = ref.current;
+ if (!el) return;
+ if (!enabled || (weave === 0 && flicker === 0)) {
+ el.style.transform = "";
+ el.style.opacity = "";
+ return;
+ }
+ let raf = 0;
+ let last = -1;
+ const tick = (now: number) => {
+ const frame = Math.floor(now / (1000 / 24));
+ if (frame !== last) {
+ last = frame;
+ const random = seeded(seed * 7919 + frame);
+ const x = (random() - 0.5) * 2 * weave;
+ const y = (random() - 0.5) * 2 * weave;
+ el.style.transform = `translate(${x.toFixed(2)}px, ${y.toFixed(2)}px)`;
+ el.style.opacity = (1 - random() * flicker).toFixed(3);
+ }
+ raf = requestAnimationFrame(tick);
+ };
+ raf = requestAnimationFrame(tick);
+ return () => {
+ cancelAnimationFrame(raf);
+ el.style.transform = "";
+ el.style.opacity = "";
+ };
+ }, [ref, seed, weave, flicker, enabled]);
+}
+
+function textStyle(config: CreditsConfig): CSSProperties {
+ return {
+ fontSize: config.fontSize,
+ lineHeight: 1.3,
+ letterSpacing: `${config.tracking}em`,
+ textTransform: config.uppercase ? "uppercase" : undefined,
+ };
+}
+
+function Card({ text, config }: { text: string; config: CreditsConfig }) {
+ return (
+ <p className="text-center" style={textStyle(config)}>
+ {text}
+ </p>
+ );
+}
+
+function CreditRow({
+ handle,
+ config,
+ hidden,
+}: {
+ handle: string;
+ config: CreditsConfig;
+ hidden?: boolean;
+}) {
+ return (
+ <li>
+ <a
+ href={`https://x.com/${handle}`}
+ target="_blank"
+ rel="noreferrer"
+ tabIndex={hidden ? -1 : undefined}
+ className="group pointer-events-none grid grid-cols-2 items-center rounded-sm outline-none focus-visible:ring-2 focus-visible:ring-ring"
+ style={
+ {
+ columnGap: config.gutter * 2,
+ "--mute": config.mute,
+ "--dim": config.dim,
+ } as CSSProperties
+ }
+ >
+ {/* biome-ignore lint/performance/noImgElement: unavatar proxies arbitrary X avatars */}
+ <img
+ src={`https://unavatar.io/x/${handle}`}
+ alt=""
+ width={config.avatar}
+ height={config.avatar}
+ loading="lazy"
+ className="pointer-events-auto justify-self-end rounded-full bg-muted object-cover transition-[filter] duration-200 [filter:grayscale(var(--mute))] group-hover:[filter:none] group-focus-visible:[filter:none]"
+ style={{ width: config.avatar, height: config.avatar }}
+ />
+ <span
+ className="pointer-events-auto justify-self-start opacity-[var(--dim)] transition-opacity duration-200 group-hover:opacity-100 group-focus-visible:opacity-100"
+ style={textStyle(config)}
+ >
+ @{handle}
+ </span>
+ </a>
+ </li>
+ );
+}
+
+function CreditList({
+ names,
+ config,
+ hidden,
+}: {
+ names: string[];
+ config: CreditsConfig;
+ hidden?: boolean;
+}) {
+ return (
+ <ul className="flex flex-col" style={{ gap: config.rowGap }}>
+ {names.map((handle) => (
+ <CreditRow
+ key={handle}
+ handle={handle}
+ config={config}
+ hidden={hidden}
+ />
+ ))}
+ </ul>
+ );
+}
+
+/** One full pass: slate, every name, end card. */
+function Reel({
+ names,
+ config,
+ hidden,
+ style,
+}: {
+ names: string[];
+ config: CreditsConfig;
+ hidden?: boolean;
+ style?: CSSProperties;
+}) {
+ return (
+ <div
+ aria-hidden={hidden || undefined}
+ className="flex flex-col"
+ style={{ gap: config.blockGap, ...style }}
+ >
+ <Card text={config.slate} config={config} />
+ <CreditList names={names} config={config} hidden={hidden} />
+ <Card text={config.endCard} config={config} />
+ </div>
+ );
+}
+
+/**
+ * The crawl: two copies of the reel scroll up at a constant speed and wrap
+ * seamlessly. Hovering or focusing a name holds the frame.
+ */
+function Roller({ names, config }: { names: string[]; config: CreditsConfig }) {
+ const viewport = useRef<HTMLDivElement>(null);
+ const track = useRef<HTMLDivElement>(null);
+ const animation = useRef<Animation | null>(null);
+ const [height, setHeight] = useState(0);
+
+ useEffect(() => {
+ const el = viewport.current;
+ if (!el) return;
+ const observer = new ResizeObserver(() => setHeight(el.clientHeight));
+ observer.observe(el);
+ return () => observer.disconnect();
+ }, []);
+
+ const pad = (config.loopGap * height) / 2;
+
+ // biome-ignore lint/correctness/useExhaustiveDependencies: re-measure whenever the reel's layout can change
+ useEffect(() => {
+ const el = track.current;
+ const copy = el?.firstElementChild as HTMLElement | null;
+ if (!el || !copy || height === 0) return;
+ const distance = copy.offsetHeight;
+ const run = el.animate(
+ [
+ { transform: "translateY(0)" },
+ { transform: `translateY(${-distance}px)` },
+ ],
+ {
+ duration: (distance / config.speed) * 1000,
+ iterations: Number.POSITIVE_INFINITY,
+ },
+ );
+ animation.current = run;
+ return () => run.cancel();
+ }, [config, names, height, pad]);
+
+ useEffect(() => {
+ const el = viewport.current;
+ if (!el) return;
+ // Only a name holds the crawl: the row's link spans the full width to keep
+ // the axis centered, so its empty sides pass the pointer through and the
+ // pause keys off the avatar and handle alone.
+ const sync = (event: Event) => {
+ const onName = (event.target as Element | null)?.closest?.("a");
+ if (onName) animation.current?.pause();
+ else animation.current?.play();
+ };
+ const play = () => animation.current?.play();
+ const events = [
+ ["pointerover", sync],
+ ["pointerleave", play],
+ ["focusin", sync],
+ ["focusout", play],
+ ] as const;
+ for (const [type, listener] of events) el.addEventListener(type, listener);
+ return () => {
+ for (const [type, listener] of events) {
+ el.removeEventListener(type, listener);
+ }
+ };
+ }, []);
+
+ return (
+ <div
+ ref={viewport}
+ className="relative h-full overflow-hidden mask-[linear-gradient(to_bottom,transparent,#000_14%,#000_86%,transparent)]"
+ >
+ <div ref={track} className="will-change-transform">
+ <Reel
+ names={names}
+ config={config}
+ style={{ paddingTop: pad, paddingBottom: pad }}
+ />
+ <Reel
+ names={names}
+ config={config}
+ hidden
+ style={{ paddingTop: pad, paddingBottom: pad }}
+ />
+ </div>
+ </div>
+ );
+}
+
+/** Title cards: the slate, then names a few at a time, then the end card. */
+function Cards({ names, config }: { names: string[]; config: CreditsConfig }) {
+ const groups: string[][] = [];
+ for (let i = 0; i < names.length; i += config.perCard) {
+ groups.push(names.slice(i, i + config.perCard));
+ }
+ const count = groups.length + 2;
+ const [index, setIndex] = useState(0);
+
+ useEffect(() => {
+ const id = setInterval(
+ () => setIndex((current) => (current + 1) % count),
+ config.hold * 1000,
+ );
+ return () => clearInterval(id);
+ }, [count, config.hold]);
+
+ const shown = index % count;
+ const frames = [
+ <Card key="slate" text={config.slate} config={config} />,
+ ...groups.map((group, i) => (
+ <CreditList
+ key={group.join()}
+ names={group}
+ config={config}
+ hidden={shown !== i + 1}
+ />
+ )),
+ <Card key="end" text={config.endCard} config={config} />,
+ ];
+
+ return (
+ <div className="relative h-full">
+ <p className="sr-only">
+ {config.slate}: {names.map((handle) => `@${handle}`).join(", ")}
+ </p>
+ {frames.map((frame, i) => (
+ <div
+ key={frame.key}
+ aria-hidden={shown !== i || undefined}
+ className={cn(
+ "absolute inset-0 flex items-center justify-center transition-opacity ease-in-out",
+ shown === i ? "opacity-100" : "pointer-events-none opacity-0",
+ )}
+ style={{ transitionDuration: `${config.fade}ms` }}
+ >
+ <div className="w-full">{frame}</div>
+ </div>
+ ))}
+ </div>
+ );
+}
diff --git a/app/(home)/inspired-by/page.tsx b/app/(home)/inspired-by/page.tsx
new file mode 100644
index 00000000..435dfebb
--- /dev/null
+++ b/app/(home)/inspired-by/page.tsx
@@ -0,0 +1,29 @@
+import type { Metadata } from "next";
+import { INSPIRED_BY } from "@/config/inspired-by";
+import { Credits } from "./credits";
+import saved from "./credits.json";
+import type { CreditsConfig } from "./credits-config";
+
+const DESCRIPTION =
+ "The people on X whose work shaped remocn: motion, design and code we learned from.";
+
+export const metadata: Metadata = {
+ title: "Inspired by",
+ description: DESCRIPTION,
+ openGraph: { title: "Inspired by · remocn", description: DESCRIPTION },
+};
+
+/**
+ * The saved look from /lab/inspired-by, minus gate weave: on the live page
+ * the crawl itself is the motion, and a jittering frame on top reads as shake.
+ */
+const CONFIG: CreditsConfig = { ...(saved as CreditsConfig), weave: 0 };
+
+export default function InspiredByPage() {
+ return (
+ <section>
+ <h1 className="sr-only">Inspired by</h1>
+ <Credits config={CONFIG} handles={INSPIRED_BY} />
+ </section>
+ );
+}
diff --git a/app/api/lab/inspired-by/route.ts b/app/api/lab/inspired-by/route.ts
new file mode 100644
index 00000000..edc682b4
--- /dev/null
+++ b/app/api/lab/inspired-by/route.ts
@@ -0,0 +1,22 @@
+import { writeFile } from "node:fs/promises";
+import path from "node:path";
+import { type NextRequest, NextResponse } from "next/server";
+
+const TARGET = path.join(
+ process.cwd(),
+ "app",
+ "(home)",
+ "inspired-by",
+ "credits.json",
+);
+
+export async function POST(request: NextRequest) {
+ if (process.env.NODE_ENV === "production") {
+ return new NextResponse("Not found", { status: 404 });
+ }
+
+ const body = await request.json();
+ await writeFile(TARGET, `${JSON.stringify(body, null, 2)}\n`, "utf8");
+
+ return NextResponse.json({ path: path.relative(process.cwd(), TARGET) });
+}
diff --git a/app/lab/inspired-by/credits-lab.tsx b/app/lab/inspired-by/credits-lab.tsx
new file mode 100644
index 00000000..1db6df39
--- /dev/null
+++ b/app/lab/inspired-by/credits-lab.tsx
@@ -0,0 +1,343 @@
+"use client";
+
+import { useEffect, useState } from "react";
+import { Credits } from "@/app/(home)/inspired-by/credits";
+import saved from "@/app/(home)/inspired-by/credits.json";
+import {
+ CREDIT_FONTS,
+ CREDIT_MODES,
+ CREDIT_ORDERS,
+ type CreditsConfig,
+ DEFAULT_CREDITS,
+} from "@/app/(home)/inspired-by/credits-config";
+import { Button } from "@/components/ui/button";
+import { Input } from "@/components/ui/input";
+import { Label } from "@/components/ui/label";
+import {
+ NativeSelect,
+ NativeSelectOption,
+} from "@/components/ui/native-select";
+import { Slider } from "@/components/ui/slider";
+import { Switch } from "@/components/ui/switch";
+import { INSPIRED_BY } from "@/config/inspired-by";
+
+type NumberKey = {
+ [K in keyof CreditsConfig]: CreditsConfig[K] extends number ? K : never;
+}[keyof CreditsConfig];
+
+type Knob = {
+ key: NumberKey;
+ label: string;
+ min: number;
+ max: number;
+ step: number;
+};
+
+/** Bounds are the tested range: past them the reel breaks or turns to mush. */
+const KNOB_GROUPS: { title: string; knobs: Knob[] }[] = [
+ {
+ title: "Roller",
+ knobs: [
+ { key: "speed", label: "Speed, px/s", min: 8, max: 120, step: 1 },
+ { key: "loopGap", label: "Loop gap, vh", min: 0, max: 1.5, step: 0.05 },
+ ],
+ },
+ {
+ title: "Cards",
+ knobs: [
+ { key: "perCard", label: "Names per card", min: 1, max: 4, step: 1 },
+ { key: "hold", label: "Hold, s", min: 1, max: 6, step: 0.1 },
+ { key: "fade", label: "Crossfade, ms", min: 0, max: 1600, step: 50 },
+ ],
+ },
+ {
+ title: "Type",
+ knobs: [
+ { key: "fontSize", label: "Size, px", min: 11, max: 32, step: 1 },
+ { key: "tracking", label: "Tracking, em", min: 0, max: 0.4, step: 0.01 },
+ { key: "dim", label: "Text at rest", min: 0.4, max: 1, step: 0.02 },
+ ],
+ },
+ {
+ title: "Layout",
+ knobs: [
+ { key: "avatar", label: "Avatar, px", min: 20, max: 80, step: 1 },
+ { key: "gutter", label: "Axis gutter, px", min: 4, max: 48, step: 1 },
+ { key: "rowGap", label: "Row gap, px", min: 12, max: 120, step: 2 },
+ { key: "blockGap", label: "Block gap, px", min: 32, max: 320, step: 4 },
+ { key: "mute", label: "Avatar grayscale", min: 0, max: 1, step: 0.05 },
+ ],
+ },
+ {
+ title: "Projector",
+ knobs: [
+ { key: "weave", label: "Gate weave, px", min: 0, max: 2, step: 0.05 },
+ { key: "flicker", label: "Flicker", min: 0, max: 0.2, step: 0.005 },
+ ],
+ },
+];
+
+const RAIL_KEY = "remocn:inspired-by:saved";
+
+function newSeed() {
+ return Math.floor(Math.random() * 1_000_000);
+}
+
+export function CreditsLab() {
+ const [config, setConfig] = useState<CreditsConfig>({
+ ...DEFAULT_CREDITS,
+ ...(saved as Partial<CreditsConfig>),
+ });
+ const [rail, setRail] = useState<CreditsConfig[]>([]);
+ const [written, setWritten] = useState<string | null>(null);
+ const [panel, setPanel] = useState(true);
+
+ useEffect(() => {
+ const stored = localStorage.getItem(RAIL_KEY);
+ if (stored) setRail(JSON.parse(stored) as CreditsConfig[]);
+ }, []);
+
+ const set = <K extends keyof CreditsConfig>(
+ key: K,
+ value: CreditsConfig[K],
+ ) => setConfig((prev) => ({ ...prev, [key]: value }));
+
+ const save = async () => {
+ const json = JSON.stringify(config, null, 2);
+ await navigator.clipboard?.writeText(json).catch(() => undefined);
+ const response = await fetch("/api/lab/inspired-by", {
+ method: "POST",
+ headers: { "Content-Type": "application/json" },
+ body: json,
+ });
+ const body = (await response.json().catch(() => ({}))) as {
+ path?: string;
+ };
+ setWritten(body.path ?? "write failed");
+ const next = [config, ...rail].slice(0, 12);
+ setRail(next);
+ localStorage.setItem(RAIL_KEY, JSON.stringify(next));
+ };
+
+ return (
+ <div className="min-h-screen bg-background">
+ {/* Clicking the canvas rolls a new seed; links don't navigate in the lab. */}
+ <div
+ className="cursor-crosshair"
+ style={{ paddingRight: panel ? 380 : 0 }}
+ onClickCapture={(event) => {
+ event.preventDefault();
+ set("seed", newSeed());
+ }}
+ >
+ <Credits config={config} handles={INSPIRED_BY} />
+ </div>
+
+ <div className="fixed bottom-4 left-4 z-50 flex items-center gap-3">
+ <Button size="sm" variant="secondary" onClick={() => setPanel(!panel)}>
+ {panel ? "Hide panel" : "Show panel"}
+ </Button>
+ <span className="font-mono text-xs text-muted-foreground tabular-nums">
+ seed {config.seed}
+ </span>
+ </div>
+
+ {panel && (
+ <div className="fixed inset-y-0 right-0 z-50 flex w-[380px] flex-col gap-4 overflow-y-auto border-l border-border bg-background/95 p-4 text-foreground backdrop-blur">
+ <div className="flex items-center gap-2">
+ <Button size="sm" onClick={save}>
+ Save
+ </Button>
+ <Button
+ size="sm"
+ variant="secondary"
+ onClick={() => set("seed", newSeed())}
+ >
+ New seed
+ </Button>
+ <Button
+ size="sm"
+ variant="ghost"
+ onClick={() => setConfig(DEFAULT_CREDITS)}
+ >
+ Reset
+ </Button>
+ </div>
+ {written && (
+ <p className="font-mono text-[11px] text-muted-foreground">
+ wrote {written}
+ </p>
+ )}
+
+ <div className="grid grid-cols-3 gap-2">
+ <Select
+ label="Mode"
+ value={config.mode}
+ options={CREDIT_MODES}
+ onChange={(value) => set("mode", value)}
+ />
+ <Select
+ label="Order"
+ value={config.order}
+ options={CREDIT_ORDERS}
+ onChange={(value) => set("order", value)}
+ />
+ <Select
+ label="Font"
+ value={config.font}
+ options={CREDIT_FONTS}
+ onChange={(value) => set("font", value)}
+ />
+ </div>
+
+ <div className="flex items-center justify-between">
+ <Label htmlFor="uppercase" className="text-xs">
+ Uppercase
+ </Label>
+ <Switch
+ id="uppercase"
+ checked={config.uppercase}
+ onCheckedChange={(checked) => set("uppercase", checked)}
+ />
+ </div>
+
+ <TextField
+ id="slate"
+ label="Slate"
+ value={config.slate}
+ onChange={(value) => set("slate", value)}
+ />
+ <TextField
+ id="end-card"
+ label="End card"
+ value={config.endCard}
+ onChange={(value) => set("endCard", value)}
+ />
+
+ {KNOB_GROUPS.map((group) => (
+ <div key={group.title} className="flex flex-col gap-3">
+ <div className="h-px bg-border" />
+ <span className="text-[11px] tracking-wide text-muted-foreground uppercase">
+ {group.title}
+ </span>
+ {group.knobs.map((knob) => (
+ <KnobRow
+ key={knob.key}
+ knob={knob}
+ value={config[knob.key]}
+ onChange={(value) => set(knob.key, value)}
+ />
+ ))}
+ </div>
+ ))}
+
+ {rail.length > 0 && (
+ <div className="flex flex-col gap-2">
+ <div className="h-px bg-border" />
+ <span className="text-[11px] tracking-wide text-muted-foreground uppercase">
+ Saved
+ </span>
+ <div className="flex flex-wrap gap-1.5">
+ {rail.map((entry, i) => (
+ <Button
+ key={`${entry.seed}-${i}`}
+ size="sm"
+ variant="outline"
+ className="font-mono text-[11px]"
+ onClick={() => setConfig(entry)}
+ >
+ {entry.mode} · {entry.seed}
+ </Button>
+ ))}
+ </div>
+ </div>
+ )}
+ </div>
+ )}
+ </div>
+ );
+}
+
+function KnobRow({
+ knob,
+ value,
+ onChange,
+}: {
+ knob: Knob;
+ value: number;
+ onChange: (value: number) => void;
+}) {
+ const id = `knob-${knob.key}`;
+ return (
+ <div className="flex flex-col gap-1.5">
+ <div className="flex items-center justify-between">
+ <Label htmlFor={id} className="text-xs">
+ {knob.label}
+ </Label>
+ <span className="font-mono text-xs tabular-nums">{value}</span>
+ </div>
+ <Slider
+ id={id}
+ value={value}
+ min={knob.min}
+ max={knob.max}
+ step={knob.step}
+ onValueChange={(next) => onChange(Array.isArray(next) ? next[0] : next)}
+ />
+ </div>
+ );
+}
+
+function Select<T extends string>({
+ label,
+ value,
+ options,
+ onChange,
+}: {
+ label: string;
+ value: T;
+ options: readonly T[];
+ onChange: (value: T) => void;
+}) {
+ return (
+ <div className="flex flex-col gap-1.5">
+ <Label className="text-xs">{label}</Label>
+ <NativeSelect
+ size="sm"
+ value={value}
+ onChange={(event) => onChange(event.target.value as T)}
+ >
+ {options.map((option) => (
+ <NativeSelectOption key={option} value={option}>
+ {option}
+ </NativeSelectOption>
+ ))}
+ </NativeSelect>
+ </div>
+ );
+}
+
+function TextField({
+ id,
+ label,
+ value,
+ onChange,
+}: {
+ id: string;
+ label: string;
+ value: string;
+ onChange: (value: string) => void;
+}) {
+ return (
+ <div className="flex flex-col gap-1.5">
+ <Label htmlFor={id} className="text-xs">
+ {label}
+ </Label>
+ <Input
+ id={id}
+ value={value}
+ onChange={(event) => onChange(event.target.value)}
+ />
+ </div>
+ );
+}
diff --git a/app/lab/inspired-by/page.tsx b/app/lab/inspired-by/page.tsx
new file mode 100644
index 00000000..9d3693e0
--- /dev/null
+++ b/app/lab/inspired-by/page.tsx
@@ -0,0 +1,11 @@
+import type { Metadata } from "next";
+import { CreditsLab } from "./credits-lab";
+
+export const metadata: Metadata = {
+ title: "Inspired by lab",
+ robots: { index: false, follow: false },
+};
+
+export default function Page() {
+ return <CreditsLab />;
+}
diff --git a/config/inspired-by.ts b/config/inspired-by.ts
new file mode 100644
index 00000000..14bdd41f
--- /dev/null
+++ b/config/inspired-by.ts
@@ -0,0 +1,13 @@
+/** X handles credited on /inspired-by, in billing order. */
+export const INSPIRED_BY = [
+ "leodev",
+ "davidhaz",
+ "shadcn",
+ "iamncdai",
+ "SwamiMalode",
+ "jalcowastaken",
+ "yurygok",
+ "matsugfx",
+ "orcdev",
+ "dudufolio",
+] as const;
diff --git a/config/site.ts b/config/site.ts
index 5821f2ab..b871cf98 100644
--- a/config/site.ts
+++ b/config/site.ts
@@ -99,6 +99,7 @@ export const FOOTER_LINKS: NavLink[] = [
{ href: "/changelog", label: "Changelog" },
{ href: STUDIO_URL, label: "Studio", external: true },
{ href: "/sponsors", label: "Sponsors" },
+ { href: "/inspired-by", label: "Inspired by" },
{ href: GITHUB_URL, label: "GitHub", external: true },
{ href: X_URL, label: "X", external: true },
];