zweiundeins

Starfield

Backgrounds

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 StarfieldWarpDemo() {
  return (
    <div className="w-full h-[420px]">
      <Starfield
        tint="cyan"
        warp
        speed={60}
        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 Backgrounds

View all
  • Elegant Dark Pattern

    Elegant Dark Pattern

    831
  • Gradient Backgrounds

    Gradient Backgrounds

    23
  • Background snippets

    Background snippets

    21
  • LivingOrigami bg

    LivingOrigami bg

    138
  • Tailwind CSS Background Snippet

    Tailwind CSS Background Snippet

    542
  • Background Components

    Background Components

    234
  • Glass Fold

    Glass Fold

    246
  • Gradient Blur Bg

    Gradient Blur Bg

    34