Skip to content
Browse documentation

Tasks on a textured tray in your colours: tick one and a line travels slowly through its name, the ink fading behind it, then done tasks glide below the open ones.

Used forProject dashboardsDaily plannersCRM and dealsOnboarding and ops

Install with the shadcn CLI

$ npx shadcn@latest add https://hairlineui.com/r/task-card.json

Registered the namespace? Then it’s shadcn add @hairline/task-card. Set it up

Templates

Need the whole page?

61 Next.js landing pages, each designed from scratch. Try any of them live; one is $39, all of them $159, and 6 are free.

All 61 templates

Where it’s used

  • Project dashboards

    The next few tasks of each project on an overview, a click from the full board.

  • Daily planners

    Today, This week and Someday as lists you page through.

  • CRM and deals

    Follow-ups for an account or a deal, ticked off from its page.

  • Onboarding and ops

    Recurring checklists for a launch, a release or a client.

What it handles for you

A to-do list either leaves ticked tasks where they are, so the open ones get lost, or reorders the moment you tap, so the next task jumps away from your finger.

Instead of wiring upa todo lista checklist widgetan add-task forma list switchera completed section
  1. A calm strike

    A line travels through the name and the ink fades behind it, as far as it has gone.

  2. Done sinks, once you pause

    Ticked tasks glide under the open ones after your last tick, in one move.

  3. A tray in your colours

    Two chart colours with a fine engraved texture; finishing a list sends light across it.

  4. Due days and people

    Each task can show its day, red when late, and who it is on.

  5. Several lists, one card

    ‹ › page between lists; the card slides and eases to its height.

  6. Your store stays the truth

    Ticks show at once and go back with a shake if your save fails.

Overview

To-do cards either leave ticked tasks where they are, so the open ones get lost, or reshuffle the list the moment you tap, so the next task jumps away from your finger. Task card waits, and makes the tick worth watching. Tap a task and its box fills with the list’s gradient as the check draws; then a line travels slowly through the name and the ink fades to grey behind it, exactly as far as the line has gone, like a pen drawn calmly through a word. A moment after your last tick the done tasks glide down below the open ones (dimming as they pass under them) and an unticked one rises back, all in one move. The card sits on a tray of the list’s two colours with a fine engraved texture; finish the list and a band of light crosses the tray once. Each task can carry a due day (red when late) and who it is on. “Add a task” is the field itself and stays open for the next. ‹ › move between lists: the card slides the way you went and eases to its new height. The tasks are yours: lists in, onToggle and onAdd out; a tick shows at once and goes back with a small shake if your save throws.

States

tick
The box gives a small pop (420ms), fills with the list’s gradient and draws its check (300ms); 160ms later a line travels through the name from the left (620ms, eased in and out) while the name’s ink turns grey behind it, clipped to exactly where the line has reached; the due day and avatar fade back.
untick
The line withdraws to the right and the ink comes back (320ms).
sink
One second after the last tick, done tasks glide below the open ones and unticked ones rise back, every row in one 600ms move; rows going down dim as they pass under the rising ones.
finish
When the last task is ticked, a band of light crosses the tray once (1.3s, after the strike).
hover
Hovering a task darkens its box’s edge and fills it with a grey step; nothing is drawn behind the row.
add
“Add a task” becomes the field with its caret where the words were. Enter saves (a small spinner replaces the plus while it saves), the new task folds in above the done ones and the field clears for the next; Escape or leaving it empty closes it.
page
The old list slides out the other way and blurs (220ms) while the new one slides in from the side you went (420ms) and the card eases to its height (460ms); the tray takes the new list’s colours.
refused
If onToggle or onAdd throws or rejects, the tick goes back or the field keeps its text, with a small shake.
reduced motion
Ticks, the strike, sinking and paging happen in place.

Usage

usage.tsx
import { TaskCard } from "@/components/task-card";<TaskCard  lists={[{ id: "launch", title: "Launch week", href: "/projects/launch", tasks }]}  onToggle={(listId, taskId, done) => fetch(`/api/tasks/${taskId}`, { method: "PATCH", body: JSON.stringify({ done }) })}  onAdd={(listId, label) => fetch(`/api/lists/${listId}/tasks`, { method: "POST", body: JSON.stringify({ label }) })}/>

Depends on lucide-react, installed for you by the CLI along with the keyframes it needs.

Works with

With server actions

Read the lists on the server and save with actions; revalidating brings the new tasks back as props.

example.tsx
// app/dashboard/tasks.tsx"use client";import { TaskCard, type TaskList } from "@/components/task-card";import { addTask, setTaskDone } from "./actions"; // "use server" functions that write and revalidatePath("/dashboard")export function Tasks({ lists }: { lists: TaskList[] }) {  return (    <TaskCard      lists={lists}      onToggle={(listId, taskId, done) => setTaskDone(taskId, done)}      onAdd={(listId, label) => addTask(listId, label)}    />  );}

Props

lists
TaskList[]
Each list: id, title, tasks ({ id, label, done, due?, late?, assignee? }[]), and optionally href and linkLabel for the footer link and color (one colour or two) for the tray.
list / defaultList / onListChange
string / string / (id) => void
Which list shows, controlled or not.
onToggle
(listId, taskId, done) => Promise<unknown> | void
Save a tick or untick; throw or reject to undo it on screen.
onAdd
(listId, label) => Promise<unknown> | void
Save a new task and pass it back in lists. Without it there is no Add row.

Accessibility and motion

  • Every task is a button with role="checkbox" named by its label; the Add field is labelled with its list; ‹ › name the list they go to; ticks, adds and list changes are announced politely.
  • The tray takes pairs of your chart colours in turn (or a color per list); its footer text picks dark or light from the tray with oklch(from …), so any theme colour reads in light and dark.
  • The strike is a grey copy of the name clipped to the line’s progress; rows glide by transform from where they were; the old list leaves as a still copy while the new one renders.
  • Installs Text morph. With reduced motion everything changes in place.

Requirements

React 19, Tailwind CSS v4 and shadcn/ui theme variables (any style, light and dark). Icons from lucide-react.

The CLI also installs Text morph.

Source

components/task-card.tsx
"use client";import * as React from "react";import { ArrowUpRight, ChevronLeft, ChevronRight, Plus } from "lucide-react";import { TextMorph } from "./text-morph";/* ───────────────────────────────────────────────────────── * TASK CARD: a list of tasks on a tinted tray, a few lists deep * *   tray      the card sits on a tray of the list's two colours with *             a fine engraved texture; finish the list and a band of *             light crosses it once *   tick      tap a task: the box fills with the same gradient and *             its check draws; then a line travels slowly through the *             name and the ink fades behind it as it goes, so the *             name greys exactly where it has been crossed *   sink      a moment after your last tick the done tasks glide *             down under the open ones (and an unticked one rises *             back), all in one move, so a run of ticks never *             reshuffles under your finger *   add       "Add a task" is the field: tap it, type, Enter; the *             new task folds in above the done ones and the field *             stays open for the next *   page      ‹ › move between your lists: the tray changes colour, *             the card slides the way you went and eases to its *             new height * * The tasks are yours: pass lists from your store and save in * onToggle and onAdd. A tick shows at once; throw or reject and it * goes back with a small shake. * ───────────────────────────────────────────────────────── */export interface TaskItem {  id: string;  label: string;  done: boolean;  /** A short due label, e.g. "Today" or "Fri". */  due?: string;  /** Shows the due label in red. */  late?: boolean;  /** Who it's on: a small avatar (initials when there's no src). */  assignee?: { name: string; src?: string };}export interface TaskList {  id: string;  title: string;  tasks: TaskItem[];  /** Where the footer link goes, e.g. the full project. */  href?: string;  /** The footer link's words. Defaults to "View all". */  linkLabel?: string;  /** The tray's colours: one CSS colour, or two for its gradient. Defaults to pairs of your chart colours. */  color?: string | [string, string];}export interface TaskCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onToggle"> {  lists: TaskList[];  /** The list showing, controlled; or leave it to the card with defaultList. */  list?: string;  defaultList?: string;  onListChange?: (listId: string) => void;  /** Save a tick or untick. Throw or reject to undo it on screen. */  onToggle?: (listId: string, taskId: string, done: boolean) => Promise<unknown> | void;  /** Save a new task; add it to the list you pass back. Without it there's no Add row. */  onAdd?: (listId: string, label: string) => Promise<unknown> | void;}const EASE = "cubic-bezier(0.16,1,0.3,1)";const FOCUS = "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50";const ROW = 36;const SETTLE = 1000; // after the last tick, once its strike has finishedconst STRIKE = 620;// Each list's two colours, as pairs of chart colours that sit well together.const PAIRS: [number, number][] = [  [1, 3],  [5, 2],  [3, 1],  [2, 5],  [4, 1],];const reducedQuery = "(prefers-reduced-motion: reduce)";const subscribeReduced = (onChange: () => void) => {  const query = window.matchMedia(reducedQuery);  query.addEventListener("change", onChange);  return () => query.removeEventListener("change", onChange);};const useReducedMotion = () =>  React.useSyncExternalStore(subscribeReduced, () => window.matchMedia(reducedQuery).matches, () => false);const mix = (color: string, amount: number, into = "transparent") => `color-mix(in oklab, ${color} ${amount}%, ${into})`;const openFirst = (tasks: TaskItem[]) => [...tasks.filter((t) => !t.done), ...tasks.filter((t) => t.done)].map((t) => t.id);const initials = (name: string) =>  name    .split(/\s+/)    .filter(Boolean)    .slice(0, 2)    .map((w) => w[0]?.toUpperCase())    .join("");const hue = (seed: string) => {  let h = 0;  for (const c of seed) h = (h * 31 + c.charCodeAt(0)) >>> 0;  return `var(--chart-${(h % 5) + 1}, var(--primary))`;};const isThenable = (r: unknown): r is Promise<unknown> => !!r && typeof (r as Promise<unknown>).then === "function";export function TaskCard({ lists, list, defaultList, onListChange, onToggle, onAdd, className = "", style, ...props }: TaskCardProps) {  const reduced = useReducedMotion();  const [ownList, setOwnList] = React.useState(defaultList ?? lists[0]?.id ?? "");  const currentId = list ?? ownList;  const index = Math.max(0, lists.findIndex((l) => l.id === currentId));  const current = lists[index];  const pair = PAIRS[index % PAIRS.length];  const [color, color2] = Array.isArray(current?.color)    ? current.color    : current?.color      ? [current.color, mix(current.color, 55, "var(--foreground)")]      : [`var(--chart-${pair[0]}, var(--primary))`, `var(--chart-${pair[1]}, var(--primary))`];  // A tick shows straight away and holds until your save settles.  const [pending, setPending] = React.useState<Record<string, boolean>>({});  const [order, setOrder] = React.useState<Record<string, string[]>>({});  const [adding, setAdding] = React.useState(false);  const [draft, setDraft] = React.useState("");  const [busy, setBusy] = React.useState(false);  const [said, setSaid] = React.useState("");  const boxRef = React.useRef<HTMLDivElement>(null);  const contentRef = React.useRef<HTMLDivElement>(null);  const inputRef = React.useRef<HTMLInputElement>(null);  const addRowRef = React.useRef<HTMLDivElement>(null);  const rowRefs = React.useRef(new Map<string, HTMLElement>());  const flip = React.useRef<Map<string, number> | null>(null);  const swap = React.useRef<{ dir: number; from: number } | null>(null);  const seen = React.useRef<{ list: string; ids: Set<string> }>({ list: "", ids: new Set() });  const settleTimer = React.useRef(0);  const liveTasks = React.useRef<{ list: string; tasks: TaskItem[] }>({ list: "", tasks: [] });  const sweepRef = React.useRef<HTMLDivElement>(null);  const finished = React.useRef<{ list: string; all: boolean } | null>(null);  const tasks = React.useMemo(() => (current?.tasks ?? []).map((t) => (t.id in pending ? { ...t, done: pending[t.id] } : t)), [current, pending]);  const byId = new Map(tasks.map((t) => [t.id, t]));  // The order on screen moves only when it settles; new tasks join the open ones.  const base = (current && order[current.id]) ?? openFirst(tasks);  const known = base.filter((id) => byId.has(id));  const fresh = tasks.filter((t) => !known.includes(t.id)).map((t) => t.id);  if (fresh.length) {    const at = known.findIndex((id) => byId.get(id)?.done);    known.splice(at < 0 ? known.length : at, 0, ...fresh);  }  const shown = known.map((id) => byId.get(id)!);  const done = tasks.filter((t) => t.done).length;  const total = tasks.length;  const allDone = total > 0 && done === total;  // Finishing a list sends one band of light across the tray.  React.useEffect(() => {    const id = current?.id ?? "";    const before = finished.current;    finished.current = { list: id, all: allDone };    if (!before || before.list !== id || before.all || !allDone || reduced) return;    sweepRef.current?.animate(      [        { transform: "translateX(-100%)", opacity: 0 },        { opacity: 1, offset: 0.25 },        { transform: "translateX(100%)", opacity: 0 },      ],      { duration: 1300, delay: STRIKE + 200, easing: "cubic-bezier(0.45,0,0.25,1)", fill: "backwards" },    );  }, [allDone, current?.id, reduced]);  React.useLayoutEffect(() => {    liveTasks.current = { list: current?.id ?? "", tasks };  });  React.useEffect(() => () => window.clearTimeout(settleTimer.current), []);  // Done tasks sink (and undone ones rise) in one glide from where they were.  const shownKey = known.join("|");  const listId = current?.id ?? "";  React.useLayoutEffect(() => {    const before = flip.current;    flip.current = null;    // Rows that arrived since the last render fold in, unless the whole list just changed.    const ids = shownKey ? shownKey.split("|") : [];    const same = seen.current.list === listId;    ids.forEach((id) => {      const el = rowRefs.current.get(id);      if (!el || reduced) return;      if (same && !seen.current.ids.has(id)) {        el.animate(          [            { height: "0px", opacity: 0, transform: "translateY(-6px)" },            { height: `${ROW}px`, opacity: 1, transform: "none" },          ],          { duration: 380, easing: EASE },        );        return;      }      const from = before?.get(id);      if (from === undefined) return;      const delta = from - el.offsetTop;      if (Math.abs(delta) < 1) return;      // Rows going down (the done ones) dim as they pass under the rising ones, so the crossing reads as one going behind.      const keyframes: Keyframe[] =        delta < 0          ? [{ transform: `translateY(${delta}px)`, opacity: 1 }, { opacity: 0.45, offset: 0.5 }, { transform: "none", opacity: 1 }]          : [{ transform: `translateY(${delta}px)` }, { transform: "none" }];      el.animate(keyframes, { duration: 600, easing: "cubic-bezier(0.65,0,0.35,1)" });    });    seen.current = { list: listId, ids: new Set(ids) };  }, [shownKey, listId, reduced]);  const settle = (animate: boolean) => {    window.clearTimeout(settleTimer.current);    const { list: listId, tasks: now } = liveTasks.current;    if (!listId) return;    if (animate) {      const snapshot = new Map<string, number>();      rowRefs.current.forEach((el, id) => snapshot.set(id, el.offsetTop));      flip.current = snapshot;    }    setOrder((o) => ({ ...o, [listId]: openFirst(now) }));  };  const toggle = (task: TaskItem) => {    if (!current) return;    const next = !task.done;    const listId = current.id;    // Hold the order on screen until it settles, whatever the tick (or your save) does to the list meanwhile.    const onScreen = known;    setOrder((o) => (o[listId] ? o : { ...o, [listId]: onScreen }));    setPending((p) => ({ ...p, [task.id]: next }));    const box = rowRefs.current.get(task.id)?.querySelector("[data-box]");    if (next && box && !reduced)      box.animate([{ scale: "1" }, { scale: "0.88", offset: 0.4 }, { scale: "1.04", offset: 0.75 }, { scale: "1" }], { duration: 420, easing: "cubic-bezier(0.34,1.36,0.64,1)" });    setSaid(next ? `${task.label}, done.` : `${task.label}, not done.`);    window.clearTimeout(settleTimer.current);    settleTimer.current = window.setTimeout(() => settle(true), SETTLE);    const clear = () =>      setPending((p) => {        if (!(task.id in p)) return p;        const rest = { ...p };        delete rest[task.id];        return rest;      });    const refuse = () => {      clear();      const el = rowRefs.current.get(task.id);      if (el && !reduced) el.animate([{ translate: "0 0" }, { translate: "-4px 0" }, { translate: "4px 0" }, { translate: "-2px 0" }, { translate: "0 0" }], { duration: 380, easing: "ease-out" });    };    let result: unknown;    try {      result = onToggle?.(listId, task.id, next);    } catch {      refuse();      return;    }    if (isThenable(result)) result.then(clear, refuse);    else if (onToggle) clear();  };  const go = (dir: number) => {    if (lists.length < 2) return;    const nextIndex = (index + dir + lists.length) % lists.length;    const next = lists[nextIndex];    settle(false);    setAdding(false);    setDraft("");    const box = boxRef.current;    const content = contentRef.current;    if (box && content && !reduced) {      // The old list leaves as a still copy; the new one renders in its place and slides in.      const ghost = content.cloneNode(true) as HTMLElement;      ghost.setAttribute("aria-hidden", "true");      ghost.inert = true;      Object.assign(ghost.style, { position: "absolute", left: "0", right: "0", top: "0", pointerEvents: "none" });      box.appendChild(ghost);      const out = ghost.animate(        [          { opacity: 1, transform: "none", filter: "blur(0px)" },          { opacity: 0, transform: `translateX(${-dir * 28}px)`, filter: "blur(4px)" },        ],        { duration: 220, easing: EASE, fill: "forwards" },      );      out.onfinish = () => ghost.remove();      out.oncancel = () => ghost.remove();      swap.current = { dir, from: box.offsetHeight };    }    if (list === undefined) setOwnList(next.id);    onListChange?.(next.id);    setSaid(`${next.title}, list ${nextIndex + 1} of ${lists.length}.`);  };  React.useLayoutEffect(() => {    const s = swap.current;    swap.current = null;    const box = boxRef.current;    const content = contentRef.current;    if (!s || !box || !content) return;    content.animate(      [        { opacity: 0, transform: `translateX(${s.dir * 28}px)`, filter: "blur(4px)" },        { opacity: 1, transform: "none", filter: "blur(0px)" },      ],      { duration: 420, delay: 70, easing: EASE, fill: "backwards" },    );    const to = box.offsetHeight;    if (Math.abs(to - s.from) > 1) box.animate([{ height: `${s.from}px` }, { height: `${to}px` }], { duration: 460, easing: EASE });  }, [currentId]);  const submit = () => {    const label = draft.trim();    if (!label || !current || busy || !onAdd) return;    const listId = current.id;    const refuse = () => {      setBusy(false);      if (!reduced) addRowRef.current?.animate([{ translate: "0 0" }, { translate: "-4px 0" }, { translate: "4px 0" }, { translate: "-2px 0" }, { translate: "0 0" }], { duration: 380, easing: "ease-out" });    };    let result: unknown;    try {      result = onAdd(listId, label);    } catch {      refuse();      return;    }    const added = () => {      setBusy(false);      setDraft("");      setSaid(`Added ${label}.`);      requestAnimationFrame(() => inputRef.current?.focus());    };    if (isThenable(result)) {      setBusy(true);      result.then(added, refuse);    } else added();  };  const status = total === 0 ? "No tasks" : done === total ? "All done" : `${done} of ${total}`;  const middle = mix(color, 50, color2);  // Text on the tray picks dark or light from the tray's own colour, keeping a little of its hue, so any theme colour reads.  const ink = `oklch(from ${middle} clamp(0.2, (0.66 - l) * 100, 0.98) calc(c * 0.5) h)`;  const checkInk = `oklch(from ${color} clamp(0.2, (0.7 - l) * 100, 0.99) 0 h)`;  const strikeLine = mix(color, 55, "var(--muted-foreground)");  return (    <div      className={`relative w-full overflow-clip rounded-[26px] p-[5px] ${className}`}      style={{        backgroundColor: middle,        backgroundImage: `repeating-linear-gradient(115deg, ${mix("var(--card)", 16)} 0 1px, transparent 1px 7px), linear-gradient(105deg, ${color}, ${color2})`,        boxShadow: `inset 0 1px 0 ${mix("var(--card)", 40)}, inset 0 0 0 1px ${mix("var(--foreground)", 10)}`,        transitionTimingFunction: EASE,        ...style,      }}      {...props}    >      <div        ref={sweepRef}        aria-hidden="true"        className="pointer-events-none absolute inset-0 opacity-0"        style={{ background: `linear-gradient(100deg, transparent 30%, ${mix("var(--card)", 50)} 50%, transparent 70%)` }}      />      <div aria-hidden="true" data-natural-width className="grid h-0" style={{ gridTemplateColumns: "minmax(0, 340px)" }} />      <div        className="relative rounded-[21px] bg-card text-card-foreground transition-shadow duration-500"        style={{ boxShadow: `0 0 0 1px ${mix(mix(color, 60, "var(--foreground)"), 26)}`, transitionTimingFunction: EASE }}      >        <div ref={boxRef} className="relative overflow-clip rounded-[21px]">          <div ref={contentRef} className="p-4 pb-2.5">            <div className="flex items-baseline justify-between gap-3">              <h3 className="min-w-0 truncate text-[15px] font-medium tracking-[-0.01em] text-foreground">{current?.title}</h3>              <p className="shrink-0 text-[12px] text-muted-foreground tabular-nums">                <TextMorph>{status}</TextMorph>              </p>            </div>            <ul aria-label={current?.title} className="mt-2">              {shown.map((t) => (                <li                  key={t.id}                  ref={(el) => {                    if (el) rowRefs.current.set(t.id, el);                    else rowRefs.current.delete(t.id);                  }}                  className="overflow-clip"                  style={{ height: ROW }}                >                  <button                    type="button"                    role="checkbox"                    aria-checked={t.done}                    onClick={() => toggle(t)}                    className={`group flex h-full w-full cursor-pointer items-center gap-3 rounded-[8px] text-left ${FOCUS}`}                  >                    <span                      aria-hidden="true"                      data-box                      className={`relative flex size-[18px] shrink-0 items-center justify-center overflow-clip rounded-[6px] transition-[box-shadow,background-color] duration-200 ${                        t.done ? "" : "shadow-[inset_0_0_0_1.5px_var(--box-rest)] group-hover:bg-[var(--box-wash)] group-hover:shadow-[inset_0_0_0_1.5px_var(--box-hover)]"                      }`}                      style={{                        ["--box-rest" as string]: mix("var(--foreground)", 24, "var(--border)"),                        ["--box-hover" as string]: mix("var(--foreground)", 45, "var(--border)"),                        ["--box-wash" as string]: "var(--muted)",                      }}                    >                      <span                        className="absolute inset-0 transition-opacity duration-300"                        style={{ background: `linear-gradient(135deg, ${color}, ${color2})`, opacity: t.done ? 1 : 0 }}                      />                      <svg viewBox="0 0 12 12" className="relative size-3" fill="none">                        <path                          d="M2.5 6.2 5 8.6l4.6-5"                          pathLength={1}                          stroke={checkInk}                          strokeWidth="1.8"                          strokeLinecap="round"                          strokeLinejoin="round"                          style={{ strokeDasharray: 1, strokeDashoffset: t.done ? 0 : 1, transition: reduced ? "none" : `stroke-dashoffset 300ms ${EASE} ${t.done ? 60 : 0}ms` }}                        />                      </svg>                    </span>                    {/* The strike: a line travels slowly through the name and the ink fades behind it, exactly as far as it has gone. */}                    <span className="relative min-w-0">                      <span className="block truncate text-[13.5px] text-foreground">{t.label}</span>                      <span                        aria-hidden="true"                        className="absolute inset-0 block truncate text-[13.5px] text-muted-foreground"                        style={{                          clipPath: t.done ? "inset(0 0 0 0)" : "inset(0 100% 0 0)",                          transition: reduced ? "none" : t.done ? `clip-path ${STRIKE}ms cubic-bezier(0.65,0,0.35,1) 160ms` : `clip-path 320ms ${EASE}`,                        }}                      >                        {t.label}                      </span>                      <span                        aria-hidden="true"                        className="absolute left-0 right-0 top-1/2 h-px origin-left rounded-full"                        style={{                          background: strikeLine,                          transform: t.done ? "none" : "scaleX(0)",                          transformOrigin: t.done ? "left" : "right",                          transition: reduced ? "none" : t.done ? `transform ${STRIKE}ms cubic-bezier(0.65,0,0.35,1) 160ms` : `transform 320ms ${EASE}`,                        }}                      />                    </span>                    <span className="flex-1" />                    {(t.due || t.assignee) && <Meta task={t} faded={t.done} reduced={reduced} />}                  </button>                </li>              ))}              {total === 0 && !adding && (                <li className="flex items-center text-[13px] text-muted-foreground" style={{ height: ROW }}>                  Nothing here yet.                </li>              )}            </ul>            {onAdd && (              <div ref={addRowRef} className="flex items-center gap-3" style={{ height: ROW }}>                <span                  aria-hidden="true"                  className="flex size-[18px] shrink-0 items-center justify-center rounded-[6px] text-muted-foreground"                  style={{ boxShadow: `inset 0 0 0 1.5px ${mix("var(--foreground)", 14, "var(--border)")}` }}                >                  {busy ? (                    <svg viewBox="0 0 12 12" className="size-3 animate-spin" fill="none">                      <path d="M6 1.5a4.5 4.5 0 1 1-4.5 4.5" stroke="currentColor" strokeWidth="1.6" strokeLinecap="round" />                    </svg>                  ) : (                    <Plus className="size-3" strokeWidth={2.2} />                  )}                </span>                {adding ? (                  <input                    ref={inputRef}                    value={draft}                    readOnly={busy}                    aria-label={`New task in ${current?.title ?? "list"}`}                    placeholder="Add a task"                    onChange={(e) => setDraft(e.target.value)}                    onKeyDown={(e) => {                      if (e.key === "Enter") {                        e.preventDefault();                        submit();                      } else if (e.key === "Escape") {                        setDraft("");                        setAdding(false);                      }                    }}                    onBlur={() => {                      if (!draft.trim() && !busy) setAdding(false);                    }}                    className="h-full min-w-0 flex-1 bg-transparent text-[16px] text-foreground outline-none placeholder:text-muted-foreground sm:text-[13.5px]"                  />                ) : (                  <button                    type="button"                    onClick={() => {                      setAdding(true);                      requestAnimationFrame(() => inputRef.current?.focus());                    }}                    className={`h-full min-w-0 flex-1 cursor-pointer rounded-[6px] text-left text-[16px] text-muted-foreground transition-colors duration-200 hover:text-foreground sm:text-[13.5px] ${FOCUS}`}                  >                    Add a task                  </button>                )}              </div>            )}          </div>        </div>      </div>      <div className="relative flex h-11 items-center justify-between gap-2 pl-4 pr-1.5" style={{ color: ink }}>        {current?.href ? (          <a            href={current.href}            className={`-mx-1 inline-flex min-w-0 items-center gap-1 rounded-[6px] px-1 text-[12.5px] font-medium transition-opacity duration-200 hover:opacity-75 ${FOCUS}`}          >            <span className="truncate">              <TextMorph>{current.linkLabel ?? "View all"}</TextMorph>            </span>            <ArrowUpRight aria-hidden="true" className="size-3.5 shrink-0" />          </a>        ) : (          <span className="text-[12.5px] font-medium tabular-nums">            <TextMorph>{total - done === 0 ? "Nothing left" : `${total - done} left`}</TextMorph>          </span>        )}        {lists.length > 1 && (          <div className="flex shrink-0 items-center">            {[-1, 1].map((dir) => {              const target = lists[(index + dir + lists.length) % lists.length];              const Icon = dir < 0 ? ChevronLeft : ChevronRight;              return (                <button                  key={dir}                  type="button"                  aria-label={`${dir < 0 ? "Previous" : "Next"} list: ${target.title}`}                  onClick={() => go(dir)}                  className={`flex size-8 cursor-pointer items-center justify-center rounded-full transition-[background-color,scale] duration-200 hover:bg-[color-mix(in_oklab,currentColor_12%,transparent)] active:scale-[0.92] ${FOCUS}`}                  style={{ transitionTimingFunction: EASE }}                >                  <Icon aria-hidden="true" className="size-4" strokeWidth={2.2} />                </button>              );            })}          </div>        )}      </div>      <p className="sr-only" aria-live="polite">        {said}      </p>    </div>  );}function Meta({ task, faded, reduced }: { task: TaskItem; faded: boolean; reduced: boolean }) {  return (    <span      className="flex shrink-0 items-center gap-2"      style={{ opacity: faded ? 0.4 : 1, transition: reduced ? "none" : `opacity ${STRIKE}ms ease ${faded ? 300 : 0}ms` }}    >      {task.due && (        <span className={`text-[11.5px] tabular-nums ${task.late && !faded ? "font-medium text-red-600 dark:text-red-400" : "text-muted-foreground"}`}>{task.due}</span>      )}      {task.assignee &&        (task.assignee.src ? (          // eslint-disable-next-line @next/next/no-img-element          <img src={task.assignee.src} alt={task.assignee.name} className="size-5 rounded-full object-cover" />        ) : (          <span            role="img"            aria-label={task.assignee.name}            className="flex size-5 items-center justify-center rounded-full text-[9px] font-semibold"            style={{ background: mix(hue(task.assignee.name), 20, "var(--card)"), color: mix(hue(task.assignee.name), 80, "var(--foreground)") }}          >            {initials(task.assignee.name)}          </span>        ))}    </span>  );}

Registry item: /r/task-card.json