Skip to content
ProLifetime access for $199, paid once, every future release included
Truffle UI

Citation Card

ProNew

Inline numbered citations in AI answers that reveal floating spring-animated source preview cards on hover or focus.

Installation

pnpm dlx shadcn@latest add @viewport/citation-card

First time? Add the @viewport registry to components.json. Setup takes one minute.

Usage

The code behind the preview above comes with Truffle Pro.

Props

<Citation>

PropTypeDefault
source*CitationSource

Source metadata shown inside the floating preview card.

—
classNamestring—

<CitationList>

PropTypeDefault
sources*CitationSource[]

Compact strip of source pills rendered below an AI response.

—
classNamestring—

Accessibility

  • Each citation is a real external link with an accessible name including its source number and title.
  • Preview cards open on keyboard focus as well as pointer hover.
  • Tooltip pop-in disables spring scaling under reduced motion.