Matrix Code Rain Demo
nyxui/matrix-code-rain-demoFreeExample
Example showing a matrix code rain.
Live preview
live · rendered by the registry
Rendered by shadcn/ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://nyxui.com/r/matrix-code-rain-demo.jsonSource
1"use client";2import React, { useState } from "react";3import { MatrixCodeRain } from "../ui/matrix-code-rain";4// Main Demo Component5export default function MatrixCodeRainDemo() {6 const [color, setColor] = useState("#00ff00");7 const colors = [8 "#00ff00",9 "#ff0000",10 "#0000ff",11 "#ffff00",12 "#ff00ff",13 "#00ffff",14 "#ff8800",15 "#8800ff",16 "#0088ff",17 "#ff0088",18 ];1920 const handleColorChange = () => {21 const randomColor = colors[Math.floor(Math.random() * colors.length)];22 setColor(randomColor);23 };2425 return (26 <div className="absolute bottom-0 left-0 w-full overflow-hidden">27 <div>28 <MatrixCodeRain color={color} />29 </div>3031 <div className="absolute inset-0 flex items-center justify-center">32 <button33 className="bg-black text-white border-2 border-white text-xl px-4 py-2 z-10 hover:bg-gray-800 transition-colors duration-200"34 onClick={handleColorChange}35 >36 Change Color37 </button>38 </div>39 </div>40 );41}
What it pulls in
Other registry items
Files it writes
More from shadcn/ui
All 68 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| 3D Layered Card Demo3d-layered-card-demo | shadcn/ui | Examples | Free | no deps | |
| Animated Code Block Demoanimated-code-block-demo | shadcn/ui | Examples | Free | no deps | |
| Animated Grainy Background Demoanimated-grainy-bg-demo | shadcn/ui | Examples | Free | no deps | |
| Animated Text Demoanimated-text-demo | shadcn/ui | Examples | Free | no deps | |
| Apple Glass Effect Demoapple-glass-effect-demo | shadcn/ui | Examples | Free | no deps | |
| Bubble Background Demobubble-background-demo | shadcn/ui | Examples | Free | no deps | |
| Custom Cursor Democustom-cursor-demo | shadcn/ui | Examples | Free | no deps | |
| Cyberpunk Card Democyberpunk-card-demo | shadcn/ui | Examples | Free | no deps |
