Edu Calvo

Gravity Stars

Heroes 110

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

    233
  • Siri Orb

    Siri Orb

    160
  • AI Task List

    AI Task List

    159
  • Cursor Follow

    Cursor Follow

    153
  • Pixel Flow Field

    Pixel Flow Field

    138
  • Agent Avatar

    Agent Avatar

    127
  • Coverflow Carousel

    Coverflow Carousel

    92
  • Otp Input

    Otp Input

    91

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

    919
  • HeroSectionWithGradient

    HeroSectionWithGradient

    334
  • Editorial Collage Hero

    Editorial Collage Hero

    425
  • Hero 03

    Hero 03

    313
  • Glass Fold

    Glass Fold

    194