127 Components

Galaxy & Nebula

Backgrounds

Real-time WebGL fragment shader rendering a rotating spiral galaxy and cosmic dust nebula using 5-octave Fractional Brownian Motion (FBM) noise.

WebGL FBM Nebula

Spiral Galaxy & FBM Nebula

Real-time WebGL fragment shader computing 5-octave Fractional Brownian Motion (fbm) with polar spiral distortion.

GLSL Fragment Shader · 5-Octave FBM Noise · Spiral Swirl

Installation

Install directly into your project using the shadcn CLI or copy the source code manually.

Requires:lucide-reactclsxtailwind-merge
$npx shadcn@latest add "https://boseui.site/r/galaxy-nebula.json"

Props

TypeScript props supported by <GalaxyNebula />.

6 props
PropTypeDefaultDescription
speednumber1Time multiplier for internal nebula turbulence.
rotationSpeednumber0.25Angular velocity of the spiral galaxy arms.
primaryColorstring"#8B5CF6"Hex color for the inner nebula filaments.
secondaryColorstring"#06B6D4"Hex color for the outer cosmic dust cloud.
childrenReact.ReactNode—Optional foreground content rendered above the shader.
classNamestring—Additional Tailwind CSS classes for the container.

Key Features

  • GPU-accelerated WebGL GLSL fragment shader computing 5-octave Fractional Brownian Motion (`fbm`).
  • Polar coordinate spiral arm warping with a luminous galactic core.
  • Includes Andromeda, Orion, and Supernova color presets in the interactive preview.

Keyboard & Accessibility

  • Marks the `<canvas>` shader viewport with `aria-hidden='true'`.
  • Maintains high-contrast text legibility with subtle drop shadows.
  • Preset selector buttons support keyboard focus.