# Task detail

Inspect and edit consumer-owned task status, assignment, due date, checklist, and activity in one controlled block.

Access: pro. Category: Blocks. Kind: composite.

## When to use

- Use it when a page needs inspect and edit consumer-owned task status, assignment, due date, checklist, and activity in one controlled block.
- Choose it inside an authenticated product surface when the host application owns routing, persistence, and service calls.

## Alternatives

- Choose empty-state instead when empty collections, search results and errors with a clear next action is the actual interface need, rather than task detail.

## Setup for agents

Use React 19 and TypeScript. Initialize shadcn for your framework, then merge this exact entry into components.json:

```json
{
  "registries": {
    "@tidal-pro": {
      "url": "https://tidalui.com/r/pro/{name}.json",
      "headers": {
        "Authorization": "Bearer ${TIDALUI_TOKEN}"
      }
    }
  }
}
```

The namespace must be named **@tidal-pro** because transitive Pro dependencies use that namespace. Obtain an agent key from your active Pro account at https://tidalui.com/account. Keep TIDALUI_TOKEN in your local environment, never in components.json, client code, Git or logs.

```sh
export TIDALUI_TOKEN='your-private-agent-key'
npx shadcn@latest add @tidal-pro/waitlist-form
npx shadcn@latest add https://tidalui.com/r/tidal-button.json
```

Free command: `npx shadcn@latest add https://tidalui.com/r/<name>.json`.
Pro command: `npx shadcn@latest add @tidal-pro/<name>`.

Import the base stylesheet and every stylesheet listed on the installed item's metadata. For example:

```tsx
import "./components/ui/tidal.css";
import "./components/ui/hero-section.css";
// Place installed components inside this wrapper:
<div className="tidal-scope" data-theme="dark">...</div>
```

Omit data-theme for the default light theme. Put the attribute on the same tidal-scope element for dark mode. Every component installs the shared free tidal-base dependency. After upgrading, run `npx shadcn@latest add https://tidalui.com/r/tidal-base.json --overwrite` to receive current tokens. Review local modifications before overwriting.

Vite: Use React + TypeScript. Map @/* to ./src/* in paths and Vite resolve.alias. Import tidal.css and each component stylesheet in your application entry.

Next.js 15 App Router: Next.js App Router: import tidal.css and component CSS in app/layout.tsx. Interactive examples belong in a client component with "use client". Map @/* to ./* or ./src/* to match your project.

TypeScript 6: use paths without baseUrl:

```json
{
  "compilerOptions": {
    "paths": {
      "@/*": [
        "./src/*"
      ]
    }
  }
}
```

Pro registry requests are server/CLI-only. Use the same-origin account interface in a browser; cross-origin Authorization preflights are intentionally unsupported.


## Install Task detail

```sh
npx shadcn@latest add @tidal-pro/task-detail
```

Stylesheets: `components/ui/tidal.css`, `components/ui/task-detail.css`.

## Minimal example

```tsx
import"./components/ui/tidal.css";
import"./components/ui/task-detail.css";
import{TidalTaskDetail}from"./components/ui/task-detail";
export default(p:Parameters<typeof TidalTaskDetail>[0])=><div className="tidal-scope"><TidalTaskDetail {...p}/></div>;
```

## Structured props

- `TidalTaskDetail.assignees: ReadonlyArray<TidalTaskDetailOption>`: Required assignees value accepted by this exported component.
- `TidalTaskDetail.editing: boolean`: Required editing value accepted by this exported component.
- `TidalTaskDetail.onEditingChange: (editing: boolean, event: MouseEvent<HTMLButtonElement>) => void`: Callback invoked when the editing change interaction is proposed.
- `TidalTaskDetail.onValueChange: (value: TidalTaskDetailValue, event: TidalTaskDetailChangeEvent) => void`: Callback invoked when the value change interaction is proposed.
- `TidalTaskDetail.statuses: ReadonlyArray<TidalTaskDetailOption>`: Required statuses value accepted by this exported component.
- `TidalTaskDetail.value: TidalTaskDetailValue`: Required value value accepted by this exported component.
- `TidalTaskDetail.activity?: ReactNode`: Optional activity value accepted by this exported component.
- `TidalTaskDetail.assigneeRequired?: boolean | undefined` (default false): Optional assignee required value accepted by this exported component.
- `TidalTaskDetail.assigneeSelectProps?: OwnedSelectProps | undefined`: Optional assignee select props value accepted by this exported component.
- `TidalTaskDetail.assigneeSelectRef?: Ref<HTMLSelectElement> | undefined`: Optional assignee select ref value accepted by this exported component.
- `TidalTaskDetail.busy?: boolean | undefined` (default false): Optional busy value accepted by this exported component.
- `TidalTaskDetail.cancelButtonProps?: OwnedActionProps | undefined`: Optional cancel button props value accepted by this exported component.
- `TidalTaskDetail.cancelButtonRef?: Ref<HTMLButtonElement> | undefined`: Optional cancel button ref value accepted by this exported component.
- `TidalTaskDetail.descriptionProps?: OwnedTextareaProps | undefined`: Optional description props value accepted by this exported component.
- `TidalTaskDetail.descriptionRef?: Ref<HTMLTextAreaElement> | undefined`: Optional description ref value accepted by this exported component.
- `TidalTaskDetail.disabled?: boolean | undefined` (default false): Optional disabled value accepted by this exported component.
- `TidalTaskDetail.dueDateDisplay?: ReactNode`: Optional due date display value accepted by this exported component.
- `TidalTaskDetail.dueDateInputProps?: OwnedInputProps | undefined`: Optional due date input props value accepted by this exported component.
- `TidalTaskDetail.dueDateInputRef?: Ref<HTMLInputElement> | undefined`: Optional due date input ref value accepted by this exported component.
- `TidalTaskDetail.editButtonProps?: OwnedActionProps | undefined`: Optional edit button props value accepted by this exported component.
- `TidalTaskDetail.editButtonRef?: Ref<HTMLButtonElement> | undefined`: Optional edit button ref value accepted by this exported component.
- `TidalTaskDetail.errors?: Partial<{ title: ReactNode; description: ReactNode; status: ReactNode; assignee: ReactNode; dueDate: ReactNode; checklist: ReactNode; form: ReactNode; }> | undefined` (default {}): Optional errors value accepted by this exported component.
- `TidalTaskDetail.formProps?: Omit<FormHTMLAttributes<HTMLFormElement>, "aria-disabled" | "children" | "dangerouslySetInnerHTML"> | undefined`: Optional form props value accepted by this exported component.
- `TidalTaskDetail.formRef?: Ref<HTMLFormElement> | undefined`: Optional form ref value accepted by this exported component.
- `TidalTaskDetail.headingLevel?: "h2" | "h3" | "h4" | "h5" | undefined` (default "h2"): Optional heading level value accepted by this exported component.
- `TidalTaskDetail.labels?: Partial<{ task: string; edit: string; save: string; saving: string; cancel: string; title: string; description: string; status: string; assignee: string; unassigned: string; dueDate: string; noDueDate: string; checklist: string; activity: string; completed: string; invalid: string; }> | undefined`: Optional labels value accepted by this exported component.
- `TidalTaskDetail.onCancel?: ((event: MouseEvent<HTMLButtonElement>) => void) | undefined`: Callback invoked when the cancel interaction is proposed.
- `TidalTaskDetail.onSave?: ((event: FormEvent<HTMLFormElement>) => void) | undefined`: Callback invoked when the save interaction is proposed.
- `TidalTaskDetail.saveButtonProps?: OwnedActionProps | undefined`: Optional save button props value accepted by this exported component.
- `TidalTaskDetail.saveButtonRef?: Ref<HTMLButtonElement> | undefined`: Optional save button ref value accepted by this exported component.
- `TidalTaskDetail.statusSelectProps?: OwnedSelectProps | undefined`: Optional status select props value accepted by this exported component.
- `TidalTaskDetail.statusSelectRef?: Ref<HTMLSelectElement> | undefined`: Optional status select ref value accepted by this exported component.
- `TidalTaskDetail.titleInputProps?: OwnedInputProps | undefined`: Optional title input props value accepted by this exported component.
- `TidalTaskDetail.titleInputRef?: Ref<HTMLInputElement> | undefined`: Optional title input ref value accepted by this exported component.

## Complete usage example

[Source](https://tidalui.com/examples/task-detail.tsx) | [Manifest](https://tidalui.com/examples/task-detail.json). Install the listed additional dependencies. Consumer fixture: TypeScript pass; Vite pass. This fixture check is distinct from the actual shadcn install receipt.

```tsx
"use client";

import "./components/ui/tidal.css";

import { useId, useState } from "react";

import { TidalTaskDetail, type TidalTaskDetailValue } from "./components/ui/task-detail";

import "./components/ui/task-detail.css";



const tidalExampleStyles = ".tidal-scope .task-detail-demo {\n  container: task-detail-demo / inline-size;\n  display: grid;\n  gap: 12px;\n  inline-size: min(100%, 860px);\n  min-inline-size: 0;\n  margin-inline: auto;\n}\n\n.tidal-scope .task-detail-demo-activity {\n  display: grid;\n  gap: 0;\n  margin: 12px 0 0;\n  padding: 0;\n  list-style: none;\n}\n\n.tidal-scope .task-detail-demo-activity li {\n  display: grid;\n  grid-template-columns: 44px minmax(0, 1fr);\n  align-items: start;\n  min-inline-size: 0;\n  border-block-start: 1px solid var(--t-border);\n  padding-block: 11px;\n}\n\n.tidal-scope .task-detail-demo-activity li > span {\n  display: grid;\n  place-items: center;\n  inline-size: 32px;\n  block-size: 32px;\n  border: 1px solid var(--t-border);\n  border-radius: 50%;\n  background: var(--t-subtle);\n  font-size: 11px;\n  font-weight: 760;\n}\n\n.tidal-scope .task-detail-demo-activity p {\n  display: grid;\n  gap: 4px;\n  min-inline-size: 0;\n  margin: 0;\n  color: var(--t-muted);\n  font-size: 12px;\n  line-height: 1.45;\n  overflow-wrap: anywhere;\n}\n\n.tidal-scope .task-detail-demo-activity strong {\n  color: var(--t-ink);\n}\n\n.tidal-scope .task-detail-demo-activity time {\n  font-size: 11px;\n}\n\n.tidal-scope .task-detail-demo-footer {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  gap: 10px;\n  min-inline-size: 0;\n  padding: 4px 6px;\n}\n\n.tidal-scope .task-detail-demo-footer p,\n.tidal-scope .task-detail-demo-note {\n  min-inline-size: 0;\n  margin: 0;\n  color: var(--t-muted);\n  font-size: 11px;\n  line-height: 1.45;\n  overflow-wrap: anywhere;\n}\n\n.tidal-scope .task-detail-demo-footer button {\n  flex: 0 0 auto;\n  min-inline-size: 44px;\n  min-block-size: 44px;\n  border: 0;\n  padding: 8px 10px;\n  background: transparent;\n  color: var(--t-ink);\n  font: inherit;\n  font-size: 11px;\n  font-weight: 760;\n  cursor: pointer;\n}\n\n.tidal-scope .task-detail-demo-footer button:focus-visible {\n  outline: 3px solid var(--t-accent);\n  outline-offset: 2px;\n}\n\n.tidal-scope .task-detail-demo-note {\n  border-block-start: 1px solid var(--t-border);\n  padding: 12px 6px 0;\n}\n\n@container task-detail-demo (max-width: 360px) {\n  .tidal-scope .task-detail-demo-footer {\n    align-items: start;\n  }\n}\n\n@media (prefers-reduced-motion: reduce) {\n  .tidal-scope .task-detail-demo * {\n    animation: none !important;\n    transition-duration: 0s !important;\n  }\n}";

const STATUSES = [
  { id: "planned", label: "Planned" },
  { id: "progress", label: "In progress" },
  { id: "review", label: "In review" },
  { id: "done", label: "Done" },
] as const;

const ASSIGNEES = [
  { id: "ava", label: "Ava Moreno" },
  { id: "noah", label: "Noah Patel" },
  { id: "mila", label: "Mila Santos" },
] as const;

const INITIAL: TidalTaskDetailValue = {
  id: "task-184",
  title: "Review import mapping",
  description:
    "Confirm the account and owner columns before the sample import is prepared.",
  statusId: "review",
  assigneeId: "ava",
  dueDate: "2026-10-19",
  checklist: [
    { id: "headers", label: "Verify required headers", completed: true },
    { id: "owners", label: "Check unmatched owner rows", completed: false },
    { id: "sample", label: "Review the sample output", completed: false },
  ],
};

export function TaskDetailDemo() {
  const statusId = useId().replace(/:/g, "");
  const [saved, setSaved] = useState<TidalTaskDetailValue>(INITIAL);
  const [draft, setDraft] = useState<TidalTaskDetailValue>(INITIAL);
  const [editing, setEditing] = useState(false);
  const [message, setMessage] = useState("Ready to review.");
  const shown = editing ? draft : saved;

  return (
    <div className="task-detail-demo">
      <TidalTaskDetail
        value={shown}
        statuses={STATUSES}
        assignees={ASSIGNEES}
        editing={editing}
        onEditingChange={(next) => {
          if (next) setDraft(saved);
          setEditing(next);
        }}
        onValueChange={setDraft}
        onCancel={() => {
          setDraft(saved);
          setMessage("Changes canceled.");
        }}
        onSave={(event) => {
          event.preventDefault();
          if (!draft.title.trim()) {
            setMessage("Add a title before saving.");
            return;
          }
          setSaved(draft);
          setEditing(false);
          setMessage("Task changes saved in this preview.");
        }}
        errors={
          editing && !draft.title.trim()
            ? {
                title: "Enter a task title.",
                form: "Review the highlighted field.",
              }
            : undefined
        }
        activity={
          <ol className="task-detail-demo-activity">
            <li>
              <span aria-hidden="true">AM</span>
              <p>
                <strong>Ava</strong> moved the sample task to In review.
                <time dateTime="2026-10-15T14:30:00-05:00">2:30 PM</time>
              </p>
            </li>
            <li>
              <span aria-hidden="true">NP</span>
              <p>
                <strong>Noah</strong> completed Verify required headers.
                <time dateTime="2026-10-15T13:52:00-05:00">1:52 PM</time>
              </p>
            </li>
          </ol>
        }
      />
      <div className="task-detail-demo-footer">
        <p id={statusId} role="status" aria-live="polite">
          {message}
        </p>
        <button
          type="button"
          onClick={() => {
            setSaved(INITIAL);
            setDraft(INITIAL);
            setEditing(false);
            setMessage("Sample task reset.");
          }}
        >
          Reset
        </button>
      </div>
      <p className="task-detail-demo-note">
        Sample data. Changes stay in this preview.
      </p>
    </div>
  );
}

export default function AgentExample() {
  return (
    <div className="tidal-scope" data-theme="light" dir="ltr">
      <style>{tidalExampleStyles}</style>
      <TaskDetailDemo />
    </div>
  );
}

```

## Gotchas

- Install the declared registry dependencies and render inside a tidal-scope with the foundation stylesheet loaded.

## Theme and accessibility

{"tokens":["--t-accent","--t-border","--t-border-strong","--t-canvas","--t-danger","--t-display","--t-ease-out","--t-ease-spring","--t-faint","--t-font","--t-ink","--t-line","--t-muted","--t-primary","--t-primary-contrast","--t-radius-card","--t-radius-control","--t-radius-overlay","--t-radius-panel","--t-ring","--t-shadow-lg","--t-shadow-soft","--t-soft","--t-subtle","--t-surface","--t-wash"],"darkMode":true}

{"keyboard":["Tab and Shift+Tab follow the component's native focus order.","Arrow-key behavior follows the exported composite-control implementation."],"aria":"The component wires labels and relationships from consumer-provided visible text or ARIA props; preserve those labels in production.","notes":"Verify focus visibility, text alternatives, contrast, and reduced motion in the final composition."}

Requires a controlled task value, unique enabled status and optional assignee values, controlled editing state, and value/edit callbacks. View mode presents supplied status, assignment, exact date, checklist and optional consumer activity. Edit mode uses a native form with named controlled title, description, status, assignee, due-date and checklist fields plus a persistent taskId mirror; form action/method and submitter overrides remain native. Field and action handlers run caller-first and honor prevention. Disabled, busy or structurally invalid forms block direct native submission. Native disabled and aria-disabled action states block higher callbacks while explicit false is preserved. Consumer errors link to their fields and form, numeric ReactNode checklist/error/activity content is preserved, and h2-h5 roots yield one subordinate heading level. Synchronously accepted edit, cancel or save transitions use bounded source-aware focus recovery without stealing unrelated focus. Refs support React 19 cleanup. RTL, 180/320/390 widths, long content, 44px actions, 16px narrow fields, forced colors and reduced motion are supported. Consumers own persistence, activity, authorization, notifications and side effects; the component sends no request and stores nothing.
