Circuit Background
thegridcn/circuit-backgroundFreeComponent
thegridcn publishes no description for this item.
Install it
npx shadcn@latest add https://thegridcn.com/r/circuit-background.jsonSource
1"use client";23import type * as React from "react";4import { cn } from "@/lib/utils";56interface CircuitBackgroundProps extends React.HTMLAttributes<HTMLDivElement> {7 animated?: boolean;8 opacity?: number;9}1011export function CircuitBackground({12 children,13 className,14 animated = true,15 opacity = 0.15,16 ...props17}: CircuitBackgroundProps) {18 return (19 <div className={cn("relative overflow-hidden", className)} {...props}>20 {/* Circuit SVG pattern */}21 <svg22 aria-hidden="true"23 className={cn(24 "pointer-events-none absolute inset-0 h-full w-full",25 animated && "animate-circuit"26 )}27 style={{ opacity }}28 xmlns="http://www.w3.org/2000/svg"29 >30 <defs>31 <pattern32 id="circuit-pattern"33 x="0"34 y="0"35 width="100"36 height="100"37 patternUnits="userSpaceOnUse"38 >39 {/* Horizontal lines */}40 <path41 d="M0 50 H30 M70 50 H100"42 stroke="currentColor"43 strokeWidth="1"44 fill="none"45 className="text-primary"46 />47 {/* Vertical lines */}48 <path49 d="M50 0 V30 M50 70 V100"50 stroke="currentColor"51 strokeWidth="1"52 fill="none"53 className="text-primary"54 />55 {/* Center node */}56 <circle57 cx="50"58 cy="50"59 r="4"60 fill="none"61 stroke="currentColor"62 strokeWidth="1"63 className="text-primary"64 />65 {/* Corner nodes */}66 <circle67 cx="0"68 cy="0"69 r="2"70 fill="currentColor"71 className="text-primary"72 />73 <circle74 cx="100"75 cy="0"76 r="2"77 fill="currentColor"78 className="text-primary"79 />80 <circle81 cx="0"82 cy="100"83 r="2"84 fill="currentColor"85 className="text-primary"86 />87 <circle88 cx="100"89 cy="100"90 r="2"91 fill="currentColor"92 className="text-primary"93 />94 {/* Diagonal connectors */}95 <path96 d="M30 50 L50 30 M50 70 L70 50"97// … truncated
Files it writes
More from thegridcn
All 139 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | thegridcn | Components | Free | 2 deps | |
| Agent Avataragent-avatar | thegridcn | Components | Free | no deps | |
| Alertalert | thegridcn | Components | Free | 1 dep | |
| Alert Dialogalert-dialog | thegridcn | Components | Free | 1 dep | |
| Announcement Barannouncement-bar | thegridcn | Components | Free | no deps | |
| Anomaly Banneranomaly-banner | thegridcn | Components | Free | no deps | |
| Arrival Panelarrival-panel | thegridcn | Components | Free | no deps | |
| Aspect Ratioaspect-ratio | thegridcn | Components | Free | 1 dep |
