zweiundeins

Starfield

Heroes

About

A canvas-based warp-speed pixel starfield background with configurable speed, star density, colour tint and a warp-streak mode, ported from the Starbase web component library by zweiundeins.

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";
import type { CSSProperties } from "react";

export default function StarfieldDemo() {
  return (
    <div className="w-full h-[420px]">
      <Starfield
        speed={30}
        density={320}
        tint="violet"
        style={{ "--sb-starfield-height": "100%" } as CSSProperties}
      />
    </div>
  );
}

More by zweiundeins

View all
  • Theme Switch

    Theme Switch

    11
  • Busy

    Busy

    7
  • Count Up

    Count Up

    1
  • ECharts

    ECharts

  • Sparkline

    Sparkline

  • Drawer

    Drawer

  • Odometer

    Odometer

  • Meter

    Meter

More in Heroes

View all
  • SaaS Template

    SaaS Template

    2.4K
  • Responsive Hero Banner

    Responsive Hero Banner

    2K
  • Hero

    Hero

    1.2K
  • Editorial Collage Hero

    Editorial Collage Hero

    442
  • Centered Hero with Image Fan

    Centered Hero with Image Fan

    947
  • Hero Section 6

    Hero Section 6

    891
  • Hero with group of images, text and two buttons

    Hero with group of images, text and two buttons

    421
  • Glass Fold

    Glass Fold

    246