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

AI Answer Preview

ProNew

An answer an AI assistant gave, with your brand and competitors marked where they are named and the sources it cited listed, yours set apart.

Installation

pnpm dlx shadcn@latest add @viewport/ai-answer-preview

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

PropTypeDefault
engine*string

The assistant that gave the answer, e.g. "Perplexity".

—
prompt*string

The question that was asked.

—
answer*string

The answer's text. Paragraphs are split on blank lines.

—
brands*string[]

Names to mark in the answer. The first is yours and is marked strongly; the rest are competitors.

—
citations{ domain: string; title?: string; href?: string; own?: boolean }[]

The sources the answer cited, in the order it cited them.

[]
capturedstring

When the answer was captured, already formatted.

—

Accessibility

  • Marks say whether they are your brand or a competitor.
  • Mentioned or not is stated in words.
  • Your own source is labelled for screen readers.
  • Server component with no client JavaScript.