Skip to content

🎥 Make videos programmatically with React

Update globals.css and use tailwind theme colors

ASchwad4bc11778944e
diff --git a/packages/template-prompt-to-motion-graphics/src/app/code-examples/page.tsx b/packages/template-prompt-to-motion-graphics/src/app/code-examples/page.tsx
index 47f19ce9d0..8fcb2c49a6 100644
--- a/packages/template-prompt-to-motion-graphics/src/app/code-examples/page.tsx
+++ b/packages/template-prompt-to-motion-graphics/src/app/code-examples/page.tsx
@@ -71,21 +71,21 @@ function DemoPageContent() {
const categories = Array.from(new Set(examples.map((e) => e.category)));
return (
- <div className="h-screen w-screen bg-[#0a0a0a] flex flex-col [&_::-webkit-scrollbar]:w-1.5 [&_::-webkit-scrollbar-track]:bg-transparent [&_::-webkit-scrollbar-thumb]:bg-[#333] [&_::-webkit-scrollbar-thumb]:rounded-full hover:[&_::-webkit-scrollbar-thumb]:bg-[#444]">
+ <div className="h-screen w-screen bg-background flex flex-col [&_::-webkit-scrollbar]:w-1.5 [&_::-webkit-scrollbar-track]:bg-transparent [&_::-webkit-scrollbar-thumb]:bg-border [&_::-webkit-scrollbar-thumb]:rounded-full hover:[&_::-webkit-scrollbar-thumb]:bg-secondary">
{/* Header with logo */}
<header className="flex items-center gap-6 py-8 px-12 shrink-0">
<div className="flex flex-col gap-2">
<Header asLink />
<Link
href="/"
- className="flex items-center gap-1.5 text-xs text-[#666] hover:text-white transition-colors"
+ className="flex items-center gap-1.5 text-xs text-muted-foreground-dim hover:text-foreground transition-colors"
>
<ArrowLeft className="w-3 h-3" />
Back to Home
</Link>
</div>
- <div className="h-10 w-px bg-[#333]" />
- <h1 className="text-sm font-medium text-[#888]">Example Gallery</h1>
+ <div className="h-10 w-px bg-border" />
+ <h1 className="text-sm font-medium text-muted-foreground">Example Gallery</h1>
</header>
{/* Main content with sidebar */}
@@ -101,7 +101,7 @@ function DemoPageContent() {
>
{categories.map((category) => (
<div key={category} className="mb-6">
- <h3 className="text-xs font-semibold text-[#666] uppercase tracking-wider mb-3">
+ <h3 className="text-xs font-semibold text-muted-foreground-dim uppercase tracking-wider mb-3">
{category}
</h3>
<div className="space-y-2">
@@ -118,14 +118,14 @@ function DemoPageContent() {
onClick={() => handleExampleSelect(example.id)}
className={`w-full text-left p-3 rounded-lg border transition-all ${
selectedExample.id === example.id
- ? "border-[#6366f1] bg-[#6366f1]/10 text-white"
- : "border-[#222] bg-[#111] text-gray-400 hover:border-[#333] hover:bg-[#1a1a1a]"
+ ? "border-primary bg-primary/10 text-foreground"
+ : "border-border-dim bg-muted text-gray-400 hover:border-border hover:bg-background-elevated"
}`}
>
<div className="font-medium text-sm">
{example.name}
</div>
- <div className="text-xs text-[#666] mt-1 line-clamp-2">
+ <div className="text-xs text-muted-foreground-dim mt-1 line-clamp-2">
{example.description}
</div>
</button>
@@ -141,7 +141,7 @@ function DemoPageContent() {
<div className="mb-4 flex items-center gap-4">
<button
onClick={() => setSidebarOpen(!sidebarOpen)}
- className="p-2 rounded-lg border border-[#222] bg-[#111] text-[#888] hover:text-white hover:border-[#333] transition-colors"
+ className="p-2 rounded-lg border border-border-dim bg-muted text-muted-foreground hover:text-foreground hover:border-border transition-colors"
title={sidebarOpen ? "Hide sidebar" : "Show sidebar"}
>
{sidebarOpen ? (
@@ -151,10 +151,10 @@ function DemoPageContent() {
)}
</button>
<div>
- <h2 className="text-lg font-semibold text-white">
+ <h2 className="text-lg font-semibold text-foreground">
{selectedExample.name}
</h2>
- <p className="text-sm text-[#666]">
+ <p className="text-sm text-muted-foreground-dim">
{selectedExample.description}
</p>
</div>
@@ -186,8 +186,8 @@ export default function DemoPage() {
return (
<Suspense
fallback={
- <div className="h-screen w-screen bg-[#0a0a0a] flex items-center justify-center">
- <div className="w-8 h-8 border-2 border-[#333] border-t-[#6366f1] rounded-full animate-spin" />
+ <div className="h-screen w-screen bg-background flex items-center justify-center">
+ <div className="w-8 h-8 border-2 border-border border-t-primary rounded-full animate-spin" />
</div>
}
>
diff --git a/packages/template-prompt-to-motion-graphics/src/app/generate/page.tsx b/packages/template-prompt-to-motion-graphics/src/app/generate/page.tsx
index 5231066f61..6d530481a7 100644
--- a/packages/template-prompt-to-motion-graphics/src/app/generate/page.tsx
+++ b/packages/template-prompt-to-motion-graphics/src/app/generate/page.tsx
@@ -164,8 +164,8 @@ function GeneratePageContent() {
function LoadingFallback() {
return (
- <div className="flex h-screen w-screen items-center justify-center bg-[#0a0a0a]">
- <Loader2 className="w-8 h-8 animate-spin text-white" />
+ <div className="flex h-screen w-screen items-center justify-center bg-background">
+ <Loader2 className="w-8 h-8 animate-spin text-foreground" />
</div>
);
}
diff --git a/packages/template-prompt-to-motion-graphics/src/app/page.tsx b/packages/template-prompt-to-motion-graphics/src/app/page.tsx
index a5145a9835..c570128976 100644
--- a/packages/template-prompt-to-motion-graphics/src/app/page.tsx
+++ b/packages/template-prompt-to-motion-graphics/src/app/page.tsx
@@ -64,32 +64,32 @@ const Home: NextPage = () => {
</h1>
<form onSubmit={handleSubmit} className="w-full max-w-3xl">
- <div className="bg-[#1a1a1a] rounded-xl border border-[#333] p-4">
+ <div className="bg-background-elevated rounded-xl border border-border p-4">
<textarea
value={prompt}
onChange={(e) => setPrompt(e.target.value)}
onKeyDown={handleKeyDown}
placeholder="Describe your animation..."
- className="w-full bg-transparent text-white placeholder:text-[#666] focus:outline-none resize-none overflow-y-auto text-base min-h-[60px] max-h-[200px]"
+ className="w-full bg-transparent text-foreground placeholder:text-muted-foreground-dim focus:outline-none resize-none overflow-y-auto text-base min-h-[60px] max-h-[200px]"
style={{ fieldSizing: "content" }}
disabled={isNavigating}
/>
- <div className="flex justify-between items-center mt-3 pt-3 border-t border-[#333]">
+ <div className="flex justify-between items-center mt-3 pt-3 border-t border-border">
<Select
value={model}
onValueChange={(value) => setModel(value as ModelId)}
disabled={isNavigating}
>
- <SelectTrigger className="w-auto bg-transparent border-none text-[#888] hover:text-white transition-colors">
+ <SelectTrigger className="w-auto bg-transparent border-none text-muted-foreground hover:text-foreground transition-colors">
<SelectValue />
</SelectTrigger>
- <SelectContent className="bg-[#1a1a1a] border-[#333]">
+ <SelectContent className="bg-background-elevated border-border">
{MODELS.map((m) => (
<SelectItem
key={m.id}
value={m.id}
- className="text-white focus:bg-[#333] focus:text-white"
+ className="text-foreground focus:bg-secondary focus:text-foreground"
>
{m.name}
</SelectItem>
@@ -100,7 +100,7 @@ const Home: NextPage = () => {
<button
type="submit"
disabled={isNavigating || !prompt.trim()}
- className="p-2 rounded-lg bg-white text-black hover:bg-gray-200 disabled:opacity-30 disabled:cursor-not-allowed transition-all"
+ className="p-2 rounded-lg bg-foreground text-background hover:bg-gray-200 disabled:opacity-30 disabled:cursor-not-allowed transition-all"
>
{isNavigating ? (
<Loader2 className="w-5 h-5 animate-spin" />
@@ -112,7 +112,7 @@ const Home: NextPage = () => {
</div>
<div className="flex flex-wrap items-center justify-center mt-6 gap-2">
- <span className="text-[#666] text-xs mr-1">Prompt examples</span>
+ <span className="text-muted-foreground-dim text-xs mr-1">Prompt examples</span>
{examplePrompts.map((example) => {
const Icon = iconMap[example.icon];
return (
@@ -124,7 +124,7 @@ const Home: NextPage = () => {
borderColor: `${example.color}40`,
color: example.color,
}}
- className="rounded-full bg-[#1a1a1a] border hover:brightness-125 transition-all flex items-center gap-1 px-1.5 py-0.5 text-[11px]"
+ className="rounded-full bg-background-elevated border hover:brightness-125 transition-all flex items-center gap-1 px-1.5 py-0.5 text-[11px]"
>
{Icon && <Icon className="w-3 h-3" />}
{example.headline}
@@ -136,7 +136,7 @@ const Home: NextPage = () => {
<div className="flex justify-center mt-4">
<Link
href="/code-examples"
- className="text-[#555] hover:text-[#888] text-xs transition-colors flex items-center gap-1"
+ className="text-muted-foreground-dim hover:text-muted-foreground text-xs transition-colors flex items-center gap-1"
>
View Code examples
<SquareArrowOutUpRight className="w-3 h-3" />
diff --git a/packages/template-prompt-to-motion-graphics/src/components/AnimationPlayer.tsx b/packages/template-prompt-to-motion-graphics/src/components/AnimationPlayer.tsx
index 315445116f..bb01d99212 100644
--- a/packages/template-prompt-to-motion-graphics/src/components/AnimationPlayer.tsx
+++ b/packages/template-prompt-to-motion-graphics/src/components/AnimationPlayer.tsx
@@ -5,12 +5,12 @@ import { Player, type ErrorFallback } from "@remotion/player";
const renderErrorFallback: ErrorFallback = ({ error }) => {
return (
- <div className="w-full h-full flex justify-center items-center bg-[#2a1a1a] p-10">
+ <div className="w-full h-full flex justify-center items-center bg-background-error p-10">
<div className="text-center max-w-[80%]">
- <div className="text-[#dc2626] text-3xl font-bold mb-4 font-sans">
+ <div className="text-destructive text-3xl font-bold mb-4 font-sans">
Runtime Error
</div>
- <div className="text-[#f87171] text-xl font-mono whitespace-pre-wrap break-words">
+ <div className="text-destructive-foreground text-xl font-mono whitespace-pre-wrap break-words">
{error.message || "An error occurred while rendering"}
</div>
</div>
@@ -39,14 +39,14 @@ export const AnimationPlayer: React.FC<AnimationPlayerProps> = ({
}) => {
if (isStreaming) {
return (
- <div className="flex flex-3 flex-col items-center bg-[#0a0a0a] min-w-0">
+ <div className="flex flex-3 flex-col items-center bg-background min-w-0">
<div className="w-full max-w-[1200px]">
- <h2 className="text-sm font-medium text-[#888] mb-3">
+ <h2 className="text-sm font-medium text-muted-foreground mb-3">
Video Preview
</h2>
- <div className="w-full aspect-video flex flex-col justify-center items-center gap-4 bg-[#1a1a1a] rounded-lg overflow-hidden shadow-[0_0_60px_rgba(0,0,0,0.5)]">
- <div className="w-12 h-12 border-4 border-[#333] border-t-[#6366f1] rounded-full animate-spin" />
- <p className="text-[#888] text-sm">
+ <div className="w-full aspect-video flex flex-col justify-center items-center gap-4 bg-background-elevated rounded-lg overflow-hidden shadow-[0_0_60px_rgba(0,0,0,0.5)]">
+ <div className="w-12 h-12 border-4 border-border border-t-primary rounded-full animate-spin" />
+ <p className="text-muted-foreground text-sm">
Waiting for code generation to finish...
</p>
</div>
@@ -57,13 +57,13 @@ export const AnimationPlayer: React.FC<AnimationPlayerProps> = ({
if (isCompiling) {
return (
- <div className="flex flex-3 flex-col items-center bg-[#0a0a0a] min-w-0">
+ <div className="flex flex-3 flex-col items-center bg-background min-w-0">
<div className="w-full max-w-[1200px]">
- <h2 className="text-sm font-medium text-[#888] mb-3">
+ <h2 className="text-sm font-medium text-muted-foreground mb-3">
Video Preview
</h2>
- <div className="w-full aspect-video flex justify-center items-center bg-[#1a1a1a] rounded-lg overflow-hidden shadow-[0_0_60px_rgba(0,0,0,0.5)]">
- <div className="w-12 h-12 border-4 border-[#333] border-t-[#6366f1] rounded-full animate-spin" />
+ <div className="w-full aspect-video flex justify-center items-center bg-background-elevated rounded-lg overflow-hidden shadow-[0_0_60px_rgba(0,0,0,0.5)]">
+ <div className="w-12 h-12 border-4 border-border border-t-primary rounded-full animate-spin" />
</div>
</div>
</div>
@@ -73,17 +73,17 @@ export const AnimationPlayer: React.FC<AnimationPlayerProps> = ({
if (error) {
const errorTitle = errorType === "api" ? "API Error" : "Compilation Error";
return (
- <div className="flex flex-3 flex-col items-center bg-[#0a0a0a] min-w-0">
+ <div className="flex flex-3 flex-col items-center bg-background min-w-0">
<div className="w-full max-w-[1200px]">
- <h2 className="text-sm font-medium text-[#888] mb-3">
+ <h2 className="text-sm font-medium text-muted-foreground mb-3">
Video Preview
</h2>
- <div className="w-full aspect-video flex justify-center items-center bg-[#2a1a1a] rounded-lg overflow-hidden shadow-[0_0_60px_rgba(0,0,0,0.5)] border border-[#dc2626]">
+ <div className="w-full aspect-video flex justify-center items-center bg-background-error rounded-lg overflow-hidden shadow-[0_0_60px_rgba(0,0,0,0.5)] border border-destructive">
<div className="text-center max-w-[80%]">
- <div className="text-[#dc2626] text-base font-semibold mb-2 font-sans">
+ <div className="text-destructive text-base font-semibold mb-2 font-sans">
{errorTitle}
</div>
- <div className="text-[#f87171] text-sm font-mono whitespace-pre-wrap break-words">
+ <div className="text-destructive-foreground text-sm font-mono whitespace-pre-wrap break-words">
{error}
</div>
</div>
@@ -95,12 +95,12 @@ export const AnimationPlayer: React.FC<AnimationPlayerProps> = ({
if (!Component) {
return (
- <div className="flex flex-3 flex-col items-center bg-[#0a0a0a] min-w-0">
+ <div className="flex flex-3 flex-col items-center bg-background min-w-0">
<div className="w-full max-w-[1200px]">
- <h2 className="text-sm font-medium text-[#888] mb-3">
+ <h2 className="text-sm font-medium text-muted-foreground mb-3">
Video Preview
</h2>
- <div className="w-full aspect-video flex justify-center items-center bg-[#1a1a1a] rounded-lg overflow-hidden shadow-[0_0_60px_rgba(0,0,0,0.5)] text-[#666] text-lg font-sans">
+ <div className="w-full aspect-video flex justify-center items-center bg-background-elevated rounded-lg overflow-hidden shadow-[0_0_60px_rgba(0,0,0,0.5)] text-muted-foreground-dim text-lg font-sans">
Select an example to get started
</div>
</div>
@@ -109,9 +109,9 @@ export const AnimationPlayer: React.FC<AnimationPlayerProps> = ({
}
return (
- <div className="flex flex-3 flex-col items-center bg-[#0a0a0a] min-w-0">
+ <div className="flex flex-3 flex-col items-center bg-background min-w-0">
<div className="w-full max-w-[1200px]">
- <h2 className="text-sm font-medium text-[#888] mb-3">Video Preview</h2>
+ <h2 className="text-sm font-medium text-muted-foreground mb-3">Video Preview</h2>
<div className="w-full aspect-video rounded-lg overflow-hidden shadow-[0_0_60px_rgba(0,0,0,0.5)]">
<Player
key={Component.toString()}
diff --git a/packages/template-prompt-to-motion-graphics/src/components/CodeEditor/CodeEditor.tsx b/packages/template-prompt-to-motion-graphics/src/components/CodeEditor/CodeEditor.tsx
index bdffb70cb2..6f87257110 100644
--- a/packages/template-prompt-to-motion-graphics/src/components/CodeEditor/CodeEditor.tsx
+++ b/packages/template-prompt-to-motion-graphics/src/components/CodeEditor/CodeEditor.tsx
@@ -17,8 +17,8 @@ import { EDITOR_STYLES } from "./styles";
const MonacoEditor = dynamic(() => import("@monaco-editor/react"), {
ssr: false,
loading: () => (
- <div className="w-[600px] h-full flex justify-center items-center bg-[#1e1e1e]">
- <span className="text-[#888] font-sans">Loading editor...</span>
+ <div className="w-[600px] h-full flex justify-center items-center bg-background-editor">
+ <span className="text-muted-foreground font-sans">Loading editor...</span>
</div>
),
});
@@ -271,8 +271,8 @@ export const CodeEditor: React.FC<CodeEditorProps> = ({
return (
<div className="flex-2 h-full flex flex-col">
- <h2 className="text-sm font-medium text-[#888] mb-3">Remotion Code</h2>
- <div className="flex-1 flex flex-col bg-[#1e1e1e] rounded-lg overflow-hidden">
+ <h2 className="text-sm font-medium text-muted-foreground mb-3">Remotion Code</h2>
+ <div className="flex-1 flex flex-col bg-background-editor rounded-lg overflow-hidden">
<EditorHeader filename="MyAnimation.tsx" code={code} />
<style>{EDITOR_STYLES}</style>
<div className="flex-1 overflow-hidden relative">
diff --git a/packages/template-prompt-to-motion-graphics/src/components/CodeEditor/CopyButton.tsx b/packages/template-prompt-to-motion-graphics/src/components/CodeEditor/CopyButton.tsx
index a21e502696..97d1e6c589 100644
--- a/packages/template-prompt-to-motion-graphics/src/components/CodeEditor/CopyButton.tsx
+++ b/packages/template-prompt-to-motion-graphics/src/components/CodeEditor/CopyButton.tsx
@@ -22,7 +22,7 @@ export const CopyButton: React.FC<CopyButtonProps> = ({ text, className }) => {
onClick={handleCopy}
className={
className ??
- "flex items-center gap-1.5 px-2 py-1 text-xs text-[#888] hover:text-white hover:bg-[#3a3a3a] rounded transition-colors"
+ "flex items-center gap-1.5 px-2 py-1 text-xs text-muted-foreground hover:text-foreground hover:bg-accent rounded transition-colors"
}
>
{copied ? (
diff --git a/packages/template-prompt-to-motion-graphics/src/components/CodeEditor/EditorHeader.tsx b/packages/template-prompt-to-motion-graphics/src/components/CodeEditor/EditorHeader.tsx
index 0c6b787d2a..053e91f196 100644
--- a/packages/template-prompt-to-motion-graphics/src/components/CodeEditor/EditorHeader.tsx
+++ b/packages/template-prompt-to-motion-graphics/src/components/CodeEditor/EditorHeader.tsx
@@ -13,8 +13,8 @@ export const EditorHeader: React.FC<EditorHeaderProps> = ({
code,
}) => {
return (
- <div className="flex items-center justify-between px-4 py-2 bg-[#252526] border-b border-[#2a2a2a]">
- <span className="text-xs text-[#888] font-mono">{filename}</span>
+ <div className="flex items-center justify-between px-4 py-2 bg-background-editor-header border-b border-accent">
+ <span className="text-xs text-muted-foreground font-mono">{filename}</span>
<CopyButton text={code} />
</div>
);
diff --git a/packages/template-prompt-to-motion-graphics/src/components/CodeEditor/StreamingOverlay.tsx b/packages/template-prompt-to-motion-graphics/src/components/CodeEditor/StreamingOverlay.tsx
index 749408495a..adb97fbf26 100644
--- a/packages/template-prompt-to-motion-graphics/src/components/CodeEditor/StreamingOverlay.tsx
+++ b/packages/template-prompt-to-motion-graphics/src/components/CodeEditor/StreamingOverlay.tsx
@@ -15,9 +15,9 @@ export const StreamingOverlay: React.FC<StreamingOverlayProps> = ({
return (
<div className="absolute inset-0 bg-black/40 z-10 flex items-center justify-center pointer-events-none">
- <div className="flex items-center gap-3 bg-[#1e1e1e] px-4 py-3 rounded-lg border border-[#333]">
- <div className="w-4 h-4 border-2 border-indigo-500 border-t-transparent rounded-full animate-spin" />
- <span className="text-white text-sm font-sans">{message}</span>
+ <div className="flex items-center gap-3 bg-background-editor px-4 py-3 rounded-lg border border-border">
+ <div className="w-4 h-4 border-2 border-primary border-t-transparent rounded-full animate-spin" />
+ <span className="text-foreground text-sm font-sans">{message}</span>
</div>
</div>
);
diff --git a/packages/template-prompt-to-motion-graphics/src/components/CodeEditor/styles.ts b/packages/template-prompt-to-motion-graphics/src/components/CodeEditor/styles.ts
index 4405b9ec9e..976a7dcb3c 100644
--- a/packages/template-prompt-to-motion-graphics/src/components/CodeEditor/styles.ts
+++ b/packages/template-prompt-to-motion-graphics/src/components/CodeEditor/styles.ts
@@ -1,4 +1,12 @@
export const EDITOR_STYLES = `
+ /* Override Monaco's vs-dark background to be darker than header */
+ .monaco-editor,
+ .monaco-editor .overflow-guard,
+ .monaco-editor-background,
+ .monaco-editor .inputarea.ime-input,
+ .monaco-editor .margin {
+ background-color: #1e1e1e !important;
+ }
.readonly-line {
background-color: rgba(80, 80, 80, 0.2) !important;
}
diff --git a/packages/template-prompt-to-motion-graphics/src/components/PageLayout.tsx b/packages/template-prompt-to-motion-graphics/src/components/PageLayout.tsx
index 5b0df0b638..0963f310db 100644
--- a/packages/template-prompt-to-motion-graphics/src/components/PageLayout.tsx
+++ b/packages/template-prompt-to-motion-graphics/src/components/PageLayout.tsx
@@ -14,7 +14,7 @@ export function PageLayout({
showLogoAsLink = false,
}: PageLayoutProps) {
return (
- <div className="h-screen w-screen bg-[#0a0a0a] flex flex-col">
+ <div className="h-screen w-screen bg-background flex flex-col">
<header className="flex justify-between items-start py-8 px-12 shrink-0">
<Header asLink={showLogoAsLink} />
{rightContent}
diff --git a/packages/template-prompt-to-motion-graphics/src/components/PromptInput.tsx b/packages/template-prompt-to-motion-graphics/src/components/PromptInput.tsx
index 882886b0f4..23857ab7c6 100644
--- a/packages/template-prompt-to-motion-graphics/src/components/PromptInput.tsx
+++ b/packages/template-prompt-to-motion-graphics/src/components/PromptInput.tsx
@@ -195,13 +195,13 @@ export const PromptInput = forwardRef<PromptInputRef, PromptInputProps>(
onSubmit={handleSubmit}
className={isLanding ? "w-full max-w-3xl" : ""}
>
- <div className="bg-[#1a1a1a] rounded-xl border border-[#333] p-4">
+ <div className="bg-background-elevated rounded-xl border border-border p-4">
<textarea
value={prompt}
onChange={(e) => setPrompt(e.target.value)}
onKeyDown={handleKeyDown}
placeholder="Describe your animation..."
- className={`w-full bg-transparent text-white placeholder:text-[#666] focus:outline-none resize-none overflow-y-auto ${
+ className={`w-full bg-transparent text-foreground placeholder:text-muted-foreground-dim focus:outline-none resize-none overflow-y-auto ${
isLanding
? "text-base min-h-[60px] max-h-[200px]"
: "text-sm min-h-[40px] max-h-[150px]"
@@ -210,21 +210,21 @@ export const PromptInput = forwardRef<PromptInputRef, PromptInputProps>(
disabled={isLoading}
/>
- <div className="flex justify-between items-center mt-3 pt-3 border-t border-[#333]">
+ <div className="flex justify-between items-center mt-3 pt-3 border-t border-border">
<Select
value={model}
onValueChange={(value) => setModel(value as ModelId)}
disabled={isLoading}
>
- <SelectTrigger className="w-auto bg-transparent border-none text-[#888] hover:text-white transition-colors">
+ <SelectTrigger className="w-auto bg-transparent border-none text-muted-foreground hover:text-foreground transition-colors">
<SelectValue />
</SelectTrigger>
- <SelectContent className="bg-[#1a1a1a] border-[#333]">
+ <SelectContent className="bg-background-elevated border-border">
{MODELS.map((m) => (
<SelectItem
key={m.id}
value={m.id}
- className="text-white focus:bg-[#333] focus:text-white"
+ className="text-foreground focus:bg-secondary focus:text-foreground"
>
{m.name}
</SelectItem>
@@ -235,7 +235,7 @@ export const PromptInput = forwardRef<PromptInputRef, PromptInputProps>(
<button
type="submit"
disabled={isLoading || !prompt.trim()}
- className="p-2 rounded-lg bg-white text-black hover:bg-gray-200 disabled:opacity-30 disabled:cursor-not-allowed transition-all"
+ className="p-2 rounded-lg bg-foreground text-background hover:bg-gray-200 disabled:opacity-30 disabled:cursor-not-allowed transition-all"
>
{isLoading ? (
<Loader2 className="w-5 h-5 animate-spin" />
@@ -251,7 +251,7 @@ export const PromptInput = forwardRef<PromptInputRef, PromptInputProps>(
isLanding ? "justify-center mt-6 gap-2" : ""
}`}
>
- <span className="text-[#666] text-xs mr-1">Prompt Examples</span>
+ <span className="text-muted-foreground-dim text-xs mr-1">Prompt Examples</span>
{examplePrompts.map((example) => {
const Icon = iconMap[example.icon];
return (
@@ -263,7 +263,7 @@ export const PromptInput = forwardRef<PromptInputRef, PromptInputProps>(
borderColor: `${example.color}40`,
color: example.color,
}}
- className={`rounded-full bg-[#1a1a1a] border hover:brightness-125 transition-all flex items-center gap-1 px-1.5 py-0.5 text-[11px]`}
+ className={`rounded-full bg-background-elevated border hover:brightness-125 transition-all flex items-center gap-1 px-1.5 py-0.5 text-[11px]`}
>
{Icon && (
<Icon className={isLanding ? "w-3 h-3" : "w-3 h-3"} />
diff --git a/packages/template-prompt-to-motion-graphics/src/components/SettingsModal.tsx b/packages/template-prompt-to-motion-graphics/src/components/SettingsModal.tsx
index 54bd15eab3..dc0985889f 100644
--- a/packages/template-prompt-to-motion-graphics/src/components/SettingsModal.tsx
+++ b/packages/template-prompt-to-motion-graphics/src/components/SettingsModal.tsx
@@ -36,19 +36,19 @@ export function SettingsModal({
Settings
</Button>
</DialogTrigger>
- <DialogContent className="sm:max-w-[425px] bg-[#1a1a1a] border-[#333] text-white">
+ <DialogContent className="sm:max-w-[425px] bg-background-elevated border-border text-foreground">
<DialogHeader>
<DialogTitle>Settings</DialogTitle>
- <DialogDescription className="text-[#888]">
+ <DialogDescription className="text-muted-foreground">
Configure your animation settings.
</DialogDescription>
</DialogHeader>
<div className="grid gap-6 py-4">
<div className="grid gap-4">
- <h3 className="text-sm font-medium text-white">Animation</h3>
+ <h3 className="text-sm font-medium text-foreground">Animation</h3>
<div className="grid grid-cols-2 gap-4">
<div className="grid gap-2">
- <label htmlFor="duration" className="text-[#888] text-sm">
+ <label htmlFor="duration" className="text-muted-foreground text-sm">
Duration (frames)
</label>
<input
@@ -60,11 +60,11 @@ export function SettingsModal({
onChange={(e) =>
onDurationChange(Math.max(1, parseInt(e.target.value) || 1))
}
- className="w-full px-3 py-2 rounded border border-[#333] bg-[#0f0f0f] text-white text-sm font-sans focus:outline-none focus:border-indigo-500"
+ className="w-full px-3 py-2 rounded border border-border bg-input text-foreground text-sm font-sans focus:outline-none focus:border-primary"
/>
</div>
<div className="grid gap-2">
- <label htmlFor="fps" className="text-[#888] text-sm">
+ <label htmlFor="fps" className="text-muted-foreground text-sm">
FPS
</label>
<input
@@ -78,11 +78,11 @@ export function SettingsModal({
Math.max(1, Math.min(60, parseInt(e.target.value) || 30)),
)
}
- className="w-full px-3 py-2 rounded border border-[#333] bg-[#0f0f0f] text-white text-sm font-sans focus:outline-none focus:border-indigo-500"
+ className="w-full px-3 py-2 rounded border border-border bg-input text-foreground text-sm font-sans focus:outline-none focus:border-primary"
/>
</div>
</div>
- <p className="text-xs text-[#666]">
+ <p className="text-xs text-muted-foreground-dim">
Video length: {(durationInFrames / fps).toFixed(2)}s (
{durationInFrames} frames / {fps} FPS)
</p>
diff --git a/packages/template-prompt-to-motion-graphics/src/components/ui/button.tsx b/packages/template-prompt-to-motion-graphics/src/components/ui/button.tsx
index 9f8975b07d..459b4af923 100644
--- a/packages/template-prompt-to-motion-graphics/src/components/ui/button.tsx
+++ b/packages/template-prompt-to-motion-graphics/src/components/ui/button.tsx
@@ -6,17 +6,17 @@ import { cn } from "@/lib/utils"
import { Spinner } from "./spinner"
const buttonVariants = cva(
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all cursor-pointer disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all cursor-pointer disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 aria-invalid:border-destructive",
{
variants: {
variant: {
- default: "bg-indigo-500 text-white hover:bg-indigo-600",
- destructive: "bg-red-600 text-white hover:bg-red-700",
+ default: "bg-primary text-primary-foreground hover:bg-primary-hover",
+ destructive: "bg-destructive text-foreground hover:bg-destructive/90",
outline:
- "border border-[#333] bg-transparent text-white hover:bg-[#2a2a2a]",
- secondary: "bg-[#333] text-white hover:bg-[#444]",
- ghost: "text-white hover:bg-[#2a2a2a]",
- link: "text-indigo-400 underline-offset-4 hover:underline",
+ "border border-border bg-transparent text-foreground hover:bg-accent",
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
+ ghost: "text-foreground hover:bg-accent",
+ link: "text-primary underline-offset-4 hover:underline",
},
size: {
default: "h-10 px-4 py-2",
diff --git a/packages/template-prompt-to-motion-graphics/src/components/ui/input.tsx b/packages/template-prompt-to-motion-graphics/src/components/ui/input.tsx
index 89169058d0..f027d44341 100644
--- a/packages/template-prompt-to-motion-graphics/src/components/ui/input.tsx
+++ b/packages/template-prompt-to-motion-graphics/src/components/ui/input.tsx
@@ -8,9 +8,9 @@ function Input({ className, type, ...props }: React.ComponentProps<"input">) {
type={type}
data-slot="input"
className={cn(
- "file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
+ "file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
- "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
+ "aria-invalid:ring-destructive/20 aria-invalid:border-destructive",
className
)}
{...props}
diff --git a/packages/template-prompt-to-motion-graphics/src/components/ui/select.tsx b/packages/template-prompt-to-motion-graphics/src/components/ui/select.tsx
index 25e54394d5..a1405e916b 100644
--- a/packages/template-prompt-to-motion-graphics/src/components/ui/select.tsx
+++ b/packages/template-prompt-to-motion-graphics/src/components/ui/select.tsx
@@ -37,7 +37,7 @@ function SelectTrigger({
data-slot="select-trigger"
data-size={size}
className={cn(
- "border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
+ "data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex w-fit items-center justify-between gap-2 rounded-md bg-transparent px-3 py-2 text-sm whitespace-nowrap transition-colors outline-none disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
className
)}
{...props}
diff --git a/packages/template-prompt-to-motion-graphics/styles/global.css b/packages/template-prompt-to-motion-graphics/styles/global.css
index a892389b31..e381b464bc 100644
--- a/packages/template-prompt-to-motion-graphics/styles/global.css
+++ b/packages/template-prompt-to-motion-graphics/styles/global.css
@@ -1,14 +1,8 @@
@import "tailwindcss";
@import "tw-animate-css";
-@custom-variant dark (&:is(.dark *));
-
:root {
- --unfocused-border-color: #eaeaea;
- --focused-border-color: #666;
-
- --button-disabled-color: #fafafa;
- --disabled-text-color: #999;
+ --unfocused-border-color: #333;
--geist-border-radius: 5px;
--geist-quarter-pad: 6px;
@@ -16,94 +10,40 @@
--geist-pad: 24px;
--geist-font: "Inter";
- --geist-error: #e00;
-
- --subtitle: #666;
+ --geist-error: #dc2626;
--radius: 0.625rem;
- --background: oklch(1 0 0);
-
- --foreground: oklch(0.145 0 0);
-
- --card: oklch(1 0 0);
-
- --card-foreground: oklch(0.145 0 0);
-
- --popover: oklch(1 0 0);
-
- --popover-foreground: oklch(0.145 0 0);
-
- --primary: oklch(0.205 0 0);
-
- --primary-foreground: oklch(0.985 0 0);
-
- --secondary: oklch(0.97 0 0);
-
- --secondary-foreground: oklch(0.205 0 0);
-
- --muted: oklch(0.97 0 0);
-
- --muted-foreground: oklch(0.556 0 0);
-
- --accent: oklch(0.97 0 0);
-
- --accent-foreground: oklch(0.205 0 0);
-
- --destructive: oklch(0.577 0.245 27.325);
-
- --border: oklch(0.922 0 0);
-
- --input: oklch(0.922 0 0);
-
- --ring: oklch(0.708 0 0);
-
- --chart-1: oklch(0.646 0.222 41.116);
-
- --chart-2: oklch(0.6 0.118 184.704);
-
- --chart-3: oklch(0.398 0.07 227.392);
-
- --chart-4: oklch(0.828 0.189 84.429);
-
- --chart-5: oklch(0.769 0.188 70.08);
-
- --sidebar: oklch(0.985 0 0);
-
- --sidebar-foreground: oklch(0.145 0 0);
-
- --sidebar-primary: oklch(0.205 0 0);
-
- --sidebar-primary-foreground: oklch(0.985 0 0);
-
- --sidebar-accent: oklch(0.97 0 0);
-
- --sidebar-accent-foreground: oklch(0.205 0 0);
-
- --sidebar-border: oklch(0.922 0 0);
-
- --sidebar-ring: oklch(0.708 0 0);
-}
-
-@media (prefers-color-scheme: dark) {
- :root {
- --unfocused-border-color: #333;
- --focused-border-color: #888;
- --button-disabled-color: #111;
- --geist-error: red;
- --subtitle: #8d8d8d;
- }
+ /* Dark theme colors */
+ --background: #0a0a0a;
+ --background-elevated: #1a1a1a;
+ --background-editor: #1e1e1e;
+ --background-editor-header: #2d2d2d;
+ --background-error: #2a1a1a;
+ --foreground: #ffffff;
+ --primary: #0B84F3;
+ --primary-hover: #0a75d9;
+ --primary-foreground: #ffffff;
+ --secondary: #333;
+ --secondary-foreground: #ffffff;
+ --muted: #111;
+ --muted-foreground: #888;
+ --muted-foreground-dim: #666;
+ --accent: #2a2a2a;
+ --accent-foreground: #ffffff;
+ --destructive: #dc2626;
+ --destructive-foreground: #f87171;
+ --border: #333;
+ --border-dim: #222;
+ --input: #0f0f0f;
+ --ring: #333;
}
@theme {
--color-foreground: var(--foreground);
--color-background: var(--background);
--color-unfocused-border-color: var(--unfocused-border-color);
- --color-focused-border-color: var(--focused-border-color);
- --color-button-disabled-color: var(--button-disabled-color);
- --color-disabled-text-color: var(--disabled-text-color);
--color-geist-error: var(--geist-error);
- --color-subtitle: var(--subtitle);
--padding-geist-quarter: var(--geist-quarter-pad);
--padding-geist-half: var(--geist-half-pad);
--padding-geist: var(--geist-pad);
@@ -143,70 +83,27 @@ body {
--radius-lg: var(--radius);
--radius-xl: calc(var(--radius) + 4px);
--color-background: var(--background);
+ --color-background-elevated: var(--background-elevated);
+ --color-background-editor: var(--background-editor);
+ --color-background-editor-header: var(--background-editor-header);
+ --color-background-error: var(--background-error);
--color-foreground: var(--foreground);
- --color-card: var(--card);
- --color-card-foreground: var(--card-foreground);
- --color-popover: var(--popover);
- --color-popover-foreground: var(--popover-foreground);
--color-primary: var(--primary);
+ --color-primary-hover: var(--primary-hover);
--color-primary-foreground: var(--primary-foreground);
--color-secondary: var(--secondary);
--color-secondary-foreground: var(--secondary-foreground);
--color-muted: var(--muted);
--color-muted-foreground: var(--muted-foreground);
+ --color-muted-foreground-dim: var(--muted-foreground-dim);
--color-accent: var(--accent);
--color-accent-foreground: var(--accent-foreground);
--color-destructive: var(--destructive);
+ --color-destructive-foreground: var(--destructive-foreground);
--color-border: var(--border);
+ --color-border-dim: var(--border-dim);
--color-input: var(--input);
--color-ring: var(--ring);
- --color-chart-1: var(--chart-1);
- --color-chart-2: var(--chart-2);
- --color-chart-3: var(--chart-3);
- --color-chart-4: var(--chart-4);
- --color-chart-5: var(--chart-5);
- --color-sidebar: var(--sidebar);
- --color-sidebar-foreground: var(--sidebar-foreground);
- --color-sidebar-primary: var(--sidebar-primary);
- --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
- --color-sidebar-accent: var(--sidebar-accent);
- --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
- --color-sidebar-border: var(--sidebar-border);
- --color-sidebar-ring: var(--sidebar-ring);
-}
-
-.dark {
- --background: oklch(0.145 0 0);
- --foreground: oklch(0.985 0 0);
- --card: oklch(0.205 0 0);
- --card-foreground: oklch(0.985 0 0);
- --popover: oklch(0.205 0 0);
- --popover-foreground: oklch(0.985 0 0);
- --primary: oklch(0.922 0 0);
- --primary-foreground: oklch(0.205 0 0);
- --secondary: oklch(0.269 0 0);
- --secondary-foreground: oklch(0.985 0 0);
- --muted: oklch(0.269 0 0);
- --muted-foreground: oklch(0.708 0 0);
- --accent: oklch(0.269 0 0);
- --accent-foreground: oklch(0.985 0 0);
- --destructive: oklch(0.704 0.191 22.216);
- --border: oklch(1 0 0 / 10%);
- --input: oklch(1 0 0 / 15%);
- --ring: oklch(0.556 0 0);
- --chart-1: oklch(0.488 0.243 264.376);
- --chart-2: oklch(0.696 0.17 162.48);
- --chart-3: oklch(0.769 0.188 70.08);
- --chart-4: oklch(0.627 0.265 303.9);
- --chart-5: oklch(0.645 0.246 16.439);
- --sidebar: oklch(0.205 0 0);
- --sidebar-foreground: oklch(0.985 0 0);
- --sidebar-primary: oklch(0.488 0.243 264.376);
- --sidebar-primary-foreground: oklch(0.985 0 0);
- --sidebar-accent: oklch(0.269 0 0);
- --sidebar-accent-foreground: oklch(0.985 0 0);
- --sidebar-border: oklch(1 0 0 / 10%);
- --sidebar-ring: oklch(0.556 0 0);
}
@layer base {