# Uptime history

Browse exact consumer-supplied daily availability, duration and incident context without calculating an uptime claim.

Access: pro. Category: Data. Kind: composite.

## When to use

- Use it when a page needs browse exact consumer-supplied daily availability, duration and incident context without calculating an uptime claim.
- Choose it when the data structure, labels, and state are supplied by the application and must remain consumer controlled.

## Alternatives

- Choose data-table instead when sortable column controls, native row selection and a scrollable table is the actual interface need, rather than uptime history.

## 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 Uptime history

```sh
npx shadcn@latest add @tidal-pro/uptime-history
```

Stylesheets: `components/ui/tidal.css`, `components/ui/uptime-history.css`.

## Minimal example

```tsx
import"./components/ui/tidal.css";
import"./components/ui/uptime-history.css";
import{TidalUptimeHistory}from"./components/ui/uptime-history";
export default()=><div className="tidal-scope"><TidalUptimeHistory periods={[{id:"example",dateLabel:"Demo",status:"operational"}]} summary={"Demo"} title={"Demo"}/></div>;
```

## Structured props

- `TidalUptimeHistory.periods: ReadonlyArray<TidalUptimePeriod>`: Required periods value accepted by this exported component.
- `TidalUptimeHistory.summary: ReactNode`: Required summary value accepted by this exported component.
- `TidalUptimeHistory.title: ReactNode`: Required title value accepted by this exported component.
- `TidalUptimeHistory.activePeriodId?: string | null | undefined`: Optional active period id value accepted by this exported component.
- `TidalUptimeHistory.defaultActivePeriodId?: string | null | undefined` (default null): Optional default active period id value accepted by this exported component.
- `TidalUptimeHistory.description?: ReactNode`: Optional description value accepted by this exported component.
- `TidalUptimeHistory.emptyContent?: ReactNode`: Optional empty content value accepted by this exported component.
- `TidalUptimeHistory.headingLevel?: "h2" | "h3" | "h4" | "h5" | "h6" | undefined` (default "h2"): Optional heading level value accepted by this exported component.
- `TidalUptimeHistory.labels?: Partial<TidalUptimeHistoryLabels> | undefined`: Optional labels value accepted by this exported component.
- `TidalUptimeHistory.nextButtonProps?: NativeInspectorButtonProps | undefined` (default {}): Optional next button props value accepted by this exported component.
- `TidalUptimeHistory.nextButtonRef?: Ref<HTMLButtonElement> | undefined`: Optional next button ref value accepted by this exported component.
- `TidalUptimeHistory.onActivePeriodChange?: ((periodId: string, period: TidalUptimePeriod, source: TidalUptimeInspectSource, event: MouseEvent<HTMLButtonElement>) => void) | undefined`: Callback invoked when the active period change interaction is proposed.
- `TidalUptimeHistory.previousButtonProps?: NativeInspectorButtonProps | undefined` (default {}): Optional previous button props value accepted by this exported component.
- `TidalUptimeHistory.previousButtonRef?: Ref<HTMLButtonElement> | undefined`: Optional previous button ref value accepted by this exported component.

## Complete usage example

[Source](https://tidalui.com/examples/uptime-history.tsx) | [Manifest](https://tidalui.com/examples/uptime-history.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, useMemo, useState, type MouseEvent } from "react";

import { TidalUptimeHistory, type TidalUptimePeriod } from "./components/ui/uptime-history";

import "./components/ui/uptime-history.css";



const tidalExampleStyles = ".uptime-demo,\n.uptime-demo * {\n  box-sizing: border-box;\n}\n\n.uptime-demo {\n  display: grid;\n  width: min(100%, 720px);\n  min-width: 0;\n  gap: 12px;\n}\n\n.uptime-demo-note {\n  min-width: 0;\n  border: 1px solid var(--t-border);\n  border-radius: var(--t-radius-control);\n  background: var(--t-surface);\n  color: var(--t-ink);\n}\n\n.uptime-demo-note summary {\n  display: flex;\n  min-height: 44px;\n  align-items: center;\n  padding: 8px 12px;\n  font-size: 12px;\n  font-weight: 720;\n  cursor: pointer;\n  overflow-wrap: anywhere;\n}\n\n.uptime-demo-note summary:focus-visible {\n  outline: 2px solid var(--t-accent);\n  outline-offset: 3px;\n}\n\n.uptime-demo-note p,\n.uptime-demo-boundary {\n  min-width: 0;\n  margin: 0;\n  color: var(--t-muted);\n  font-size: 11px;\n  line-height: 1.5;\n  overflow-wrap: anywhere;\n}\n\n.uptime-demo-note p {\n  padding: 0 12px 12px;\n}\n\n.uptime-demo-boundary {\n  text-align: center;\n}\n\n@media (prefers-reduced-motion: reduce) {\n  .uptime-demo-note,\n  .uptime-demo-note * {\n    scroll-behavior: auto;\n  }\n}";

const SAMPLE_PERIODS: readonly TidalUptimePeriod[] = [
  {
    id: "oct-01",
    dateLabel: "Oct 1",
    dateTime: "2026-10-01",
    status: "operational",
    duration: "24 h",
  },
  {
    id: "oct-02",
    dateLabel: "Oct 2",
    dateTime: "2026-10-02",
    status: "operational",
    duration: "24 h",
  },
  {
    id: "oct-03",
    dateLabel: "Oct 3",
    dateTime: "2026-10-03",
    status: "operational",
    duration: "24 h",
  },
  {
    id: "oct-04",
    dateLabel: "Oct 4",
    dateTime: "2026-10-04",
    status: "operational",
    duration: "24 h",
  },
  {
    id: "oct-05",
    dateLabel: "Oct 5",
    dateTime: "2026-10-05",
    status: "degraded",
    duration: "1 h 12 m",
  },
  {
    id: "oct-06",
    dateLabel: "Oct 6",
    dateTime: "2026-10-06",
    status: "operational",
    duration: "24 h",
  },
  {
    id: "oct-07",
    dateLabel: "Oct 7",
    dateTime: "2026-10-07",
    status: "operational",
    duration: "24 h",
  },
  {
    id: "oct-08",
    dateLabel: "Oct 8",
    dateTime: "2026-10-08",
    status: "operational",
    duration: "24 h",
  },
  {
    id: "oct-09",
    dateLabel: "Oct 9",
    dateTime: "2026-10-09",
    status: "operational",
    duration: "24 h",
  },
  {
    id: "oct-10",
    dateLabel: "Oct 10",
    dateTime: "2026-10-10",
    status: "operational",
    duration: "24 h",
  },
  {
    id: "oct-11",
    dateLabel: "Oct 11",
    dateTime: "2026-10-11",
    status: "operational",
    duration: "24 h",
  },
  {
    id: "oct-12",
    dateLabel: "Oct 12",
    dateTime: "2026-10-12",
    status: "maintenance",
    duration: "30 m",
    incident: {
      label: "Maintenance note",
      href: "#sample-maintenance-note",
    },
  },
  {
    id: "oct-13",
    dateLabel: "Oct 13",
    dateTime: "2026-10-13",
    status: "operational",
    duration: "24 h",
  },
  {
    id: "oct-14",
    dateLabel: "Oct 14",
    dateTime: "2026-10-14",
    status: "operational",
    duration: "24 h",
  },
];

export function UptimeHistoryDemo() {
  const noteId = `sample-maintenance-note-${useId().replace(/:/g, "")}`;
  const [noteOpen, setNoteOpen] = useState(false);
  const periods = useMemo(
    () =>
      SAMPLE_PERIODS.map((period) =>
        period.incident
          ? {
              ...period,
              incident: {
                ...period.incident,
                href: `#${noteId}`,
                anchorProps: {
                  onClick: (event: MouseEvent<HTMLAnchorElement>) => {
                    if (
                      event.button !== 0 ||
                      event.metaKey ||
                      event.ctrlKey ||
                      event.shiftKey ||
                      event.altKey
                    )
                      return;
                    setNoteOpen(true);
                    const note =
                      event.currentTarget.ownerDocument.getElementById(noteId);
                    if (note instanceof HTMLDetailsElement) note.open = true;
                  },
                },
              },
            }
          : period,
      ),
    [noteId],
  );
  const [activePeriodId, setActivePeriodId] = useState("oct-12");

  return (
    <section className="uptime-demo" aria-label="Uptime history sample">
      <TidalUptimeHistory
        title="Availability history"
        description="Daily history for the sample workspace."
        summary="12 operational · 1 degraded · 1 maintenance"
        periods={periods}
        activePeriodId={activePeriodId}
        onActivePeriodChange={setActivePeriodId}
      />
      <details
        className="uptime-demo-note"
        id={noteId}
        open={noteOpen}
        onToggle={(event) => setNoteOpen(event.currentTarget.open)}
      >
        <summary>Maintenance note</summary>
        <p>Planned sample cache update · 30 minutes.</p>
      </details>
      <p className="uptime-demo-boundary">
        Sample dates and durations. No monitoring or uptime calculation.
      </p>
    </section>
  );
}

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

Required title, exact consumer-owned summary and ordered periods with unique IDs, supplied date labels/dateTime values, operational/degraded/outage/maintenance/unknown status, optional exact string/numeric duration and optional real incident anchors with string/numeric labels. Controlled activePeriodId or uncontrolled defaultActivePeriodId drives a native Previous/Next inspector; onActivePeriodChange receives the proposed ID, exact period, source and native event. Native button props/refs, section props/ref, bounded heading level, description, labels and empty content are supported. A semantic exact-data table mirrors every supplied period without hidden focusable links. Duplicate IDs are retained and reported as a linked configuration error. The component never fetches, monitors, infers dates, polls or calculates an uptime percentage.
