Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
feat: redesign get-started
dev_wandry45250a08cde4
diff --git a/app/(home)/components/sections/bento-registry.tsx b/app/(home)/components/sections/bento-registry.tsxindex 09f6db85..dd57a505 100644--- a/app/(home)/components/sections/bento-registry.tsx+++ b/app/(home)/components/sections/bento-registry.tsx@@ -158,7 +158,7 @@ export function BentoRegistry() {};return (- <section id="components" className="relative py-20 sm:py-32">+ <section id="components" className="relative py-20 sm:py-20"><div className={SECTION}><SectionHeadingeyebrow="The registry"diff --git a/app/(home)/components/sections/get-started.tsx b/app/(home)/components/sections/get-started.tsxindex 64a1b1d6..38b5c7bc 100644--- a/app/(home)/components/sections/get-started.tsx+++ b/app/(home)/components/sections/get-started.tsx@@ -1,43 +1,163 @@import { ArrowRight } from "lucide-react";import Link from "next/link";import { CodeBlockCommand } from "@/components/docs/code-block-command";-import { SECTION } from "@/config/landing";+import { LAVENDER, MINT, PEACH, SECTION } from "@/config/landing";import { convertNpmCommand } from "@/lib/convert-npm-command";import { FadeUp } from "../fade-up";import { SectionHeading } from "../section-heading";+import {+ SYNTAX_LIGHT,+ Token,+ TypewriterCodeBlock,+} from "../typewriter-code-block";type Step = {+ n: number;title: string;description: string;command: string;component?: string;+ /** Pastel accent that differentiates this step from its neighbours. */+ accent: string;};-const STEPS: Step[] = [- {- title: "Start with Remotion",- description:- "Already have a Remotion project? Skip ahead. Otherwise scaffold one in seconds.",- command: "npx create-video@latest",- },- {- title: "Add a component",- description:- "Pull any primitive or composition straight into your project with the shadcn CLI.",- command: "npx shadcn@latest add remocn/blur-reveal",- component: "blur-reveal",- },- {- title: "Render your video",- description:- "Drop the component into a composition and export an mp4 — no editor required.",- command: "npx remotion render",- },+const START: Step = {+ n: 1,+ title: "Start with Remotion",+ description:+ "Already have a Remotion project? Skip ahead. Otherwise scaffold one in seconds.",+ command: "npx create-video@latest",+ accent: PEACH,+};++const INIT: Step = {+ n: 2,+ title: "Set up shadcn",+ description:+ "Run the shadcn init once so the CLI knows where to drop component files in your project.",+ command: "npx shadcn@latest init",+ accent: MINT,+};++const ADD: Step = {+ n: 3,+ title: "Add a component",+ description:+ "Pull any primitive or composition straight into your project with the shadcn CLI — the code lands in your repo, yours to tweak.",+ command: "npx shadcn@latest add remocn/blur-reveal",+ component: "blur-reveal",+ accent: LAVENDER,+};++const RENDER: Step = {+ n: 4,+ title: "Render your video",+ description:+ "Drop the component into a composition and export an mp4 — no editor required.",+ command: "npx remotion render",+ accent: PEACH,+};++/** A taste of what `remocn/<name>` pulls in — fills the featured card. */+const SAMPLE_COMPONENTS = [+ "blur-reveal",+ "shimmer-sweep",+ "frosted-glass-wipe",+ "grid-pixelate-wipe",];+function StepBadge({ n, accent }: { n: number; accent: string }) {+ return (+ <span+ className="flex size-8 shrink-0 items-center justify-center rounded-full border font-mono text-sm font-medium text-foreground tabular-nums"+ style={{+ backgroundColor: `color-mix(in oklab, ${accent} 16%, transparent)`,+ borderColor: `color-mix(in oklab, ${accent} 45%, transparent)`,+ }}+ >+ {n}+ </span>+ );+}++function CompactStep({ step, delay }: { step: Step; delay: number }) {+ return (+ <FadeUp delay={delay}>+ <div className="surface-card flex flex-col gap-4 rounded-2xl p-5 sm:p-4">+ <div className="flex items-center gap-3">+ <StepBadge n={step.n} accent={step.accent} />+ <h3 className="text-base font-semibold tracking-tight text-foreground">+ {step.title}+ </h3>+ </div>+ <p className="text-sm leading-relaxed text-muted-foreground">+ {step.description}+ </p>+ <CodeBlockCommand+ component={step.component}+ variant="outline"+ {...convertNpmCommand(step.command)}+ />+ </div>+ </FadeUp>+ );+}++function FeaturedStep({ step, delay }: { step: Step; delay: number }) {+ return (+ <FadeUp delay={delay}>+ <div className="surface-card flex flex-col gap-5 rounded-2xl p-6 sm:rounded-3xl sm:p-6">+ <div className="flex items-center gap-3">+ <StepBadge n={step.n} accent={step.accent} />+ <h3 className="text-lg font-semibold tracking-tight text-foreground">+ {step.title}+ </h3>+ </div>++ <p className="text-sm leading-relaxed text-muted-foreground sm:text-base">+ {step.description}+ </p>++ <CodeBlockCommand+ component={step.component}+ variant="outline"+ {...convertNpmCommand(step.command)}+ />++ <TypewriterCodeBlock+ theme="light"+ header={false}+ text={<Token color={SYNTAX_LIGHT.string}>"Hello, world"</Token>}+ fontSize={<Token color={SYNTAX_LIGHT.number}>72</Token>}+ color={<Token color={SYNTAX_LIGHT.string}>"#171717"</Token>}+ fontWeight={<Token color={SYNTAX_LIGHT.number}>700</Token>}+ cursor={<Token color={SYNTAX_LIGHT.boolean}>true</Token>}+ />++ <div className="flex flex-wrap items-center gap-2 pt-1">+ {SAMPLE_COMPONENTS.map((name) => (+ <span+ key={name}+ className="rounded-lg border border-border bg-muted/40 px-2.5 py-1 text-xs text-muted-foreground"+ >+ {name}+ </span>+ ))}+ <Link+ href="/docs/components"+ className="rounded-lg px-2.5 py-1 text-xs text-muted-foreground/70 transition-colors hover:text-foreground focus-visible:text-foreground focus-visible:outline-none"+ >+ + more+ </Link>+ </div>+ </div>+ </FadeUp>+ );+}+export function GetStarted() {return (- <section id="get-started" className="relative py-20 sm:py-32">+ <section id="get-started" className="relative py-20 sm:py-20"><div className={SECTION}><SectionHeadingeyebrow="Get started"@@ -45,35 +165,16 @@ export function GetStarted() {lead="If you know shadcn/ui, you already know remocn. Three commands and you're rendering — the code lands in your repo, yours to tweak."/>- <div className="mt-12 flex flex-col gap-px overflow-hidden rounded-2xl border border-border bg-border sm:mt-16">- {STEPS.map((step, i) => (- <FadeUp key={step.title} delay={i * 0.08}>- <div className="flex flex-col gap-5 bg-background p-6 sm:flex-row sm:items-center sm:gap-8 sm:p-8">- <div className="flex items-start gap-4 sm:w-2/5">- <span className="flex size-8 shrink-0 items-center justify-center rounded-full border border-border font-mono text-sm font-medium text-muted-foreground tabular-nums">- {i + 1}- </span>- <div>- <h3 className="text-lg font-semibold tracking-tight text-foreground">- {step.title}- </h3>- <p className="mt-1.5 text-sm leading-relaxed text-muted-foreground">- {step.description}- </p>- </div>- </div>- <div className="sm:flex-1">- <CodeBlockCommand- component={step.component}- {...convertNpmCommand(step.command)}- />- </div>- </div>- </FadeUp>- ))}+ <div className="mt-12 grid items-start gap-4 sm:mt-16 sm:gap-6 md:grid-cols-2">+ <div className="flex flex-col gap-4 sm:gap-6.5">+ <CompactStep step={START} delay={0} />+ <CompactStep step={INIT} delay={0.08} />+ <CompactStep step={RENDER} delay={0.16} />+ </div>+ <FeaturedStep step={ADD} delay={0.08} /></div>- <FadeUp delay={0.1}>+ {/* <FadeUp delay={0.1}><div className="mt-8 flex justify-center"><Linkhref="/docs/getting-started/installation"@@ -83,7 +184,7 @@ export function GetStarted() {<ArrowRight className="size-4" aria-hidden="true" /></Link></div>- </FadeUp>+ </FadeUp> */}</div></section>);diff --git a/app/(home)/components/sections/interactive-code.tsx b/app/(home)/components/sections/interactive-code.tsxindex d00a0574..7d130c29 100644--- a/app/(home)/components/sections/interactive-code.tsx+++ b/app/(home)/components/sections/interactive-code.tsx@@ -1,12 +1,10 @@"use client";import { Player } from "@remotion/player";-import { ChevronDown } from "lucide-react";import { motion } from "motion/react";import {type KeyboardEvent,type PointerEvent,- type ReactNode,useCallback,useMemo,useRef,@@ -17,6 +15,7 @@ import { useTrackEvent } from "@/lib/analytics";import registry from "@/registry/__index__";import { FadeUp } from "../fade-up";import { SectionHeading } from "../section-heading";+import { SYNTAX_DARK, TypewriterCodeBlock } from "../typewriter-code-block";const COMPONENT = "typewriter";@@ -28,24 +27,6 @@ const DEFAULTS = {cursor: true,};-// Editor syntax palette — fixed dark theme so the card reads as a code editor-// in both light and dark site themes (mirrors the reference mock).-const SYNTAX = {- keyword: "#c792ea",- type: "#c9b3ff",- fn: "#82aaff",- prop: "#a6accd",- string: "#c3e88d",- number: "#89ddff",- boolean: "#f78c6c",- punctuation: "#676e95",- plain: "#bcc2e0",-};--function Token({ color, children }: { color: string; children: ReactNode }) {- return <span style={{ color }}>{children}</span>;-}-const CHIP ="rounded-[5px] bg-white/[0.07] px-1 align-baseline outline-none ring-1 ring-transparent transition-colors hover:bg-white/[0.12] focus-visible:bg-white/[0.12] focus-visible:ring-white/30";@@ -72,9 +53,11 @@ function DraggableNumber({}) {const [editing, setEditing] = useState(false);const [draft, setDraft] = useState("");- const drag = useRef<{ startX: number; startVal: number; moved: boolean } | null>(- null,- );+ const drag = useRef<{+ startX: number;+ startVal: number;+ moved: boolean;+ } | null>(null);const clamp = useCallback((n: number) => Math.min(max, Math.max(min, n)),@@ -140,7 +123,10 @@ function DraggableNumber({if (e.key === "Enter") commit();if (e.key === "Escape") setEditing(false);}}- style={{ color: SYNTAX.number, width: `${Math.max(draft.length, 1)}ch` }}+ style={{+ color: SYNTAX_DARK.number,+ width: `${Math.max(draft.length, 1)}ch`,+ }}className={EDIT_INPUT}/>);@@ -154,7 +140,7 @@ function DraggableNumber({onPointerMove={onPointerMove}onPointerUp={onPointerUp}onKeyDown={onKeyDown}- style={{ color: SYNTAX.number, touchAction: "none" }}+ style={{ color: SYNTAX_DARK.number, touchAction: "none" }}className={`${CHIP} cursor-ew-resize select-none`}>{value}@@ -180,7 +166,7 @@ function EditableString({if (editing) {return (- <span style={{ color: SYNTAX.string }}>+ <span style={{ color: SYNTAX_DARK.string }}>"<input// biome-ignore lint/a11y/noAutofocus: focus follows an explicit click-to-edit@@ -194,7 +180,7 @@ function EditableString({if (e.key === "Escape") setEditing(false);}}style={{- color: SYNTAX.string,+ color: SYNTAX_DARK.string,width: `${Math.max(draft.length, 1)}ch`,}}className={EDIT_INPUT}@@ -212,7 +198,7 @@ function EditableString({setDraft(value);setEditing(true);}}- style={{ color: SYNTAX.string }}+ style={{ color: SYNTAX_DARK.string }}className={`${CHIP} cursor-text`}>"{value}"@@ -230,7 +216,7 @@ function ColorValue({}) {return (<span- style={{ color: SYNTAX.string }}+ style={{ color: SYNTAX_DARK.string }}className={`${CHIP} relative inline-flex cursor-pointer items-center gap-1.5`}><span@@ -264,7 +250,7 @@ function ToggleBool({aria-label="Toggle cursor"aria-pressed={value}onClick={() => onChange(!value)}- style={{ color: SYNTAX.boolean }}+ style={{ color: SYNTAX_DARK.boolean }}className={`${CHIP} cursor-pointer select-none`}>{String(value)}@@ -315,7 +301,7 @@ export function InteractiveCode() {: "16 / 9";return (- <section id="showcase" className="relative py-20 sm:py-32">+ <section id="showcase" className="relative py-20 sm:py-20"><div className={SECTION}><SectionHeadingeyebrow="It's just props"@@ -326,100 +312,47 @@ export function InteractiveCode() {<FadeUp delay={0.1}><div className="mt-12 grid items-stretch gap-6 sm:mt-16 lg:grid-cols-2">{/* Interactive code editor — the JSX values are the controls. */}- <div className="relative overflow-hidden rounded-2xl bg-[#0f0e17] ring-1 ring-white/10 sm:rounded-3xl">- {/* Title bar */}- <div className="relative flex items-center justify-between border-b border-white/[0.06] px-5 py-4">- <div className="flex items-center gap-2">- <span className="size-3 rounded-full bg-white/15" />- <span className="size-3 rounded-full bg-white/15" />- <span className="size-3 rounded-full bg-white/15" />- </div>- <span className="inline-flex items-center gap-1.5 rounded-lg bg-white/5 px-2.5 py-1 text-xs font-medium text-white/55 ring-1 ring-white/10">- Typewriter- <ChevronDown className="size-3.5" />- </span>- </div>-- {/* Code */}- <pre className="relative overflow-x-auto px-6 py-6 font-mono text-[13px] leading-[1.95] whitespace-pre [scrollbar-width:none] sm:text-sm [&::-webkit-scrollbar]:hidden">- <code>- <Token color={SYNTAX.keyword}>import</Token>- <Token color={SYNTAX.plain}>{" { "}</Token>- <Token color={SYNTAX.type}>Typewriter</Token>- <Token color={SYNTAX.plain}>{" } "}</Token>- <Token color={SYNTAX.keyword}>from</Token>{" "}- <Token color={SYNTAX.string}>- "@/components/remocn/typewriter"- </Token>- <Token color={SYNTAX.punctuation}>;</Token>- {"\n\n"}- <Token color={SYNTAX.keyword}>export function</Token>{" "}- <Token color={SYNTAX.fn}>Hero</Token>- <Token color={SYNTAX.punctuation}>{"() {"}</Token>- {"\n "}- <Token color={SYNTAX.keyword}>return</Token>{" "}- <Token color={SYNTAX.punctuation}>(</Token>- {"\n "}- <Token color={SYNTAX.punctuation}>{"<"}</Token>- <Token color={SYNTAX.type}>Typewriter</Token>- {"\n "}- <Token color={SYNTAX.prop}>text</Token>- <Token color={SYNTAX.punctuation}>=</Token>- <EditableString value={text} onChange={set(setText, "text")} />- {"\n "}- <Token color={SYNTAX.prop}>fontSize</Token>- <Token color={SYNTAX.punctuation}>={"{"}</Token>- <DraggableNumber- value={fontSize}- onChange={set(setFontSize, "fontSize")}- min={48}- max={160}- step={1}- pxPerStep={4}- label="Font size"- />- <Token color={SYNTAX.punctuation}>{"}"}</Token>- {"\n "}- <Token color={SYNTAX.prop}>color</Token>- <Token color={SYNTAX.punctuation}>=</Token>- <ColorValue value={color} onChange={set(setColor, "color")} />- {"\n "}- <Token color={SYNTAX.prop}>fontWeight</Token>- <Token color={SYNTAX.punctuation}>={"{"}</Token>- <DraggableNumber- value={fontWeight}- onChange={set(setFontWeight, "fontWeight")}- min={100}- max={900}- step={100}- pxPerStep={10}- label="Font weight"- />- <Token color={SYNTAX.punctuation}>{"}"}</Token>- {"\n "}- <Token color={SYNTAX.prop}>cursor</Token>- <Token color={SYNTAX.punctuation}>={"{"}</Token>- <ToggleBool- value={cursor}- onChange={set(setCursor, "cursor")}- />- <Token color={SYNTAX.punctuation}>{"}"}</Token>- {"\n "}- <Token color={SYNTAX.punctuation}>{"/>"}</Token>- {"\n "}- <Token color={SYNTAX.punctuation}>)</Token>- {"\n"}- <Token color={SYNTAX.punctuation}>{"}"}</Token>- </code>- </pre>-- {/* Footer hint */}- <div className="relative flex justify-end px-6 pb-5">+ <TypewriterCodeBlock+ text={+ <EditableString value={text} onChange={set(setText, "text")} />+ }+ fontSize={+ <DraggableNumber+ value={fontSize}+ onChange={set(setFontSize, "fontSize")}+ min={48}+ max={160}+ step={1}+ pxPerStep={4}+ label="Font size"+ />+ }+ color={+ <ColorValue value={color} onChange={set(setColor, "color")} />+ }+ fontWeight={+ <DraggableNumber+ value={fontWeight}+ onChange={set(setFontWeight, "fontWeight")}+ min={100}+ max={900}+ step={100}+ pxPerStep={10}+ label="Font weight"+ />+ }+ cursor={+ <ToggleBool+ value={cursor}+ onChange={set(setCursor, "cursor")}+ />+ }+ footer={<span className="font-mono text-xs text-white/30">Drag or click values to edit</span>- </div>- </div>+ }+ />{/* Live preview — the real registry Typewriter. */}<motion.divdiff --git a/app/(home)/components/sections/landing-partners.tsx b/app/(home)/components/sections/landing-partners.tsxindex a42b9fe4..78479658 100644--- a/app/(home)/components/sections/landing-partners.tsx+++ b/app/(home)/components/sections/landing-partners.tsx@@ -34,7 +34,7 @@ export function LandingPartners() {const partners = sponsors.filter((s) => s.tier === "partner");return (- <section id="partners" className="relative py-20 sm:py-28">+ <section id="partners" className="relative py-20 sm:py-20"><div className={SECTION}><SectionHeadingalign="center"diff --git a/app/(home)/components/site-header.tsx b/app/(home)/components/site-header.tsxindex 857b1756..4bc12e9e 100644--- a/app/(home)/components/site-header.tsx+++ b/app/(home)/components/site-header.tsx@@ -87,7 +87,7 @@ export function SiteHeader({return (<headerclassName={cn(- "sticky inset-x-0 top-0 z-40 border-b transition-[background-color,border-color,padding] duration-300",+ "sticky inset-x-0 top-0 z-40 transition-[background-color,border-color,padding] duration-300",scrolled? "border-transparent bg-transparent py-3": "border-border bg-background/70 backdrop-blur-xl",diff --git a/app/(home)/components/typewriter-code-block.tsx b/app/(home)/components/typewriter-code-block.tsxnew file mode 100644index 00000000..671503c5--- /dev/null+++ b/app/(home)/components/typewriter-code-block.tsx@@ -0,0 +1,204 @@+import { ChevronDown } from "lucide-react";+import type { ReactNode } from "react";+import { cn } from "@/lib/utils";++export type CodeTheme = "light" | "dark";++export type SyntaxPalette = {+ keyword: string;+ type: string;+ fn: string;+ prop: string;+ string: string;+ number: string;+ boolean: string;+ punctuation: string;+ plain: string;+};++// Fixed dark editor palette (mirrors the reference mock).+export const SYNTAX_DARK: SyntaxPalette = {+ keyword: "#c792ea",+ type: "#c9b3ff",+ fn: "#82aaff",+ prop: "#a6accd",+ string: "#c3e88d",+ number: "#89ddff",+ boolean: "#f78c6c",+ punctuation: "#676e95",+ plain: "#bcc2e0",+};++// Light editor palette (GitHub-light flavoured) for the same token kinds.+export const SYNTAX_LIGHT: SyntaxPalette = {+ keyword: "#cf222e",+ type: "#116329",+ fn: "#8250df",+ prop: "#953800",+ string: "#0a3069",+ number: "#0550ae",+ boolean: "#0550ae",+ punctuation: "#6e7781",+ plain: "#1f2328",+};++export const SYNTAX: Record<CodeTheme, SyntaxPalette> = {+ dark: SYNTAX_DARK,+ light: SYNTAX_LIGHT,+};++// Chrome (surface, title bar, traffic lights, chip) per theme. Fixed colours —+// driven only by the `theme` prop, never by the site's next-theme.+const CHROME: Record<+ CodeTheme,+ { container: string; titleBar: string; dot: string; chip: string }+> = {+ dark: {+ container: "bg-[#0f0e17] ring-white/10",+ titleBar: "border-white/[0.06]",+ dot: "bg-white/15",+ chip: "bg-white/5 text-white/55 ring-white/10",+ },+ light: {+ container: "bg-[#f6f8fa] ring-black/[0.08]",+ titleBar: "border-black/[0.06]",+ dot: "bg-black/15",+ chip: "bg-black/[0.04] text-black/55 ring-black/[0.08]",+ },+};++export function Token({+ color,+ children,+}: {+ color: string;+ children: ReactNode;+}) {+ return <span style={{ color }}>{children}</span>;+}++/**+ * The `Typewriter` editor card: title bar + syntax-highlighted source. The+ * `theme` prop ("light" | "dark") fully controls the surface and the syntax+ * palette and is independent of the site theme. The five JSX prop values are+ * slots, so callers decide whether each one is a static {@link Token} or an+ * interactive control; `palette` is exposed so callers can colour their slots+ * to match the active theme.+ */+export function TypewriterCodeBlock({+ text,+ fontSize,+ color,+ fontWeight,+ cursor,+ footer,+ label = "Typewriter",+ theme = "dark",+ header = true,+ className,+}: {+ text: ReactNode;+ fontSize: ReactNode;+ color: ReactNode;+ fontWeight: ReactNode;+ cursor: ReactNode;+ footer?: ReactNode;+ label?: string;+ theme?: CodeTheme;+ className?: string;+ header?: boolean;+}) {+ const chrome = CHROME[theme];+ const palette = SYNTAX[theme];++ return (+ <div+ className={cn(+ "relative overflow-hidden rounded-2xl ring-1 sm:rounded-3xl",+ chrome.container,+ className,+ )}+ >+ {/* Title bar */}+ {header && (+ <div+ className={cn(+ "relative flex items-center justify-between border-b px-5 py-4",+ chrome.titleBar,+ )}+ >+ <div className="flex items-center gap-2">+ <span className={cn("size-3 rounded-full", chrome.dot)} />+ <span className={cn("size-3 rounded-full", chrome.dot)} />+ <span className={cn("size-3 rounded-full", chrome.dot)} />+ </div>+ <span+ className={cn(+ "inline-flex items-center gap-1.5 rounded-lg px-2.5 py-1 text-xs font-medium ring-1",+ chrome.chip,+ )}+ >+ {label}+ <ChevronDown className="size-3.5" />+ </span>+ </div>+ )}++ {/* Code */}+ <pre className="relative overflow-x-auto px-6 py-6 font-mono text-[13px] leading-[1.95] whitespace-pre [scrollbar-width:none] sm:text-sm [&::-webkit-scrollbar]:hidden">+ <code>+ <Token color={palette.keyword}>import</Token>+ <Token color={palette.plain}>{" { "}</Token>+ <Token color={palette.type}>Typewriter</Token>+ <Token color={palette.plain}>{" } "}</Token>+ <Token color={palette.keyword}>from</Token>{" "}+ <Token color={palette.string}>"@/components/remocn/typewriter"</Token>+ <Token color={palette.punctuation}>;</Token>+ {"\n\n"}+ <Token color={palette.keyword}>export function</Token>{" "}+ <Token color={palette.fn}>Hero</Token>+ <Token color={palette.punctuation}>{"() {"}</Token>+ {"\n "}+ <Token color={palette.keyword}>return</Token>{" "}+ <Token color={palette.punctuation}>(</Token>+ {"\n "}+ <Token color={palette.punctuation}>{"<"}</Token>+ <Token color={palette.type}>Typewriter</Token>+ {"\n "}+ <Token color={palette.prop}>text</Token>+ <Token color={palette.punctuation}>=</Token>+ {text}+ {"\n "}+ <Token color={palette.prop}>fontSize</Token>+ <Token color={palette.punctuation}>={"{"}</Token>+ {fontSize}+ <Token color={palette.punctuation}>{"}"}</Token>+ {"\n "}+ <Token color={palette.prop}>color</Token>+ <Token color={palette.punctuation}>=</Token>+ {color}+ {"\n "}+ <Token color={palette.prop}>fontWeight</Token>+ <Token color={palette.punctuation}>={"{"}</Token>+ {fontWeight}+ <Token color={palette.punctuation}>{"}"}</Token>+ {"\n "}+ <Token color={palette.prop}>cursor</Token>+ <Token color={palette.punctuation}>={"{"}</Token>+ {cursor}+ <Token color={palette.punctuation}>{"}"}</Token>+ {"\n "}+ <Token color={palette.punctuation}>{"/>"}</Token>+ {"\n "}+ <Token color={palette.punctuation}>)</Token>+ {"\n"}+ <Token color={palette.punctuation}>{"}"}</Token>+ </code>+ </pre>++ {footer ? (+ <div className="relative flex justify-end px-6 pb-5">{footer}</div>+ ) : null}+ </div>+ );+}diff --git a/components/docs/code-block-command.tsx b/components/docs/code-block-command.tsxindex a8244fcd..a0a19c7e 100644--- a/components/docs/code-block-command.tsx+++ b/components/docs/code-block-command.tsx@@ -27,6 +27,11 @@ export interface CodeBlockCommandProps {npm?: string;bun?: string;component?: string;+ /**+ * Surface treatment. `muted` (default) is the filled gray slab used in docs.+ * `outline` is a lighter bordered terminal that sits softer on light cards.+ */+ variant?: "muted" | "outline";}export function CodeBlockCommand({@@ -36,6 +41,7 @@ export function CodeBlockCommand({npm,bun,component,+ variant = "muted",}: CodeBlockCommandProps) {const [packageManager, setPackageManager] = usePackageManager();const trackEvent = useTrackEvent();@@ -53,7 +59,14 @@ export function CodeBlockCommand({const activeCommand = tabs[packageManager] || "";return (- <div className="not-prose relative overflow-hidden rounded-xl bg-muted">+ <div+ className={cn(+ "not-prose relative overflow-hidden rounded-xl",+ variant === "outline"+ ? "border border-border bg-card"+ : "bg-muted",+ )}+ ><TabsPrimitive.Rootvalue={packageManager}onValueChange={(value) => setPackageManager(value as PackageManager)}@@ -81,8 +94,7 @@ export function CodeBlockCommand({<TabsPrimitive.IndicatorclassName={cn("absolute bottom-0 left-0 -z-1",- "h-(--active-tab-height) w-(--active-tab-width)",- "translate-x-(--active-tab-left) -translate-y-(--active-tab-bottom)",+ "w-(--active-tab-width) translate-x-(--active-tab-left)","h-0.5 rounded-none bg-foreground","transition-[width,translate] duration-200 ease-in-out",)}