# Deployment pipeline

Review release stages, checks and approval gates with explicit deployment actions.

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

## When to use

- Use it when a page needs review release stages, checks and approval gates with explicit deployment actions.
- 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 deployment pipeline.

## 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 Deployment pipeline

```sh
npx shadcn@latest add @tidal-pro/deployment-pipeline
```

Stylesheets: `components/ui/tidal.css`, `components/ui/deployment-pipeline.css`.

## Minimal example

```tsx
import"./components/ui/tidal.css";
import"./components/ui/deployment-pipeline.css";
import{TidalDeploymentPipeline}from"./components/ui/deployment-pipeline";
export default()=><div className="tidal-scope"><TidalDeploymentPipeline artifact={"value"} environment={"value"} stages={[{id:"example",label:"Demo",state:"queued"}]} state={"queued"} title={"Demo"}/></div>;
```

## Structured props

- `TidalDeploymentPipeline.artifact: ReactNode`: Required artifact value accepted by this exported component.
- `TidalDeploymentPipeline.environment: ReactNode`: Required environment value accepted by this exported component.
- `TidalDeploymentPipeline.stages: ReadonlyArray<TidalDeploymentStage>`: Required stages value accepted by this exported component.
- `TidalDeploymentPipeline.state: TidalDeploymentState`: Required state value accepted by this exported component.
- `TidalDeploymentPipeline.title: ReactNode`: Required title value accepted by this exported component.
- `TidalDeploymentPipeline.actions?: ReadonlyArray<TidalDeploymentAction> | undefined` (default []): Optional actions value accepted by this exported component.
- `TidalDeploymentPipeline.description?: ReactNode`: Optional description value accepted by this exported component.
- `TidalDeploymentPipeline.emptyContent?: ReactNode` (default "No deployment stages supplied."): Optional empty content value accepted by this exported component.
- `TidalDeploymentPipeline.headingLevel?: "h2" | "h3" | "h4" | "h5" | undefined` (default "h2"): Optional heading level value accepted by this exported component.
- `TidalDeploymentPipeline.labels?: Partial<Record<"log" | "unknown" | TidalDeploymentState | "checks", string>> | undefined` (default {}): Optional labels value accepted by this exported component.
- `TidalDeploymentPipeline.notice?: ReactNode`: Optional notice value accepted by this exported component.
- `TidalDeploymentPipeline.releaseDetails?: ReactNode`: Optional release details value accepted by this exported component.

## Complete usage example

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

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

import { useState } from "react";

import { TidalDeploymentPipeline, type TidalDeploymentStage } from "./components/ui/deployment-pipeline";

import "./components/ui/deployment-pipeline.css";

import "./components/ui/status-badge.css";



const tidalExampleStyles = ".tidal-scope .deployment-pipeline-demo {\n  width: 100%;\n  max-width: 760px;\n  min-width: 0;\n}";

export function DeploymentPipelineDemo() {
  const [phase, setPhase] = useState<"failed" | "approval" | "ready">("failed");
  const stages: TidalDeploymentStage[] = [
    {
      id: "build",
      label: "Build artifact",
      state: "passed",
      timing: "42 seconds",
      description: "Example artifact: app-v1.8.0.zip",
    },
    {
      id: "checks",
      label: "Release checks",
      state: phase === "failed" ? "failed" : "passed",
      checks: [
        { id: "types", label: "Type checks", state: "passed" },
        {
          id: "smoke",
          label: "Preview smoke test",
          state: phase === "failed" ? "failed" : "passed",
          detail:
            phase === "failed"
              ? "Sample failure: preview did not respond."
              : "Sample preview check passed.",
        },
      ],
      actions:
        phase === "failed"
          ? [
              {
                id: "retry",
                label: "Retry sample check",
                onRequest: () => setPhase("approval"),
              },
            ]
          : undefined,
    },
    {
      id: "approval",
      label: "Production approval",
      state:
        phase === "failed"
          ? "queued"
          : phase === "approval"
            ? "awaiting-approval"
            : "passed",
      description:
        phase === "approval"
          ? "Review the artifact before continuing."
          : undefined,
      actions:
        phase === "approval"
          ? [
              {
                id: "approve",
                label: "Approve sample release",
                onRequest: () => setPhase("ready"),
              },
            ]
          : undefined,
    },
    {
      id: "release",
      label: "Production release",
      state: phase === "ready" ? "passed" : "queued",
      description:
        phase === "ready"
          ? "The local sample flow is complete."
          : "Waiting for the preceding stages.",
    },
  ];
  return (
    <div className="deployment-pipeline-demo">
      <TidalDeploymentPipeline
        title="Website release"
        environment="Production"
        artifact="v1.8.0"
        description="main · commit 8b4e2a1 (sample)"
        state={
          phase === "failed"
            ? "failed"
            : phase === "approval"
              ? "awaiting-approval"
              : "passed"
        }
        stages={stages}
        notice="Sample release workflow. No build, verification or deployment runs."
        actions={
          phase === "ready"
            ? [
                {
                  id: "reset",
                  label: "Restart sample",
                  onRequest: () => setPhase("failed"),
                },
              ]
            : []
        }
      />
    </div>
  );
}

export default function AgentExample() {
  return (
    <div className="tidal-scope" data-theme="light" dir="ltr">
      <style>{tidalExampleStyles}</style>
      <DeploymentPipelineDemo />
    </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."],"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."}

Consumer supplies unique ordered stage IDs, queued/running/passed/failed/skipped/awaiting-approval states, exact timing labels, check results, artifact/environment content and all release actions. Stage and root actions have unique ID, label, onRequest, disabled/pending, native button props/ref; unavailable actions stay focusable and inert, native disabled remains native, and caller prevention stops requests. Optional native log links preserve href/modifiers/ref and suppress unavailable click/auxiliary behavior. Root section props/ref, heading levels, labels, releaseDetails, notice and empty content are supported. A synchronous accepted action that removes its focused button restores focus to its retained stage or section without document scrolling. The component does not infer permission, execute deployment, run checks, poll, verify artifacts, or store release state. Consumers supply confirmations, authorization and every approve/retry/cancel/rollback side effect. The demo only changes local sample stages.
