shadcn.io is not affiliated with official shadcn/ui
A printed circuit board seen from above: chips fan their pads out into buses of parallel traces that run straight, jog at 45° and end on vias, over a fainter layer of traces inside the board, while short signals race along the straight runs and light the via they reach. In light mode it's pale green-grey copper on paper; in dark mode a deep solder mask with copper pads and teal signals. The board is a routed table drawn once, at render, as masked layers that fade toward the edges, and each signal is a small streak moved by CSS keyframes, so nothing repaints and no script runs.
Use it behind developer-tool, hardware or infrastructure heroes. For lights racing along a full grid, use Laser Grid; for lights threading a seeded maze, Labyrinth; for a lattice without motion, Grid Pattern.
Installation
Usage
import { Circuit } from "@/components/ui/circuit";Circuit is a container: give it a size and put your content inside. The board sits behind the content and the box clips it.
<Circuit className="flex min-h-[420px] items-center justify-center">
<h1 className="text-5xl font-semibold">Infrastructure, wired in</h1>
</Circuit>For a backdrop behind the whole page, leave it empty and fix it under everything else:
<Circuit className="fixed inset-0 -z-10" />Demos
Quiet board
A calmer board in a card: density={0.25} draws only a quarter of the loose buses (the chips and their buses always stay), count={6} sends fewer signals and speed={0.7} slows them down.
Green PCB
The classic look: a card that stays dark in both themes, on a green solder mask (bg-[oklch(0.2_0.04_158)]), with traceColor in a brighter green, gold signals through pulseColor and every bus drawn (density={0.9}). The pads keep their copper on a dark theme; set --circuit-pad-color to change them.
Accessibility
The board is decorative: it's hidden from screen readers and lets every click through to your content. With reduced motion the signals stop where they are, a still board with a few lit traces. Nothing flashes: each signal is a few pixels wide, fades in and out, and its via glows up over a few tenths of a second. The traces show at under half your trace colour and the inner layer fainter still, so text on top keeps its contrast; keep that text in your foreground colour.
FAQ
How is the board made?
It's routed once, offline, the way a PCB is: buses of parallel traces leave the chips' pads or start at vias, run straight, jog at 45° and end on a via as soon as they would touch another trace. The result ships with the component as a compact table, and the page draws it as one repeating tile 1152×768 wide, with a turned copy of it as the layer inside the board, so it doesn't visibly repeat.
What does seed change?
Each whole number shifts the board under the box, keeps a different share of its loose buses and sends the signals along other traces. The same seed always draws the same board, on the server and in the browser.
How do I make it calmer or busier?
density is the share of loose buses drawn, from 0 (the chips and their buses alone) to 1 (every bus); count and speed set the traffic.
Why does a small card show fewer signals?
The signals ride the board's own straight runs, on its middle 1152×768. count is about how many ride that area; a smaller box shows the ones that fall inside it.
Can I change the colours?
Yes: traceColor and pulseColor take any CSS colour, and --circuit-pad-color sets the pads and vias. By default the board is green-grey, with copper pads and brighter teal signals on a dark theme.
API Reference
Circuit
<div> data-slot="circuit"
count?number
About how many signals travel at once. They run the board's own traces, on its middle 1152×768, so a small card shows a few.
- Default
24
density?number
How busy the board is, from 0 to 1: the share of its loose buses that are drawn (the chips and their buses always are).
- Default
0.7
pulseColor?string
The signals' colour, any CSS colour. @default a teal, brighter on dark themes.
seed?number
Another layout: each whole number shifts the board, drops other buses and sends the signals along other traces.
- Default
0
speed?number
How fast the signals travel, as a multiplier: 0.5 is slow, 2 is fast.
- Default
1
traceColor?string
The traces' colour, any CSS colour (the layer inside the board shows at a third of it).
- Default
a soft green-grey
render?ReactElement | ((props: object, state: object) => ReactElement)
Replace the host element or compose it with another component.
- Type
ReactElement | ((props: object, state: object) => ReactElement)
className?string
Merged with the part's classes.
--circuit-pad-colorstring
The pads' and vias' colour (the traces', copper on dark themes).
--circuit-pulse-colorstring
The signals' colour (a teal).
--circuit-speedstring
How fast the signals travel, a multiplier (1).
--circuit-trace-colorstring
The traces' colour (a soft green-grey).
Related
- Pro


Lights racing along a full grid
- Pro


Labyrinth Background
GridsLights threading a seeded maze
- Pro


Server-room cells blinking


Falling code, same mood
- Pro


Constellation Background
ParticlesConnected nodes drifting


Grid Pattern
GridsA static lattice when motion is too much