# Integration cards

A responsive integration catalog for consumer-owned connection states, settings, filters, and native actions.

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

## When to use

- Use it when a page needs a responsive integration catalog for consumer-owned connection states, settings, filters, and native 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 integration cards.

## 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 Integration cards

```sh
npx shadcn@latest add @tidal-pro/integration-cards
```

Stylesheets: `components/ui/tidal.css`, `components/ui/integration-cards.css`.

## Minimal example

```tsx
import"./components/ui/tidal.css";
import"./components/ui/integration-cards.css";
import{TidalIntegrationCards}from"./components/ui/integration-cards";
export default()=><div className="tidal-scope"><TidalIntegrationCards items={[{id:"example",name:"Demo",status:{state:"available",label:"Demo"}}]} title={"Demo"}/></div>;
```

## Structured props

- `TidalIntegrationCards.items: ReadonlyArray<TidalIntegrationItem>`: Required items value accepted by this exported component.
- `TidalIntegrationCards.title: ReactNode`: Required title value accepted by this exported component.
- `TidalIntegrationCards.activeFilter?: string | undefined`: Optional active filter value accepted by this exported component.
- `TidalIntegrationCards.description?: ReactNode`: Optional description value accepted by this exported component.
- `TidalIntegrationCards.emptyMessage?: ReactNode` (default "No integrations match this view."): Optional empty message value accepted by this exported component.
- `TidalIntegrationCards.eyebrow?: ReactNode` (default "Integrations"): Optional eyebrow value accepted by this exported component.
- `TidalIntegrationCards.filterLabel?: string | undefined` (default "Filter integrations"): Optional filter label value accepted by this exported component.
- `TidalIntegrationCards.filters?: ReadonlyArray<TidalIntegrationFilter> | undefined`: Optional filters value accepted by this exported component.
- `TidalIntegrationCards.footer?: ReactNode`: Optional footer value accepted by this exported component.
- `TidalIntegrationCards.headingLevel?: "h2" | "h3" | "h4" | undefined` (default "h2"): Optional heading level value accepted by this exported component.
- `TidalIntegrationCards.onFilterChange?: ((filterId: string, event: ReactMouseEvent<HTMLButtonElement>) => void) | undefined`: Callback invoked when the filter change interaction is proposed.

## Complete usage example

[Source](https://tidalui.com/examples/integration-cards.tsx) | [Manifest](https://tidalui.com/examples/integration-cards.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 { CalendarDays, Check, ChevronRight, FileText, MessageSquareText, RefreshCw, Unplug, Workflow } from "lucide-react";

import { useEffect, useId, useMemo, useRef, useState } from "react";

import { TidalIntegrationCards, type TidalIntegrationItem, type TidalIntegrationState } from "./components/ui/integration-cards";

import "./components/ui/integration-cards.css";



const tidalExampleStyles = ".tidal-scope .integration-cards-demo,\n.tidal-scope .integration-cards-demo * {\n  box-sizing: border-box;\n}\n\n.tidal-scope .integration-cards-demo {\n  display: grid;\n  width: 100%;\n  min-width: 0;\n  grid-template-columns: minmax(0, 1fr);\n  gap: 16px;\n  padding: 16px;\n  color: var(--t-ink);\n  background: var(--t-subtle);\n  border: 1px solid var(--t-border);\n  border-radius: 22px;\n  container: integration-demo / inline-size;\n}\n\n.tidal-scope .integration-cards-demo-main {\n  min-width: 0;\n  padding: 16px;\n  background: var(--t-surface);\n  border: 1px solid var(--t-border);\n  border-radius: 16px;\n}\n\n.tidal-scope .integration-cards-demo .tidal-integration-footer > button {\n  display: inline-flex;\n  min-width: 44px;\n  min-height: 44px;\n  align-items: center;\n  justify-content: center;\n  gap: 8px;\n  padding: 8px 12px;\n  color: var(--t-ink);\n  background: var(--t-surface);\n  border: 1px solid var(--t-border);\n  border-radius: 10px;\n  font: inherit;\n  font-size: 11px;\n  font-weight: 650;\n  cursor: pointer;\n}\n\n.tidal-scope .integration-cards-demo .tidal-integration-footer > button svg {\n  width: 15px;\n  height: 15px;\n}\n\n.tidal-scope .integration-cards-demo .tidal-integration-footer > button:hover {\n  border-color: var(--t-ink);\n}\n\n.tidal-scope\n  .integration-cards-demo\n  .tidal-integration-footer\n  > button:focus-visible,\n.tidal-scope .integration-cards-demo-details h3:focus-visible {\n  outline: 2px solid var(--t-accent);\n  outline-offset: 3px;\n}\n\n.tidal-scope .integration-cards-demo-details {\n  display: grid;\n  min-width: 0;\n  grid-template-columns: minmax(150px, 0.7fr) minmax(180px, 1fr) minmax(\n      220px,\n      1fr\n    );\n  align-items: center;\n  gap: 16px;\n  margin-top: 14px;\n  padding: 16px;\n  color: var(--t-surface);\n  background: var(--t-ink);\n  border-radius: 14px;\n}\n\n.tidal-scope .integration-cards-demo-details span,\n.tidal-scope .integration-cards-demo-details dt {\n  color: #bdbdbd;\n  font-size: 11px;\n  font-weight: 680;\n  letter-spacing: 0.09em;\n  line-height: 1.4;\n  text-transform: uppercase;\n}\n\n.tidal-scope .integration-cards-demo-details h3 {\n  margin: 5px 0 0;\n  color: inherit;\n  font-size: 16px;\n  line-height: 1.2;\n  overflow-wrap: anywhere;\n}\n\n.tidal-scope .integration-cards-demo-details p {\n  margin: 0;\n  color: #d0d0d0;\n  font-size: 11px;\n  line-height: 1.55;\n  overflow-wrap: anywhere;\n}\n\n.tidal-scope .integration-cards-demo-details dl {\n  display: grid;\n  grid-template-columns: repeat(2, minmax(0, 1fr));\n  gap: 12px;\n  margin: 0;\n}\n\n.tidal-scope .integration-cards-demo-details dl > div,\n.tidal-scope .integration-cards-demo-details dd {\n  min-width: 0;\n}\n\n.tidal-scope .integration-cards-demo-details dd {\n  margin: 4px 0 0;\n  color: var(--t-surface);\n  font-size: 11px;\n  font-weight: 620;\n  line-height: 1.4;\n  overflow-wrap: anywhere;\n}\n\n.tidal-scope .integration-cards-demo-status {\n  min-height: 18px;\n  margin: 10px 4px 0;\n  color: var(--t-muted);\n  font-size: 11px;\n  line-height: 1.5;\n  overflow-wrap: anywhere;\n}\n\n@container integration-demo (max-width: 760px) {\n  .tidal-scope .integration-cards-demo {\n    grid-template-columns: minmax(0, 1fr);\n  }\n}\n\n@container integration-demo (max-width: 560px) {\n  .tidal-scope .integration-cards-demo {\n    padding: 8px;\n    border-radius: 16px;\n  }\n\n  .tidal-scope .integration-cards-demo-main {\n    padding: 12px;\n    border-radius: 13px;\n  }\n\n  .tidal-scope .integration-cards-demo-details {\n    grid-template-columns: minmax(0, 1fr);\n    gap: 10px;\n    padding: 14px;\n  }\n\n  .tidal-scope .integration-cards-demo-details dl {\n    padding-top: 10px;\n    border-top: 1px solid #ffffff2e;\n  }\n\n  .tidal-scope .integration-cards-demo .tidal-integration-footer {\n    align-items: flex-start;\n    flex-direction: column;\n  }\n}\n\n@container integration-demo (max-width: 390px) {\n  .tidal-scope .integration-cards-demo-main {\n    padding: 9px;\n  }\n}\n\n@media (pointer: coarse) {\n  .tidal-scope .integration-cards-demo :is(input, select, textarea) {\n    font-size: 16px;\n  }\n}\n\n@media (prefers-reduced-motion: no-preference) {\n  .tidal-scope .integration-cards-demo-details {\n    animation: integration-details-in 300ms var(--t-ease-out) both;\n  }\n}\n\n@keyframes integration-details-in {\n  from {\n    opacity: 0;\n    transform: translateY(6px);\n  }\n  to {\n    opacity: 1;\n    transform: none;\n  }\n}\n\n@media (prefers-reduced-motion: reduce) {\n  .tidal-scope .integration-cards-demo-details {\n    animation: none;\n  }\n\n  .tidal-scope .integration-cards-demo .tidal-integration-footer > button {\n    transition: none;\n  }\n}";

type IntegrationId = "schedule" | "files" | "notes" | "relay";

type FilterId = "all" | TidalIntegrationState;

interface SampleIntegration {
  id: IntegrationId;
  name: string;
  description: string;
  state: TidalIntegrationState;
}

const initialIntegrations: readonly SampleIntegration[] = [
  {
    id: "schedule",
    name: "Schedule bridge",
    description:
      "Preview how sample project dates could be grouped in one place.",
    state: "connected",
  },
  {
    id: "files",
    name: "File handoff",
    description: "Stage sample project documents for a local review flow.",
    state: "available",
  },
  {
    id: "notes",
    name: "Team notes",
    description: "Review a sample channel that needs a delivery choice.",
    state: "attention",
  },
  {
    id: "relay",
    name: "Relay rules",
    description: "Preview a local rule after a sample task is completed.",
    state: "available",
  },
] as const;

const iconById = {
  schedule: <CalendarDays />,
  files: <FileText />,
  notes: <MessageSquareText />,
  relay: <Workflow />,
} satisfies Record<IntegrationId, React.ReactNode>;

const settingsById = {
  schedule: [
    { id: "range", label: "Range", value: "Next 14 sample days" },
    { id: "direction", label: "Direction", value: "Two-way preview" },
  ],
  files: [
    { id: "folder", label: "Folder", value: "Sample project files" },
    { id: "access", label: "Access", value: "Preview only" },
  ],
  notes: [
    { id: "channel", label: "Channel", value: "Review notes" },
    { id: "delivery", label: "Delivery", value: "Choose manually" },
  ],
  relay: [
    { id: "trigger", label: "Trigger", value: "Task completed" },
    { id: "result", label: "Result", value: "Local status only" },
  ],
} satisfies Record<
  IntegrationId,
  readonly { id: string; label: string; value: string }[]
>;

const detailById = {
  schedule: "Shows a 14-day sample range and a two-way preview setting.",
  files: "Keeps fictional project documents inside this browser preview.",
  notes: "Waits for a sample delivery choice before its state is cleared.",
  relay: "Changes only the local card state after a sample task event.",
} satisfies Record<IntegrationId, string>;

function stateLabel(state: TidalIntegrationState) {
  if (state === "connected") return "Connected in sample";
  if (state === "attention") return "Review sample";
  return "Available";
}

export function IntegrationCardsDemo() {
  const generatedId = useId().replace(/:/g, "");
  const detailsId = `integration-sample-details-${generatedId}`;
  const [integrations, setIntegrations] =
    useState<readonly SampleIntegration[]>(initialIntegrations);
  const [filter, setFilter] = useState<FilterId>("all");
  const [selectedDetails, setSelectedDetails] =
    useState<IntegrationId>("schedule");
  const [message, setMessage] = useState(
    "This preview is local. No service or account was contacted.",
  );
  const detailsHeadingRef = useRef<HTMLHeadingElement>(null);
  const focusFrameRef = useRef<number | null>(null);

  useEffect(
    () => () => {
      if (focusFrameRef.current !== null) {
        cancelAnimationFrame(focusFrameRef.current);
      }
    },
    [],
  );

  const counts = useMemo(
    () => ({
      all: integrations.length,
      connected: integrations.filter((item) => item.state === "connected")
        .length,
      available: integrations.filter((item) => item.state === "available")
        .length,
      attention: integrations.filter((item) => item.state === "attention")
        .length,
    }),
    [integrations],
  );

  const visibleIntegrations = useMemo(
    () =>
      filter === "all"
        ? integrations
        : integrations.filter((item) => item.state === filter),
    [filter, integrations],
  );

  function updateState(id: IntegrationId, nextState: TidalIntegrationState) {
    const item = integrations.find((entry) => entry.id === id);
    if (!item) return;
    setIntegrations((current) =>
      current.map((entry) =>
        entry.id === id ? { ...entry, state: nextState } : entry,
      ),
    );
    if (filter !== "all" && filter !== nextState) setFilter("all");
    setMessage(
      `${item.name} is now ${stateLabel(nextState).toLowerCase()}. This changed sample state only.`,
    );
  }

  function showDetails(id: IntegrationId) {
    setSelectedDetails(id);
    setMessage(
      `Showing local details for ${integrations.find((item) => item.id === id)?.name ?? "the sample"}.`,
    );
    if (focusFrameRef.current !== null) {
      cancelAnimationFrame(focusFrameRef.current);
    }
    focusFrameRef.current = requestAnimationFrame(() => {
      focusFrameRef.current = null;
      detailsHeadingRef.current?.focus({ preventScroll: true });
    });
  }

  const cards = useMemo<readonly TidalIntegrationItem[]>(
    () =>
      visibleIntegrations.map((integration) => {
        const isConnected = integration.state === "connected";
        const needsReview = integration.state === "attention";
        return {
          id: integration.id,
          name: integration.name,
          description: integration.description,
          icon: iconById[integration.id],
          status: {
            state: integration.state,
            label: stateLabel(integration.state),
          },
          settings: settingsById[integration.id],
          action: {
            kind: "button",
            label: isConnected
              ? "Disconnect sample"
              : needsReview
                ? "Mark sample reviewed"
                : "Connect sample",
            icon: isConnected ? <Unplug /> : <Check />,
            onAction: () =>
              updateState(
                integration.id,
                isConnected ? "available" : "connected",
              ),
          },
          secondaryAction: {
            kind: "button",
            label: "View details",
            icon: <ChevronRight />,
            buttonProps: { "aria-controls": detailsId },
            onAction: () => showDetails(integration.id),
          },
          footer: "Local preview data",
        };
      }),
    [detailsId, visibleIntegrations],
  );

  const filters = (["all", "connected", "available", "attention"] as const).map(
    (id) => ({
      id,
      label:
        id === "all"
          ? "All"
          : id === "connected"
            ? "Connected"
            : id === "available"
              ? "Available"
              : "Review",
      count: counts[id],
    }),
  );

  const selected = integrations.find((item) => item.id === selectedDetails)!;

  function selectFilter(nextFilter: string) {
    const next = nextFilter as FilterId;
    const nextVisible =
      next === "all"
        ? integrations
        : integrations.filter((item) => item.state === next);
    setFilter(next);
    if (
      nextVisible.length > 0 &&
      !nextVisible.some((item) => item.id === selectedDetails)
    ) {
      setSelectedDetails(nextVisible[0].id);
    }
    setMessage(
      next === "all"
        ? "Showing all four local samples."
        : nextVisible.length
          ? `Showing ${nextVisible.length} ${next} local ${nextVisible.length === 1 ? "sample" : "samples"}.`
          : `No local samples are ${next}.`,
    );
  }

  function resetSample() {
    if (focusFrameRef.current !== null) {
      cancelAnimationFrame(focusFrameRef.current);
      focusFrameRef.current = null;
    }
    setIntegrations(initialIntegrations);
    setFilter("all");
    setSelectedDetails("schedule");
    setMessage("Sample reset. No service or account was contacted.");
  }

  return (
    <div className="integration-cards-demo">
      <div className="integration-cards-demo-main">
        <TidalIntegrationCards
          title="Integrations"
          eyebrow={null}
          description="Explore the sample connections and their settings."
          items={cards}
          filters={filters}
          filterLabel="Filter sample integrations"
          activeFilter={filter}
          onFilterChange={selectFilter}
          emptyMessage="No sample integrations match this filter."
          footer={
            <>
              <span>Fictional sample data</span>
              <button type="button" onClick={resetSample}>
                <RefreshCw aria-hidden="true" />
                Reset sample
              </button>
            </>
          }
        />

        <section
          id={detailsId}
          className="integration-cards-demo-details"
          aria-labelledby={`${detailsId}-title`}
        >
          <div>
            <span>Selected preview</span>
            <h3 id={`${detailsId}-title`} ref={detailsHeadingRef} tabIndex={-1}>
              {selected.name}
            </h3>
          </div>
          <p>{detailById[selected.id]}</p>
          <dl>
            {settingsById[selected.id].map((setting) => (
              <div key={setting.id}>
                <dt>{setting.label}</dt>
                <dd>{setting.value}</dd>
              </div>
            ))}
          </dl>
        </section>

        <p
          className="integration-cards-demo-status"
          role="status"
          aria-live="polite"
        >
          {message}
        </p>
      </div>
    </div>
  );
}

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

TidalIntegrationCards requires title and a consumer-owned items array. Each item has a stable id, name, status, and optional description, decorative icon, settings definition list, primary or secondary native link/button action, footer, article attributes/ref. Filters accept labels/counts and activeFilter; with onFilterChange they are controlled native buttons with disabled state/attributes/ref and call the higher callback after an unprevented native click, while without it they render as static labels rather than false controls. Link actions preserve href, modified navigation, attributes and ref; action.disabled or linkProps aria-disabled true resolves the disabled contract and suppresses navigation and caller handlers. Button actions preserve native attributes/ref/type(default button), disabled state and prevented handler composition. Root title hierarchy, description, eyebrow, empty message, footer, native section attributes/ref and labelling are configurable. The component renders supplied state only and never connects an account, requests data, stores credentials, or owns async results. Controls are 44px, labels wrap, container queries reflow at narrow widths, RTL uses logical properties, and reduced motion is static.
