About
A one-line command shown on a frosted glass capsule with a copy button, with gliding tabs to switch between npm/pnpm/yarn/bun style variants.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Glass Snippet to your project and fits it to your theme.
Code
How Glass Snippet is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import { GlassSnippet } from "@/components/ui/glass-snippet";
export default function GlassSnippetDemo() {
return (
<div className="flex min-h-[220px] w-full items-center justify-center bg-background p-10 text-foreground">
<GlassSnippet
commands={[
{ label: "npm", code: "npm install opaline-ui" },
{ label: "pnpm", code: "pnpm add opaline-ui" },
{ label: "yarn", code: "yarn add opaline-ui" },
{ label: "bun", code: "bun add opaline-ui" },
]}
/>
</div>
);
}








