# Citation list

Numbered sources and inline references for answers, reports and research.

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

## When to use

- Use it when a page needs numbered sources and inline references for answers, reports and research.
- 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 citation list.

## 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 Citation list

```sh
npx shadcn@latest add @tidal-pro/citation-list
```

Stylesheets: `components/ui/tidal.css`, `components/ui/citation-list.css`.

## Minimal example

```tsx
import"./components/ui/tidal.css";
import"./components/ui/citation-list.css";
import{TidalCitationList}from"./components/ui/citation-list";
export default()=><div className="tidal-scope"><TidalCitationList citations={[{id:"example",number:1,title:"Demo",href:"#"}]}/></div>;
```

## Structured props

- `TidalCitationReference.number: number`: Required number value accepted by this exported component.
- `TidalCitationReference.sourceId: string`: Required source id value accepted by this exported component.
- `TidalCitationReference.label?: string | undefined`: Optional label value accepted by this exported component.
- `TidalCitationList.citations: ReadonlyArray<TidalCitation>`: Required citations value accepted by this exported component.
- `TidalCitationList.description?: ReactNode`: Optional description value accepted by this exported component.
- `TidalCitationList.emptyMessage?: ReactNode` (default "No sources provided."): Optional empty message value accepted by this exported component.
- `TidalCitationList.headingLevel?: 2 | 3 | 4 | 5 | 6 | undefined` (default 3): Optional heading level value accepted by this exported component.
- `TidalCitationList.title?: ReactNode` (default "Sources"): Optional title value accepted by this exported component.

## Complete usage example

[Source](https://tidalui.com/examples/citation-list.tsx) | [Manifest](https://tidalui.com/examples/citation-list.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 { useId } from "react";

import { TidalCitationList, TidalCitationReference } from "./components/ui/citation-list";

import "./components/ui/citation-list.css";



const tidalExampleStyles = ".tidal-scope .citation-list-demo {\n  width: min(100%, 580px);\n  min-width: 0;\n}\n.tidal-scope .citation-list-demo-answer {\n  margin: 0 0 22px;\n  font-size: 14px;\n  line-height: 1.9;\n  color: var(--t-muted);\n  overflow-wrap: anywhere;\n}";

export function CitationListDemo() {
  const uid = useId().replace(/:/g, "");
  return (
    <div className="citation-list-demo">
      <p className="citation-list-demo-answer">
        Use a native button for actions.
        <TidalCitationReference
          id={`${uid}-reference-1`}
          sourceId={`${uid}-source-1`}
          number={1}
        />{" "}
        Give every control a clear accessible name.
        <TidalCitationReference
          id={`${uid}-reference-2`}
          sourceId={`${uid}-source-2`}
          number={2}
        />
      </p>
      <TidalCitationList
        citations={[
          {
            id: `${uid}-source-1`,
            number: 1,
            title: "The button element",
            href: "https://html.spec.whatwg.org/multipage/form-elements.html#the-button-element",
            metadata: "HTML Living Standard · WHATWG",
            description: "Native button behavior and form participation.",
            returnTargetId: `${uid}-reference-1`,
            linkProps: { target: "_blank" },
          },
          {
            id: `${uid}-source-2`,
            number: 2,
            title: "Names and descriptions",
            href: "https://www.w3.org/WAI/ARIA/apg/practices/names-and-descriptions/",
            metadata: "ARIA Authoring Practices · W3C",
            description: "Practical guidance for naming interactive controls.",
            returnTargetId: `${uid}-reference-2`,
            linkProps: { target: "_blank" },
          },
        ]}
      />
    </div>
  );
}

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

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

citations require unique DOM-safe ids, a positive reference number, title and source href. Each source preserves native link attributes/ref and optional description, metadata and return-reference target. TidalCitationReference renders a native superscript anchor to the exact source id and keeps native modified-click behavior. Optional title, description, empty state, headingLevel and native root attributes/ref. Duplicate source URLs remain separate numbered references; consumers own merging and citation accuracy. No source fetching, URL parsing, answer generation or navigation interception is added.
