Skip to content
Components / AI chat

Citations and sources

Numbered citation chips linked to a list of source cards.

@fabrials/ai-ui

Installation

  1. Import the control from @fabrials/ai-ui, after setting the app up.

    TypeScript
    import { CitationProvider, CitationChip, Sources, SourceCard, SourceFavicon } from "@fabrials/ai-ui";import "@fabrials/ai-ui/styles.css";

API reference

Prop / exportTypeDescription
sourcesCitationSource[]CitationProvider sources by number. Hovering a chip highlights its card.
numbernumberCitationChip number and href. Shows a source preview.
SourcescomponentCollapsible list of SourceCard links.
faviconUrl(url) => stringHost resolver for favicons. Without it a letter mark is shown.

Behavior

Presentational. The host supplies the sources and any favicon service; nothing is fetched by these components.

Accessibility

Keyboard and contrast
Keep visible labels, keyboard focus and status announcements when customizing. These components inherit your theme; maintain sufficient contrast in both color modes. The preview is keyboard operable.