About
A frosted-glass code editor window with syntax highlighting and a line-by-line stagger-reveal animation, useful as a premium code showcase on landing pages.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Glass Code Block to your project and fits it to your theme.
Code
How Glass Code Block is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import GlassCodeBlock from "@/components/ui/glass-code-block";
export default function GlassCodeBlockDemo() {
const code = `import { motion } from "remotion";
// Generate a hero scene
export function Hero() {
const frame = useCurrentFrame();
const opacity = frame / 30;
return <h1 style={{ opacity }}>Hello</h1>;
}`;
return (
<div className="w-full h-screen flex items-center justify-center bg-black">
<GlassCodeBlock code={code} title="hero.tsx" />
</div>
);
}








