deepraj21

Glass Snippet

Component 1

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>
  );
}

Dependencies

More by deepraj21

View all
  • Glass Sidebar

    Glass Sidebar

    12
  • Glass Message

    Glass Message

    10
  • Glass Date Picker

    Glass Date Picker

    5
  • Glass Notification

    Glass Notification

    4
  • Glass QR Code

    Glass QR Code

    3
  • Glass Terminal

    Glass Terminal

    3
  • Glass Select

    Glass Select

    3
  • Glass Toolbar

    Glass Toolbar

    2