Skip to content

NewMCP server for your coding agent. Set it up ›

Nexus UI
Get Pro

Todo List, animated React component

A task list where ticking a task draws a check, strikes the text through and drops it out of the list into a Completed drawer with a counter that pops, plus quick add and undo. Also includes All Caught Up: Tick tasks and they strike through and fold away while the header ring fills. Finish the last and that ring travels to the middle, closes into a check and tomorrow lines up below.

  • Pro
  • Cards
  • Spring

Ticks when you check a task, clicks off when you undo it and pops when you add one. The All Caught Up variant ticks softly each time you finish a task and plays a soft rising chime instead when you finish the last one. Sound is off on this site until you switch it on.

Todo List

All Caught Up

Props

PropTypeDefaultWhat it does
initial—Tasks shown at first.
accent"#0071e3"Check and counter colour.
autoplayfalseTicks tasks off by itself until someone interacts.
AllCaughtUp.tasksfour demo tasksThe tasks to tick off: id, title and a small tag shown on the right of the row.
AllCaughtUp.tomorrowthree demo itemsWhat comes next, shown as chips once everything is done.
AllCaughtUp.heading"Today"Heading of the list.
AllCaughtUp.onTickundefinedCalled with the task each time one is ticked by hand.
AllCaughtUp.onCompleteundefinedCalled once the last task is ticked by hand.
AllCaughtUp.autoplayfalseTicks the tasks off one by one and starts over until someone touches the component. Never runs under reduced motion and pauses when off screen.
AllCaughtUp.classNameundefinedExtra classes for the card.
enableSoundtruePlays interface sounds on interaction. They follow the sound switch (setSoundsEnabled, on by default) and stay silent on hover. Autoplay makes the same sounds once the visitor has used the page. Pass false to silence this component.

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

    Todo List 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 Todo List works

A to-do list that ends somewhere nice. Tick a task and the check draws, a line strikes through it and the row folds away while the progress ring in the header fills. Finish the last one and that same ring travels to the middle, closes into a check, and tomorrow's first few items line up below. Start over brings the list back. Under reduced motion the rows and the ring swap with short fades instead of travelling.

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

Todo List questions

Does it make sound, and how do I turn it off?

Ticks when you check a task, clicks off when you undo it and pops when you add one. The All Caught Up variant ticks softly each time you finish a task and plays a soft rising chime instead when you finish the last one. Sounds are synthesised with the Web Audio API, so there are no audio files, and they only play after a click or key press. Pass `enableSound={false}` to silence this component, or call `setSoundsEnabled(false)` from `@/lib/ui-sounds` to switch every sound off at once. The CLI installs `@/lib/ui-sounds` with the component.