Skip to content

AI interfacesLumen Halo

CitationsProv1.0.0

Where an answer's claims come from: a small numbered chip in the text opens a card with the site, title and the passage used; Sources lists them all under the answer, folding a long list after a few.

Built on shadcn/ui

.md
pnpm dlx shadcn@latest add @beautiful-ui-pro/lumen-citations

Needs your registry key. Your components.json style picks the Base UI or Radix build: radix-*, new-york and default get Radix, base-* gets Base UI.

Styles didn't apply?

The CLI adds the styles to the CSS file named in components.json (tailwind.css). Check that it points at your global stylesheet, that the project uses Tailwind CSS v4, and that the file is imported in your root layout. Installed by hand: paste styles.css into that file.

Set up the Beautiful UI registry

Free pieces install from their URL with no setup (that URL gives the Base UI build; Radix projects use /r/radix-nova/<name>.json, or add the registries below and the CLI picks your build). Pro pieces need the registries below and BEAUTIFUL_UI_TOKEN in .env.local.

components.json
{
  "registries": {
    "@beautiful-ui": "https://beautiful-ui.dev/r/{style}/{name}.json",
    "@beautiful-ui-pro": {
      "url": "https://beautiful-ui.dev/r/pro/{style}/{name}.json",
      "headers": { "Authorization": "Bearer ${BEAUTIFUL_UI_TOKEN}" }
    }
  }
}

MCP server

claude mcp add --transport http beautiful-ui https://beautiful-ui.dev/api/mcp
Catalog for agents: /llms.txt

Usage

Import it and pass your content. The props that matter most are listed next.

Example
"use client";

import { Citation, Sources, type CitationSource } from "@/components/ui/lumen/controls/citations";

const sources: CitationSource[] = [
  { id: "a", title: "Quarterly report, Q3", url: "https://example.com/reports/q3", snippet: "Revenue grew 12% year on year, led by the enterprise tier." },
  { id: "b", title: "Churn dashboard notes", url: "https://example.com/notes/churn", publisher: "Internal wiki" },
];

export function GroundedAnswer() {
  return (
    <div className="flex flex-col gap-4 text-sm leading-6">
      <p>
        Revenue grew 12% year on year
        <Citation index={1} source={sources[0]!} />, while churn held at 1.8%
        <Citation index={2} source={sources[1]!} />.
      </p>
      <Sources sources={sources} />
    </div>
  );
}

Props

  • Citation index / source–

    number / CitationSource

    The number in the text and the source: { id, title, url, snippet?, publisher?, icon? }.

  • Sources sources–

    CitationSource[]

    All sources, in citation order.

  • Sources collapseAfter4

    number

    Show this many, then Show all (0 never folds).

  • Sources heading"Sources"

    ReactNode

    The list's heading.

  • labels–

    Partial<CitationLabels>

    chip(index, title), open, sources, showAll(n), showFewer.

Source

components/ui/lumen/controls/citations.tsx

This component is included with Pro.

Try the live preview above. Get Pro to install the source.