joyco

Snake Game

Component 2

About

A minimal, themeable canvas snake game with keyboard/touch controls and localStorage highscore persistence.

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

Code

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

Usage.tsx

"use client";

import SnakeGame from "@/components/ui/snake-game";

export default function SnakeGameDemo() {
  return (
    <div className="flex w-full items-center justify-center p-4">
      <SnakeGame className="w-full max-w-xs" />
    </div>
  );
}

More by joyco

View all
  • Image Sequence

    Image Sequence

    69
  • Infinite List

    Infinite List

    64
  • File Dropzone

    File Dropzone

    19
  • HLS Video Player

    HLS Video Player

    18
  • Action Hint

    Action Hint

    16
  • Chat

    Chat

    15
  • Spritesheet Sequencer

    Spritesheet Sequencer

    11
  • Typewriter

    Typewriter

    2