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
| Prop | Type | Default | What it does |
|---|---|---|---|
| initial | string[] | — | Tasks shown at first. |
| accent | string | "#0071e3" | Check and counter colour. |
| autoplay | boolean | false | Ticks tasks off by itself until someone interacts. |
| AllCaughtUp.tasks | AllCaughtUpTask[] | four demo tasks | The tasks to tick off: id, title and a small tag shown on the right of the row. |
| AllCaughtUp.tomorrow | string[] | three demo items | What comes next, shown as chips once everything is done. |
| AllCaughtUp.heading | string | "Today" | Heading of the list. |
| AllCaughtUp.onTick | (task: AllCaughtUpTask) => void | undefined | Called with the task each time one is ticked by hand. |
| AllCaughtUp.onComplete | () => void | undefined | Called once the last task is ticked by hand. |
| AllCaughtUp.autoplay | boolean | false | Ticks 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.className | string | undefined | Extra classes for the card. |
| enableSound | boolean | true | Plays 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
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 createscomponents.jsonand thecn()helper insrc/lib/utils.ts:npx shadcn@latest init -d
Starting from nothing? The Quick Start walks through the whole thing.
- 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:
- Create a key at nexus-ui.com/dashboard/api-key. Copy it straight away: it starts with
nxs_and is shown only once. - In your project root, next to
package.json, create a file named.env.localwith this line, using your own key:NEXUS_API_KEY=nxs_your_key_here
- Open
components.jsonand 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}" } } }
- Create a key at nexus-ui.com/dashboard/api-key. Copy it straight away: it starts with
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.