Skip to content

NewMCP server for your coding agent. Set it up ›

Nexus UI
Get Pro

Mood Wheel, animated React component

  • Pro
  • Inputs & Controls
  • Spring
  • Glow

Mood Wheel

Feelings laid along the rim of a wheel that you drag, scroll or arrow through. The word at the centre gets bracketed, fills the sentence below and the orb beside it melts into that mood's colours. Also includes Mood Orb, a mood check-in with a ball of liquid chrome beside an arc of feelings: scroll to change the mood, or throw the ball across.

Mood Orb

Props

PropTypeDefaultWhat it does
moodsDEFAULT_MOODSWords on the wheel, each as { word, a, b } where a is the main orb colour and b the light one. Ten moods from Calm to Grateful by default.
autoplayfalseSpins to a random mood every 2 s until someone drags, scrolls or uses the keys.
radius220Size of the wheel the words sit on, in px (100 to 360). Smaller curves the words more tightly, larger lays them out flatter.
spacing0.32Gap between neighbouring words around the wheel, in radians (0.2 to 0.6). Larger spreads the words further apart.
orbSize150Width and height of the colour orb, in px (60 to 200).
glide1How far the wheel keeps rolling after you let go (0.25 to 4). Higher glides further, lower stops sooner.
MoodOrb.question"How are you feeling?"Question shown above the words.
MoodOrb.moodsDEFAULT_MOODSThe words on the reel, each as { name, tint, warp, speed, freq }.
MoodOrb.defaultMood4Index of the word the reel starts on.
MoodOrb.onLog—Called with the mood when it is logged by throwing the ball.
MoodOrb.enableSoundtrueSoft synthesised sounds as you use it. They also follow the site-wide sound switch.
MoodOrb.volume0.6Sound level, 0 to 1.
MoodOrb.autoplayfalsePlays a short demo by itself until the visitor touches it. Never runs under reduced motion.
MoodOrb.className""Extra classes for the outer element.

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

    Mood Wheel 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 Mood Wheel works

A mood check-in: a ball of liquid chrome beside an arc of feelings. Scroll, drag the words or use the arrow keys and the arc rolls around the ball, the chosen word framed in brackets, and the chrome changes with it: calm moods as it flies, lands on the other side on a spring, and the arc of words turns round to face it. Log saves the mood with a pulse through the metal.

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