Edu Calvo

Gravity Stars

Heroes 166

About

An animated canvas starfield background where stars drift, twinkle, connect with faint constellation links, and swirl toward the pointer under a soft gravity well.

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

Code

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

Usage.tsx

import GravityStars from "@/components/ui/gravity-stars";

export default function GravityStarsDemo() {
  return (
    <div className="relative h-screen w-full bg-[oklch(0.145_0.014_264)] text-[oklch(0.97_0.005_265)]">
      <GravityStars
        className="h-full w-full"
        connectDistance={120}
        count={240}
        tint={0.65}
      >
        <div className="flex h-full flex-col justify-center px-12">
          <h1 className="max-w-xl text-balance font-semibold text-5xl tracking-tight">
            The whole sky leans towards your cursor.
          </h1>
        </div>
      </GravityStars>
    </div>
  );
}

Dependencies

More by Edu Calvo

View all
  • Scrollable Card Stack

    Scrollable Card Stack

    283
  • Pixel Flow Field

    Pixel Flow Field

    205
  • AI Task List

    AI Task List

    196
  • Siri Orb

    Siri Orb

    190
  • Cursor Follow

    Cursor Follow

    165
  • Agent Avatar

    Agent Avatar

    151
  • Coverflow Carousel

    Coverflow Carousel

    145
  • Animated File Upload

    Animated File Upload

    103

More in Heroes

View all
  • Agency Hero Section

    Agency Hero Section

    1K
  • SaaS Template

    SaaS Template

    2.7K
  • Facts Hero

    Facts Hero

    3
  • Hero

    Hero

    1.4K
  • Hero Section 01

    Hero Section 01

    56
  • Responsive Hero Banner

    Responsive Hero Banner

    2.2K
  • Centered Hero with Image Fan

    Centered Hero with Image Fan

    1.1K
  • Split Hero With Image Cards

    Split Hero With Image Cards

    462