Skip to content

NewMCP server for your coding agent. Set it up ›

Nexus UI
Get Pro

Cursor Buddy, animated React component

A soft little character whose eyes follow the pointer anywhere on the page, sliding round its curved face and narrowing near the edge. It blinks, flinches when you come close, dozes off when left alone, and hops with a squash and stretch when you click it or press Enter.

  • Pro
  • Motion Effects
  • Hover
  • Spring
  • 3D

Props

PropTypeDefaultWhat it does
shape"squircle"Silhouette of the character.
fill"light"Body colour: the light or dark preset, or any CSS colour.
eyes"dots"Eye style.
size120Height of the body in px. The pill is wider than it is tall.
follow60How far the head turns towards the pointer, 0 to 100.
sleepAfter9000Falls asleep after this many ms without pointer movement. 0 keeps it awake.
eyeColor—Eye colour. Defaults to ink on light bodies and white on dark ones.
poketrueClick, tap, Enter or Space makes it hop. Turn off for a purely decorative buddy.
onPoke—Called after each poke.
autoplayfalseLooks around and hops now and then until the pointer first moves.
className—Classes for the outer wrapper.

Add it to your project

  1. 1

    Set up your project once

    You need a Next.js project with Tailwind CSS and the @/ import alias. In its root folder, run this once. It creates components.json and the cn() helper in src/lib/utils.ts:

    npx shadcn@latest init -d

    Starting from nothing? The Quick Start walks through the whole thing.

  2. 2

    Connect the registry with your API key

    Cursor Buddy is a Pro item, so the CLI has to send your API key. Do this once per project:

    1. Create a key at nexus-ui.com/dashboard/api-key. Copy it straight away: it starts with nxs_ and is shown only once.
    2. In your project root, next to package.json, create a file named .env.local with this line, using your own key:
      NEXUS_API_KEY=nxs_your_key_here
    3. Open components.json and add this entry inside the outermost braces, next to "aliases". Leave {name} and ${NEXUS_API_KEY} exactly as written; the CLI fills them in:
      "registries": {
        "@nexus-labs": {
          "url": "https://www.nexus-ui.com/api/registry/{name}",
          "headers": {
            "Authorization": "Bearer ${NEXUS_API_KEY}"
          }
        }
      }

How Cursor Buddy works

A soft little character whose eyes follow the pointer anywhere on the page. The eyes sit on the curved face, so they slide round it and narrow near the edge as the head turns. It blinks now and then, flinches when the pointer comes very close, dozes off when left alone, and hops with a squash and stretch when you poke it.

The source, the install command and the build prompt come with Pro.

Guides