# Project grid

A controlled responsive project directory with progress, owners, status, native destinations and optional search and status controls.

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

## When to use

- Use it when a page needs a controlled responsive project directory with progress, owners, status, native destinations and optional search and status controls.
- 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 project grid.

## 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 Project grid

```sh
npx shadcn@latest add @tidal-pro/project-grid
```

Stylesheets: `components/ui/tidal.css`, `components/ui/project-grid.css`.

## Minimal example

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

## Structured props

- `TidalProjectGrid.projects: ReadonlyArray<TidalProject>`: Required projects value accepted by this exported component.
- `TidalProjectGrid.title: ReactNode`: Required title value accepted by this exported component.
- `TidalProjectGrid.countLabel?: ((count: number) => string) | undefined` (default (count) => `${count} shown`): Optional count label value accepted by this exported component.
- `TidalProjectGrid.description?: ReactNode`: Optional description value accepted by this exported component.
- `TidalProjectGrid.emptyMessage?: ReactNode` (default "No projects match this view."): Optional empty message value accepted by this exported component.
- `TidalProjectGrid.eyebrow?: ReactNode` (default "Projects"): Optional eyebrow value accepted by this exported component.
- `TidalProjectGrid.footer?: ReactNode`: Optional footer value accepted by this exported component.
- `TidalProjectGrid.headerAction?: TidalProjectAction | undefined`: Optional header action value accepted by this exported component.
- `TidalProjectGrid.headingLevel?: "h2" | "h3" | "h4" | undefined` (default "h2"): Optional heading level value accepted by this exported component.
- `TidalProjectGrid.maxVisibleOwners?: number | undefined` (default 3): Optional max visible owners value accepted by this exported component.
- `TidalProjectGrid.ownersLabel?: ((project: TidalProject) => string) | undefined` (default (project) => `Owners of ${project.accessibleName}`): Optional owners label value accepted by this exported component.
- `TidalProjectGrid.projectActionsLabel?: ((project: TidalProject) => string) | undefined` (default (project) =>
        `Actions for ${project.accessibleName}`): Optional project actions label value accepted by this exported component.
- `TidalProjectGrid.projectHeadingLevel?: "h3" | "h4" | "h5" | undefined`: Optional project heading level value accepted by this exported component.
- `TidalProjectGrid.projectsLabel?: string | undefined` (default "Projects"): Optional projects label value accepted by this exported component.
- `TidalProjectGrid.remainingOwnersLabel?: ((count: number, project: TidalProject) => string) | undefined` (default (count, project) =>
        `${count} more owners of ${project.accessibleName}`): Optional remaining owners label value accepted by this exported component.
- `TidalProjectGrid.search?: TidalProjectSearchControl | undefined`: Optional search value accepted by this exported component.
- `TidalProjectGrid.shownLabel?: ReactNode` (default "shown"): Optional shown label value accepted by this exported component.
- `TidalProjectGrid.statusFilter?: TidalProjectStatusControl | undefined`: Optional status filter value accepted by this exported component.
- `TidalProjectGrid.toolbarLabel?: string | undefined` (default "Project controls"): Optional toolbar label value accepted by this exported component.

## Complete usage example

[Source](https://tidalui.com/examples/project-grid.tsx) | [Manifest](https://tidalui.com/examples/project-grid.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, useLayoutEffect, useMemo, useRef, useState } from "react";

import { TidalProjectGrid, type TidalProject, type TidalProjectAction, type TidalProjectOwner } from "./components/ui/project-grid";

import "./components/ui/project-grid.css";

function tidalExampleAvatarDataUri(seed: unknown) {
  const text = String(seed).replace(/[^a-z0-9]/gi, "").slice(-2) || "UI";
  const palette = ["#333333", "#555555", "#777777", "#999999", "#bbbbbb"];
  const color = palette[Array.from(text).reduce((sum, character) => sum + character.charCodeAt(0), 0) % palette.length];
  const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96"><rect width="96" height="96" rx="48" fill="${color}"/><circle cx="48" cy="38" r="17" fill="white" fill-opacity=".92"/><path d="M18 92c3-22 15-34 30-34s27 12 30 34" fill="white" fill-opacity=".92"/></svg>`;
  return `data:image/svg+xml,${encodeURIComponent(svg)}`;
}

function tidalExampleImageDataUri(label: string) {
  const safeLabel = label.replace(/[<>&]/g, "").slice(0, 28) || "Sample image";
  const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 675"><defs><linearGradient id="g" x1="0" x2="1" y1="0" y2="1"><stop stop-color="#171717"/><stop offset="1" stop-color="#555555"/></linearGradient></defs><rect width="1200" height="675" fill="url(#g)"/><circle cx="950" cy="100" r="260" fill="white" fill-opacity=".08"/><text x="80" y="570" fill="white" font-family="system-ui,sans-serif" font-size="64" font-weight="700">${safeLabel}</text></svg>`;
  return `data:image/svg+xml,${encodeURIComponent(svg)}`;
}

const tidalExampleStyles = ".tidal-scope .project-grid-demo,\n.tidal-scope .project-grid-demo * {\n  box-sizing: border-box;\n}\n\n.tidal-scope .project-grid-demo {\n  display: grid;\n  width: 100%;\n  max-width: 1160px;\n  min-width: 0;\n  gap: 14px;\n  padding: 20px;\n  border: 1px solid var(--t-border);\n  border-radius: 22px;\n  background: var(--t-subtle);\n  color: var(--t-ink);\n  container: project-grid-demo / inline-size;\n}\n\n.tidal-scope .project-grid-demo-detail {\n  min-width: 0;\n  padding: 21px 22px;\n  border: 1px solid var(--t-border);\n  border-radius: 18px;\n  background: var(--t-ink);\n  color: var(--t-surface);\n  scroll-margin-block: 18px;\n}\n\n.tidal-scope .project-grid-demo-detail:focus-visible {\n  outline: 2px solid var(--t-accent);\n  outline-offset: 3px;\n}\n\n.tidal-scope .project-grid-demo-detail > span {\n  color: color-mix(in srgb, var(--t-surface) 65%, var(--t-ink));\n  font-size: 11px;\n  font-weight: 680;\n  letter-spacing: 0.1em;\n  line-height: 1.4;\n  text-transform: uppercase;\n}\n\n.tidal-scope .project-grid-demo-detail h3 {\n  margin: 8px 0 0;\n  font-size: 22px;\n  font-weight: 560;\n  letter-spacing: -0.04em;\n  line-height: 1.15;\n  overflow-wrap: anywhere;\n}\n\n.tidal-scope .project-grid-demo-detail p {\n  max-width: 68ch;\n  margin: 8px 0 0;\n  color: color-mix(in srgb, var(--t-surface) 72%, var(--t-ink));\n  font-size: 11px;\n  line-height: 1.6;\n  overflow-wrap: anywhere;\n}\n\n.tidal-scope .project-grid-demo-detail dl {\n  display: grid;\n  grid-template-columns: repeat(3, minmax(0, 1fr));\n  gap: 1px;\n  margin: 17px 0 0;\n  overflow: hidden;\n  border: 1px solid color-mix(in srgb, var(--t-surface) 24%, var(--t-ink));\n  border-radius: 10px;\n  background: color-mix(in srgb, var(--t-surface) 24%, var(--t-ink));\n}\n\n.tidal-scope .project-grid-demo-detail dl > div {\n  min-width: 0;\n  padding: 11px 12px;\n  background: var(--t-ink);\n}\n\n.tidal-scope .project-grid-demo-detail dt {\n  color: color-mix(in srgb, var(--t-surface) 58%, var(--t-ink));\n  font-size: 11px;\n  font-weight: 660;\n  line-height: 1.35;\n}\n\n.tidal-scope .project-grid-demo-detail dd {\n  margin: 4px 0 0;\n  font-size: 11px;\n  line-height: 1.45;\n  overflow-wrap: anywhere;\n}\n\n@container project-grid-demo (max-width: 430px) {\n  .tidal-scope .project-grid-demo {\n    gap: 9px;\n    padding: 8px;\n  }\n\n  .tidal-scope .project-grid-demo-detail {\n    padding: 18px 16px;\n  }\n\n  .tidal-scope .project-grid-demo-detail dl {\n    grid-template-columns: minmax(0, 1fr);\n  }\n}";

interface ProjectSeed {
  id: string;
  name: string;
  accessibleName: string;
  description: string;
  status: { id: string; label: string };
  progress: { value: number; label: string };
  owners: readonly TidalProjectOwner[];
  meta: string;
  reviewed?: boolean;
}

const INITIAL_PROJECTS: readonly ProjectSeed[] = [
  {
    id: "atlas",
    name: "Atlas onboarding",
    accessibleName: "Atlas onboarding",
    description:
      "A focused setup path for a fictional product workspace and its first brief.",
    status: { id: "active", label: "Active" },
    progress: { value: 72, label: "Setup progress" },
    owners: [
      {
        id: "ava",
        name: "Ava Chen",
        avatarSrc: tidalExampleAvatarDataUri("01"),
      },
      {
        id: "eli",
        name: "Eli Park",
        avatarSrc: tidalExampleAvatarDataUri("04"),
      },
    ],
    meta: "Updated today",
  },
  {
    id: "northstar",
    name: "Northstar research",
    accessibleName: "Northstar research",
    description:
      "A local sample directory for interview notes, themes, and open questions.",
    status: { id: "planned", label: "Planned" },
    progress: { value: 34, label: "Research progress" },
    owners: [
      {
        id: "mila",
        name: "Mila Stone",
        avatarSrc: tidalExampleAvatarDataUri("03"),
      },
      {
        id: "noah",
        name: "Noah Reed",
        avatarSrc: tidalExampleAvatarDataUri("02"),
      },
      {
        id: "imani",
        name: "Imani Cole",
        avatarSrc: tidalExampleAvatarDataUri("07"),
      },
      {
        id: "omar",
        name: "Omar Hale",
        avatarSrc: tidalExampleAvatarDataUri("08"),
      },
    ],
    meta: "Updated Monday",
  },
  {
    id: "relay",
    name: "Relay launch kit",
    accessibleName: "Relay launch kit",
    description:
      "A fictional release package with review notes and prepared handoff copy.",
    status: { id: "complete", label: "Complete" },
    progress: { value: 100, label: "Launch progress" },
    owners: [
      {
        id: "priya",
        name: "Priya Shah",
        avatarSrc: tidalExampleAvatarDataUri("05"),
      },
    ],
    meta: "Updated last week",
  },
  {
    id: "signal",
    name: "Signal reporting",
    accessibleName: "Signal reporting",
    description:
      "A compact reporting surface for local sample metrics and review prompts.",
    status: { id: "active", label: "Active" },
    progress: { value: 58, label: "Build progress" },
    owners: [
      {
        id: "mateo",
        name: "Mateo Ruiz",
        avatarSrc: tidalExampleAvatarDataUri("06"),
      },
      {
        id: "ava",
        name: "Ava Chen",
        avatarSrc: tidalExampleAvatarDataUri("01"),
      },
    ],
    meta: "Updated Friday",
  },
];

const STATUS_OPTIONS = [
  { value: "all", label: "All statuses" },
  { value: "active", label: "Active" },
  { value: "planned", label: "Planned" },
  { value: "complete", label: "Complete" },
] as const;

export function ProjectGridDemo() {
  const generatedId = useId().replace(/:/g, "");
  const detailId = `project-grid-${generatedId}-detail`;
  const [projects, setProjects] =
    useState<readonly ProjectSeed[]>(INITIAL_PROJECTS);
  const [search, setSearch] = useState("");
  const [status, setStatus] = useState("all");
  const [selectedId, setSelectedId] = useState("atlas");
  const [message, setMessage] = useState(
    "This directory uses fictional local sample data.",
  );
  const destinationNodes = useRef(new Map<string, HTMLAnchorElement>());
  const pendingProjectFocus = useRef<string | null>(null);

  useLayoutEffect(() => {
    const projectId = pendingProjectFocus.current;
    if (!projectId) return;
    const destination = destinationNodes.current.get(projectId);
    if (!destination) return;
    pendingProjectFocus.current = null;
    destination.focus({ preventScroll: true });
  }, [projects]);

  const projectModels = useMemo<readonly TidalProject[]>(
    () =>
      projects.map((project) => ({
        ...project,
        destination: {
          href: `#${detailId}`,
          label: `Open ${project.accessibleName} detail`,
          linkRef: (node) => {
            if (node) destinationNodes.current.set(project.id, node);
            else destinationNodes.current.delete(project.id);
          },
          linkProps: {
            onClick: () => {
              setSelectedId(project.id);
              setMessage(`${project.name} detail opened on this page.`);
            },
          },
        },
        actions: [
          {
            kind: "button" as const,
            id: "review-locally",
            label: project.reviewed ? "Reviewed locally" : "Review locally",
            disabled: project.reviewed,
            onAction: () => {
              pendingProjectFocus.current = project.id;
              setProjects((current) =>
                current.map((item) =>
                  item.id === project.id ? { ...item, reviewed: true } : item,
                ),
              );
              setMessage(
                `${project.name} was marked reviewed in local preview state.`,
              );
            },
          },
        ],
        meta: project.reviewed ? "Reviewed locally" : project.meta,
      })),
    [detailId, projects],
  );

  const visibleProjects = useMemo(() => {
    const query = search.trim().toLocaleLowerCase();
    return projectModels.filter((project) => {
      const matchesStatus = status === "all" || project.status.id === status;
      const matchesSearch =
        !query ||
        `${project.accessibleName} ${String(project.description ?? "")}`
          .toLocaleLowerCase()
          .includes(query);
      return matchesStatus && matchesSearch;
    });
  }, [projectModels, search, status]);

  const sampleAdded = projects.some((project) => project.id === "harbor");
  const addSampleAction = useMemo<TidalProjectAction>(
    () => ({
      kind: "button",
      id: "add-sample-project",
      label: sampleAdded ? "Sample project added" : "Add sample project",
      disabled: sampleAdded,
      onAction: () => {
        const sample: ProjectSeed = {
          id: "harbor",
          name: "Harbor release notes",
          accessibleName: "Harbor release notes",
          description:
            "A newly added fictional record for checking local directory updates.",
          status: { id: "planned", label: "Planned" },
          progress: { value: 12, label: "Release progress" },
          owners: [
            {
              id: "samir",
              name: "Samir Patel",
              avatarSrc: tidalExampleAvatarDataUri("10"),
            },
          ],
          meta: "Added just now",
        };
        pendingProjectFocus.current = sample.id;
        setProjects((current) =>
          current.some((project) => project.id === sample.id)
            ? current
            : [...current, sample],
        );
        setSearch("");
        setStatus("all");
        setSelectedId(sample.id);
        setMessage(
          "Harbor release notes was added visibly to local preview state. No record was saved.",
        );
      },
    }),
    [sampleAdded],
  );

  const selectedProject = projects.find((project) => project.id === selectedId);

  return (
    <section className="project-grid-demo" aria-label="Project grid preview">
      <TidalProjectGrid
        title="Projects"
        eyebrow={null}
        description="Search sample projects or open their details."
        projects={visibleProjects}
        search={{
          value: search,
          onValueChange: setSearch,
          placeholder: "Search name or summary",
        }}
        statusFilter={{
          value: status,
          options: STATUS_OPTIONS,
          onValueChange: setStatus,
        }}
        headerAction={addSampleAction}
        footer={
          <span>
            <span role="status" aria-live="polite">
              {message}
            </span>{" "}
            No project, collaboration, request, or account data is stored or
            connected.
          </span>
        }
      />

      <article id={detailId} className="project-grid-demo-detail" tabIndex={-1}>
        <span>In-page project detail</span>
        <h3>{selectedProject?.name ?? "Choose a visible project"}</h3>
        <p>
          {selectedProject?.description ??
            "Use a project name in the grid to open its local sample detail."}
        </p>
        {selectedProject ? (
          <dl>
            <div>
              <dt>Status</dt>
              <dd>{selectedProject.status.label}</dd>
            </div>
            <div>
              <dt>Progress</dt>
              <dd>{selectedProject.progress.value}%</dd>
            </div>
            <div>
              <dt>Owners</dt>
              <dd>
                {selectedProject.owners.map((owner) => owner.name).join(", ")}
              </dd>
            </div>
          </dl>
        ) : null}
      </article>
    </section>
  );
}

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

```

## Gotchas

- The host application owns data, validation, persistence, navigation, and service side effects described by this API.

## 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."}

title and typed consumer-owned projects are required. Each project supplies accessibleName, status, native progress, owners, a native destination link and optional native link/button actions, meta, card attributes and refs. Optional controlled search and statusFilter controls report native changes after supplied handlers unless prevented; consumers supply the filtered project array. Optional headerAction uses the same native action contract. Link aria-disabled true suppresses caller handling/navigation while explicit false is preserved; native button onClick runs before onAction and preventDefault suppresses the higher callback. Root/card/destination/progress/image/input/select/action native attributes and refs pass through. Heading levels, labels, owner limit, empty state and footer are consumer-owned. The component performs no filtering, project creation, request, collaboration, account, network or storage work.
