AI Answer Sources
An AI answer streams in with inline citations, then a source panel opens from a cited number. A free, MIT-licensed Remotion product scene.
$ pnpm dlx shadcn@latest add @remocn/ai-answer-sourcesUsage
// src/Root.tsx
import { Composition } from "remotion";
import { AiAnswerSources } from "@/components/remocn/ai-answer-sources";
const AiAnswerSourcesScene = () => (
<AiAnswerSources
brand="atlas"
query="How do I cut my cloud bill?"
theme="dark"
/>
);
export const RemotionRoot = () => (
<Composition
id="AiAnswerSources"
component={AiAnswerSourcesScene}
durationInFrames={838}
fps={60}
width={1280}
height={720}
/>
);A question types into a search box and submits, a short thinking sequence runs, then the answer streams in with numbered citations and source chips. A cursor hovers a citation and clicks it, and a panel of the cited sources slides open. Pass query, answer, sources, related, and brand to make it yours; it ships light and dark through theme.
The ground is a live gradients.sh shader (GshGround), installed with the component as @remocn/gsh. Pick another look with the ground preset prop.
Props18
| Prop | Type | Default |
|---|---|---|
| query | string"What is the fastest way to make a launch video?" The question typed into the search box. | |
| sources | AnswerSource[]DEFAULT_SOURCES Source cards: site, title, optional snippet and color. | |
| answer | AnswerBlock[]DEFAULT_ANSWER Answer blocks: paragraphs, headings and bullet lists with [n] citations. | |
| related | string[]DEFAULT_RELATED Follow-up questions shown under the answer. | |
| brand | string"sift" Product name shown in the app header. | |
| placeholder | string"Ask anything" Placeholder in the empty search box. | |
| searchLabel | string"Searching the web" Label of the first research step. | |
| followUpPlaceholder | string"Ask a follow-up" Placeholder in the follow-up bar under the answer. | |
| accent | string"#20808D" Accent color for citations and highlights. | |
| ink | string— Text color; overrides the theme ink. | |
| background | string— Solid fill in place of the gradient ground; pass "transparent" to drop it. | |
| fontFamily | string"Geist" Typeface for the copy. Load the font in your project first. | |
| scale | number1 Size of the foreground around the frame's center; the background stays put. | |
| delay | number0 Frames to hold the first frame before anything moves. | |
| speed | number1 Playback speed multiplier for the whole timeline. | |
| theme | "light" | "dark""light" Light or dark interface. | |
| ground | GshPresetId— Gradient shader preset for the background. | |
| groundParams | Partial<GradientParams>— Overrides for the shader preset parameters. | |
- querystring
The question typed into the search box.
Default
"What is the fastest way to make a launch video?" - sourcesAnswerSource[]
Source cards: site, title, optional snippet and color.
Default
DEFAULT_SOURCES - answerAnswerBlock[]
Answer blocks: paragraphs, headings and bullet lists with [n] citations.
Default
DEFAULT_ANSWER - relatedstring[]
Follow-up questions shown under the answer.
Default
DEFAULT_RELATED - brandstring
Product name shown in the app header.
Default
"sift" - placeholderstring
Placeholder in the empty search box.
Default
"Ask anything" - searchLabelstring
Label of the first research step.
Default
"Searching the web" - followUpPlaceholderstring
Placeholder in the follow-up bar under the answer.
Default
"Ask a follow-up" - accentstring
Accent color for citations and highlights.
Default
"#20808D" - inkstring
Text color; overrides the theme ink.
- backgroundstring
Solid fill in place of the gradient ground; pass "transparent" to drop it.
- fontFamilystring
Typeface for the copy. Load the font in your project first.
Default
"Geist" - scalenumber
Size of the foreground around the frame's center; the background stays put.
Default
1 - delaynumber
Frames to hold the first frame before anything moves.
Default
0 - speednumber
Playback speed multiplier for the whole timeline.
Default
1 - theme"light" | "dark"
Light or dark interface.
Default
"light" - groundGshPresetId
Gradient shader preset for the background.
- groundParamsPartial<GradientParams>
Overrides for the shader preset parameters.