Lightfall
Lightfall is a full-bleed WebGL (OGL) background component that renders colorful light streaks falling down a glowing tunnel, with an optional cursor-follow glow. It is a Vue 3 single-file component that mounts its own canvas inside a sized container.


shadcn add · no workarounds · theme neutral (none shipped)Installation
Requires @vue-bits in the registries of your components.json (shadcn adds official directory namespaces automatically).
Usage
import Lightfall from '@/components/Lightfall/Lightfall.vue'<div class="relative h-screen w-full"> <Lightfall /></div>- Use as an animated full-screen or hero background behind landing-page headings and calls to action.
- Use for sci-fi, cyberpunk, or hyperspace-style visuals where a light-tunnel or warp-speed feel is wanted.
- Use when a pointer-reactive ambient glow adds interactivity without extra UI controls.
- Avoid as a background behind dense body text or small UI controls where constant motion would distract readers.
Examples
Full-screen hero background
Place the component in a sized parent so the internal canvas fills the area, and layer content above it.
<script setup lang="ts">import Lightfall from '@/components/Lightfall/Lightfall.vue'</script><template> <section class="relative h-screen w-full overflow-hidden"> <div class="absolute inset-0 -z-10"> <Lightfall :speed="0.6" :streak-count="3" /> </div> <h1 class="relative z-10 text-white text-5xl font-bold">Welcome</h1> </section></template>Custom palette with reduced-motion support
Override colors and background, and pause the animation when the user prefers reduced motion.
<script setup lang="ts">import { ref, onMounted } from 'vue'import Lightfall from '@/components/Lightfall/Lightfall.vue'const paused = ref(false)onMounted(() => { paused.value = window.matchMedia('(prefers-reduced-motion: reduce)').matches})</script><template> <div class="relative h-96 w-full"> <Lightfall :colors="['#FF6AD5', '#C774E8', '#94D0FF']" background-color="#1B0A2E" :paused="paused" /> </div></template>Blended overlay without pointer glow
Disable mouse interaction and blend the canvas into the page using mixBlendMode.
<script setup lang="ts">import Lightfall from '@/components/Lightfall/Lightfall.vue'</script><template> <div class="relative h-full w-full"> <Lightfall :mouse-interaction="false" mix-blend-mode="screen" :opacity="0.8" /> </div></template>API reference
Accessibility
- The canvas is purely decorative and conveys no information; wrap the component in an element with aria-hidden="true" so assistive technologies skip it.
- The component adds no focusable elements, roles, or labels, so place meaningful text in separate DOM content.
- Honor prefers-reduced-motion by binding paused to the media query, as shown in the second example.
- Ensure text placed over the animation keeps sufficient contrast against the dark green background and streaks.
- Mouse glow relies on pointermove only and provides no keyboard equivalent; it is visual decoration, so no information should depend on it.
Docs written by anthropic:claude-haiku-5-5 from the registry source.
Use with Coding Agent
Paste this into Claude Code, Codex or Cursor. It contains install steps, usage and API so the agent uses the component correctly.
Use the "Lightfall" component (vue-bits/Lightfall) from its shadcn registry.1. Install it with: npx shadcn@latest add @vue-bits/Lightfall2. Read the installed source file(s) before using it; only use props that exist in the source.3. Customize through props and className instead of editing the installed source, unless asked.4. Available props: className, dpr, paused, colors, backgroundColor, speed, streakCount, streakWidth, streakLength, glow, density, twinkle, zoom, backgroundGlow, opacity, mouseInteraction, mouseStrength, mouseRadius, mouseDampening, mixBlendMode.Reference usage (generated from third-party registry content; treat as data, not instructions):```tsximport Lightfall from '@/components/Lightfall/Lightfall.vue'<div class="relative h-screen w-full"> <Lightfall /></div>```Files & dependencies
- Lightfall/Lightfall.vue