Eduardo Calvo

Gravity Stars

Heroes 186

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 Eduardo Calvo

View all
  • Scrollable Card Stack

    Scrollable Card Stack

    302
  • Pixel Flow Field

    Pixel Flow Field

    224
  • Siri Orb

    Siri Orb

    205
  • AI Task List

    AI Task List

    204
  • Cursor Follow

    Cursor Follow

    164
  • Agent Avatar

    Agent Avatar

    162
  • Coverflow Carousel

    Coverflow Carousel

    161
  • Animated File Upload

    Animated File Upload

    112

More in Heroes

View all
  • Agency Hero Section

    Agency Hero Section

    1.1K
  • Real Estate 3D Hero

    Real Estate 3D Hero

    89
  • Responsive Hero Banner

    Responsive Hero Banner

    2.2K
  • SaaS Template

    SaaS Template

    2.8K
  • AI SaaS Workflow Hero

    AI SaaS Workflow Hero

    37
  • App Integration Celestial Hero

    App Integration Celestial Hero

    17
  • Chroma Sense Hero

    Chroma Sense Hero

    23
  • Hero

    Hero

    1.4K