Ali Imam

Starfield

Heroes 391

About

The component retains the core functionality of the starfield animation, including props for customization, and uses React with a canvas element for rendering.

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

Code

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

Usage.tsx

import { Starfield } from "@/components/ui/starfield-1";

export default function DemoOne() {
  return (
    <div className="relative flex h-screen w-full flex-col items-center justify-center overflow-hidden">
      <Starfield/>
      <span className="pointer-events-none z-10 text-center text-7xl leading-none font-semibold tracking-tighter whitespace-pre-wrap text-white">
        Starfield
      </span>
    </div>
  )
}

Dependencies

More by Ali Imam

View all
  • Liquid Glass Button

    Liquid Glass Button

    6.7K
  • Shader Animation

    Shader Animation

    3.7K
  • WebGL Shader

    WebGL Shader

    2.6K
  • Shader Lines

    Shader Lines

    2.3K
  • Shiny Button

    Shiny Button

    2.2K
  • GLSL Hills

    GLSL Hills

    2.1K
  • Canvas

    Canvas

    1.8K
  • Glowing Shadow

    Glowing Shadow

    1.5K

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

    932
  • Editorial Collage Hero

    Editorial Collage Hero

    431
  • Glass Fold

    Glass Fold

    212
  • HeroSectionWithGradient

    HeroSectionWithGradient

    336
  • Aero Hero-3

    Aero Hero-3

    559