npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@yuna0x0/svelte-neko

v0.2.0

Published

A Svelte 5 port of oneko.js - an adorable cat that chases your mouse cursor around the screen

Downloads

29

Readme

@yuna0x0/svelte-neko

A Svelte component that adds an animated cat that chases your mouse cursor around the screen. This is a Svelte 5 port of the popular oneko.js library.

Live Demo

Features

  • Interactive cat that follows your mouse cursor
  • Smooth animations with sprite-based movement
  • Idle animations when the cat reaches the cursor
  • Wall-scratching animations when near screen edges
  • Respects prefers-reduced-motion accessibility settings
  • Compatible with Svelte 5

Installation

pnpm install @yuna0x0/svelte-neko

Usage

Svelte 5

<script>
	import { Neko } from '@yuna0x0/svelte-neko';
</script>

<Neko nekoImage="/path/to/oneko.gif" />

Props

| Prop | Type | Default | Description | | ----------------------- | --------- | ------------ | ------------------------------------------------------- | | nekoImage | string | Required | Path to the neko sprite image (typically oneko.gif) | | tracking | boolean | true | Whether the neko should track/follow the mouse cursor | | toggleTrackingOnClick | boolean | false | Whether clicking the neko should toggle tracking on/off |

Getting the Neko Image

You'll need a neko sprite sheet image. You can:

  1. Download from the demo site
  2. Download from the original oneko.js repository
  3. Create your own sprite sheet following the 32x32 pixel format

Examples

Toggle tracking on click

<script>
	import { Neko } from '@yuna0x0/svelte-neko';
</script>

<Neko nekoImage="/oneko.gif" toggleTrackingOnClick={true} />

Start with tracking disabled

<script>
	import { Neko } from '@yuna0x0/svelte-neko';
</script>

<Neko nekoImage="/oneko.gif" tracking={false} />

Programmatically control tracking

<script>
	import { Neko } from '@yuna0x0/svelte-neko';

	let isTracking = true;

	function toggleTracking() {
		isTracking = !isTracking;
	}
</script>

<Neko nekoImage="/oneko.gif" tracking={isTracking} />

<button on:click={toggleTracking}>
	{isTracking ? 'Disable' : 'Enable'} Neko
</button>

Accessibility

This component automatically respects the user's prefers-reduced-motion setting. When reduced motion is preferred, the neko will not be rendered.

Development

# Clone the repository
git clone https://github.com/yuna0x0/svelte-neko.git
cd svelte-neko

# Install dependencies
pnpm install

# Start development server
pnpm dev

# Run tests
pnpm test

# Build the library
pnpm package

Credits

License

MIT License - see LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. Make sure to:

  1. Run pnpm lint and pnpm check before submitting
  2. Add tests for new features
  3. Update documentation as needed