Background

Beams

Flowing energy streams that create organic movement patterns. These animated SVG paths bring life to static layouts with graceful gradient waves perfect for modern React applications.

Powered by

Loading component...

Installation

npx shadcn@latest add https://www.shadcn.io/registry/background-beams.json
npx shadcn@latest add https://www.shadcn.io/registry/background-beams.json
pnpm dlx shadcn@latest add https://www.shadcn.io/registry/background-beams.json
bunx shadcn@latest add https://www.shadcn.io/registry/background-beams.json

Features

  • Curved SVG path animations with 50 unique mathematical curves creating organic flow patterns
  • Animated gradient effects with cyan-to-purple color transitions (#18CCFC → #6344F5 → #AE48FF)
  • Randomized timing cycles featuring 10-20 second durations with staggered delays for natural motion
  • Responsive SVG scaling using viewBox to maintain consistent appearance across all screen sizes
  • Performance optimized with React.memo and GPU-accelerated Framer Motion animations
  • TypeScript support with complete interface definitions for reliable integration
  • shadcn/ui compatibility seamlessly integrating with existing design systems
  • Customizable styling through className prop and CSS variable system

Examples

With Content

Loading component...

Use Cases

This free open source React component works well for:

  • Landing pages - Hero sections with flowing animated backgrounds built with Next.js
  • Portfolio sites - Sophisticated backgrounds showcasing technical skill using TypeScript
  • SaaS applications - Convey innovation through continuous motion in shadcn/ui interfaces
  • Technology showcases - Abstract energy patterns for connectivity themes
  • Data visualizations - Flowing pathways that complement charts using Tailwind CSS
  • Developer documentation - Technical precision with visual interest for JavaScript resources

API Reference

BackgroundBeams

PropTypeDefaultDescription
classNamestring-Additional CSS classes to apply to the wrapper

Implementation Notes

  • Component uses absolute positioning and should be placed within a relative container
  • Contains 50 unique curved SVG paths with animated linear gradients
  • Gradient animations use x1, x2, y1, y2 coordinate changes to simulate energy flow
  • Each beam has randomized 10-20 second animation cycles with unique delays
  • Content requires higher z-index to appear above the beam layer
  • Uses React.memo for performance optimization and preventing unnecessary re-renders
  • Compatible with shadcn/ui design system and Tailwind CSS
  • Radial gradient masking creates natural focus areas for overlaid content