Back to Component Explorer
Falling Light Beams
backgroundsCascading vertical neon photon rays with velocity and particle trails.
#beams#falling#light#rays#background
Live Interactive Preview
Falling Beams
Component Source Code
Select language in the dropdownFallingBeams.tsx
1'use client';23import React from 'react';45export default function FallingBeams() {6 return (7 <div className="relative h-64 w-full max-w-md overflow-hidden rounded-3xl border border-slate-200 dark:border-slate-800 bg-slate-950 p-6 flex flex-col justify-center items-center text-center select-none">8 <div className="absolute inset-0 flex justify-around pointer-events-none opacity-40">9 <div className="w-[1px] h-full bg-gradient-to-b from-transparent via-cyan-400 to-transparent animate-[pulse_2s_ease-in-out_infinite]" />10 <div className="w-[1px] h-full bg-gradient-to-b from-transparent via-blue-500 to-transparent animate-[pulse_3s_ease-in-out_infinite]" />11 <div className="w-[1px] h-full bg-gradient-to-b from-transparent via-violet-500 to-transparent animate-[pulse_2.5s_ease-in-out_infinite]" />12 <div className="w-[1px] h-full bg-gradient-to-b from-transparent via-indigo-400 to-transparent animate-[pulse_3.5s_ease-in-out_infinite]" />13 </div>1415 <h3 className="text-xl font-extrabold text-white relative z-10">Falling Photon Beams</h3>16 <p className="text-xs text-slate-400 mt-1.5 max-w-xs relative z-10">Vertical speed rays generating continuous depth sensation.</p>17 </div>18 );19}Installation & Integration Guide
Step 1: Tailwind CSS v4 Setup
Tailwind DocsIf you do not have Tailwind installed yet, run this installation command:
Terminal
npm install tailwindcss @tailwindcss/postcss postcss
Then add the Tailwind directive to your main stylesheet (globals.css):
@import "tailwindcss";
Step 2: Install Icon Dependencies
npm install lucide-react react-icons
Step 3: Add Component File
Create a new file in your project at src/components/backgrounds/FallingBeams.tsx and paste the copied code from the source viewer above.
Step 4: Usage Example
ExamplePage.tsx
1import FallingLightBeams from '@/components/backgrounds/FallingBeams';23export default function ExamplePage() {4 return (5 <main className="p-8 flex items-center justify-center min-h-screen">6 <FallingLightBeams />7 </main>8 );9}