Aman Shakya

Cosmic Rift

Heroes 1

About

An animated WebGL cosmic background with a procedural twinkling starfield and flowing nebula-like wave distortions rendered in real time with shaders.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Cosmic Rift to your project and fits it to your theme.

Code

How Cosmic Rift is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import CosmicRift from "@/components/ui/cosmicrift";

export default function Default() {
  return (
    <div className="w-full">
      <CosmicRift height="500px" className="justify-center rounded-xl">
        <div className="relative z-10 mx-auto flex max-w-md flex-col items-center gap-4 px-6 text-center">
          <h1 className="text-4xl font-bold tracking-tight text-white sm:text-5xl">
            Explore the Cosmic Rift
          </h1>
          <p className="text-balance text-white/70">
            A WebGL-powered animated starfield with twinkling stars and flowing
            nebula-like waves.
          </p>
        </div>
      </CosmicRift>
    </div>
  );
}

More by Aman Shakya

View all
  • Velaris

    Velaris

    2K
  • Onboard Card

    Onboard Card

    386
  • Auralis

    Auralis

    316
  • Text Morph

    Text Morph

    226
  • Cloudscape

    Cloudscape

    143
  • Chromatic Fluid

    Chromatic Fluid

    53
  • Vault Lock

    Vault Lock

    17
  • Stack Ripple

    Stack Ripple

    13

More in Heroes

View all
  • SaaS Template

    SaaS Template

    2.4K
  • Responsive Hero Banner

    Responsive Hero Banner

    2K
  • Hero

    Hero

    1.2K
  • Centered Hero with Image Fan

    Centered Hero with Image Fan

    931
  • Editorial Collage Hero

    Editorial Collage Hero

    430
  • Glass Fold

    Glass Fold

    212
  • Minimalist Hero Fashion

    Minimalist Hero Fashion

    285
  • HeroSectionWithGradient

    HeroSectionWithGradient

    336