Matrix Background
A decorative animated matrix background with falling glyphs. Drop-in overlay layer - place content in a relative shell on top.
Default
Default matrix background
Matrix Background
A decorative animated matrix background with falling glyphs. Drop-in overlay layer — pass children to render content on top.
example.tsx
1import { Button } from "@/components/ui/button";2import { MatrixBackground } from "@/registry/ui/matrix-background";34export const MatrixBackgroundExample = () => {5 return (6 <div className="relative min-h-[500px] w-full overflow-hidden rounded-xl border border-border">7 <MatrixBackground speed="fast" opacity="vivid" density="high">8 <div className="flex h-full flex-col items-center justify-center gap-4 p-10 text-sm text-muted-foreground">9 <h1 className="text-4xl font-bold text-primary">Matrix Background</h1>10 <p className="max-w-md text-center text-sm text-muted-foreground">11 A decorative animated matrix background with falling glyphs. Drop-in12 overlay layer — pass children to render content on top.13 </p>14 <Button>15 <span>Click me</span>16 </Button>17 </div>18 </MatrixBackground>19 </div>20 );21};
Installation & source
Install via the shadcn CLI or copy the registry files manually.
bash
npx shadcn@latest add @tt-ui/matrix-background
Props
| Name | Type | Default | Description |
|---|---|---|---|
| speed | slow | normal | fast | normal | Speed of the matrix background |
| density | low | medium | high | medium | Density of the matrix background |
| color | string | #22c55e | Color of the matrix background |
| opacity | subtle | normal | vivid | subtle | Opacity of the matrix background layer |