Pixel Cat
A tiny pixel-art companion that wanders, reacts to the pointer, changes pose, and responds when petted.
Live preview
Interact with the effect here. Drag, hover, and use its controls.
Click the cat to pet it
Variation Tweaking
Adjust the options and see the preview update live.
Installation
Install automatically via CLI or manually integrate dependencies and code.
Usage
Import the component and configure visual variants, sizes, and operational states.
import { PixelCat } from '@/components/ui/pixel-cat' <PixelCat breed="orange" wandering cursorInteraction onPet={({ count }) => setPetCount(count)}/>Composition
Compose with icons, form triggers, and layout containers.
const [petCount, setPetCount] = React.useState(0) <div className="relative h-64 overflow-hidden rounded-2xl border"> <PixelCat size={96} breed="calico" boundary="parent" wandering cursorInteraction onPet={({ count }) => setPetCount(count)} /></div> <p>Pets: {petCount}</p>API Reference
Property matrix, types, defaults, and usage descriptions.
Data Attributes
State-reflecting DOM attributes for custom selector styling.
This component does not expose custom data attributes. Standard HTML data attributes are forwarded to its interactive element.
How It Works
Pixel Cat draws its sprite to a pixelated canvas and uses Motion values for smooth movement. It observes its parent or viewport boundary, changes facing and pose as it moves, and emits pet and pose callbacks for application state.
Accessibility
The companion can be paused by disabling wandering. Interactive mode exposes a keyboard-operable pet target, while decorative instances can disable interaction and bubbles.
Limitations
Features
Meet the team behind the interaction
Crafted for modern web applications and AI agent workflows.
