Cursor party! Get multiplayer cursors on your own website

Matt Webb
Posted on:14 Dec 2023

Yeah yeah you already know I’m obsessed with multiplayer cursors.

What if I said you could have them on your own website with just one line of code?

👀 Here’s the code.

...
<script src="https://cursor-party.YOUR-PARTYKIT-USERNAME.partykit.dev/cursors.js"></script>
</body>
</html>

This is Cursor Party. We’re releasing it today. You can get it on your own site right away.

Full instructions below!

🎈 Easter egg: Cursor chat

But wait! There’s more!

We’re used to cursor chat on Figma but why not regular websites? And so…

You can also chat with other people on a site with Cursor Party. Just type / and then your message.

Try it now! Right now, on this page, hit / and say hello. If there’s no-one else here, open another browser window to this same page and say hi to yourself. (That’s not weird I promise.)

Is it useful? Um. Let me get back to you. Is it fun to surprise someone by messaging HELLOOOO on my website as they’re reading a post and then have a serendipitious back-and-forth? Yes. Yes it is.

Why? Because VIBES

I have this same set-up on my personal blog. I love it. It’s a tiny way to make the web feel more alive.

Somebody dropped me a note earlier today:

when i went on your website obviously i started just circling around another cursor that was there

and we started moving around

and it was a weird moment

like you dont know who it is

but it felt very “water cooler”

And I hear this kind of story a lot. It makes me feel so warm, you know? And once you realise that, just behind the glass, there are other people and we can be together — well, that’s a vibe. Other websites feel a little impoverished in comparison maybe?

So I wanted to make it easy for any website creator to add multiplayer cursors to their own site. Being both:

Inspiration

The benchmark here is Spencer Chang’s project playhtml (GitHub) where you can add a single HTML attribute to a tag on your site, such as can-move, and it becomes a dynamic, multiplayer element.

Such a great project.

Step by step: how to get multiplayer cursors on your site

Here’s everything you need: cursor-party on GitHub.

There are full instructions over there. As a summary…

What you get is a PartyKit server that looks like this when you visit it:

Cursor Party splashscreen showing a list of websites this installation is configured for

That PartyKit server is the brains for your multiplayer cursors. It will only work for the websites you list in the config. You can test your installation by visiting this site.

Then you add that script tag to your website, and you’re done. Cursor chat and all 🎉

(If you don’t want cursor chat, cool cool, the readme has instructions for that too.)

A note about Replit… The Replit option is a brand new way to deploy PartyKit without having to install anything on your local machine. It’s experimental! So if you use it then we’d love to hear how it goes, whether it was a smooth process for you or not.

Making it your own

Instead of cloning the repo, you can fork it. Then you can customise the code yourself.

Some ideas of what you could do:

It’s a first step!

GitHub

Start by grabbing the code 👉 cursor-party. The readme has full instructions.

Any questions/ideas/fixes please do join us on the Discord and say hi.