Answer First
Q&A gag for Remotion: the big answer lands first, then slides up as the question that explains it appears below, like A pull request. then Who made this video?
In Remotion, Answer First is a Q&A gag where the big answer, such as "A pull request.", lands first, then slides up and shrinks as the question that explains it, "Who made this video?", shows up below. Use it as a punchy hook near the start of a launch video.
$ pnpm dlx shadcn@latest add @remocn/answer-firstHow to build this in Remotion
You don't need @remotion/transitions or fitText for this. Install the component and pass the two lines:
npx shadcn@latest add @remocn/answer-firstIt is one scene: the answer rises word by word and moves up with interpolate() on Easing.bezier curves, then the question rises in. Text is measured on a canvas before the first frame (held with delayRender), so both lines fit the frame width.
Good to know
- Length: 72 frames of motion at 30 fps (144 at 60 fps) with the default props; the demo plays 120 frames, which adds a hold. If the composition is too short, it shrinks every start and length to fit (down to 55%); a longer one holds the final frame. The Usage example below is a 60 fps composition, so the numbers it hands to Remotion are doubled, see Frame rate.
- Installs:
remotion,@remotion/google-fontsfrom npm, plus the remocn helpersglide,frame-rate,timeline. The shadcn CLI copies the source into your project. - Font: loads Outfit itself through
@remotion/google-fonts. PassfontFamilyto use your own face, and load that font in your project. moveAtis in 30 fps frames at any composition frame rate, like every frame count in remocn props. It defaults to 34.- Default colors, dark theme: blue ground
#2445E5, white text, pink accent#FF8FB1.
Usage
// src/Root.tsx
import { Composition } from "remotion";
import { AnswerFirst } from "@/components/remocn/answer-first";
const AnswerFirstScene = () => <AnswerFirst answer="A pull request." question="Who made this video?" />;
export const RemotionRoot = () => (
<Composition
id="AnswerFirst"
component={AnswerFirstScene}
durationInFrames={240}
fps={60}
width={1280}
height={720}
/>
);A big answer rises word by word first, then slides up and shrinks as the question types in below it, so the reader sees the answer before the question. Pass answer and question.
Props12
| Prop | Type | Default |
|---|---|---|
| answer | string"A pull request." The big answer line shown first. | |
| question | string"Who made this video?" The question that types in beneath the answer. | |
| accent | string— Color of the question text; defaults to the theme accent. | |
| ink | string— Text color; overrides the theme ink. | |
| background | string— Stage fill color; pass "transparent" to overlay your own footage. | |
| fontFamily | string"Outfit" Typeface for the copy. Outfit loads by default; load any other face in your project first. | |
| moveAt | number34 Frame the answer starts shrinking into the corner; the question follows it. | |
| stagger | number4 Frames between words of the question. | |
| 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 multiplier for the whole timeline. | |
| theme | "dark" | "light""dark" Color scheme; ships dark and light. | |
- answerstring
The big answer line shown first.
Default
"A pull request." - questionstring
The question that types in beneath the answer.
Default
"Who made this video?" - accentstring
Color of the question text; defaults to the theme accent.
- inkstring
Text color; overrides the theme ink.
- backgroundstring
Stage fill color; pass "transparent" to overlay your own footage.
- fontFamilystring
Typeface for the copy. Outfit loads by default; load any other face in your project first.
Default
"Outfit" - moveAtnumber
Frame the answer starts shrinking into the corner; the question follows it.
Default
34 - staggernumber
Frames between words of the question.
Default
4 - 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 multiplier for the whole timeline.
Default
1 - theme"dark" | "light"
Color scheme; ships dark and light.
Default
"dark"
Common questions
How do I do a Q&A gag in Remotion where the answer lands first and the question shows up to explain it?
Install Answer First with npx shadcn@latest add @remocn/answer-first and pass answer="A pull request." and question="Who made this video?".
Is moveAt counted at the composition fps?
No. It is counted in 30 fps frames, so the move happens at the same moment in seconds at 30 or 60 fps.
Related effects
- Overheard: a back-and-forth between two speakers.
- Coy Denial: a big line undone by a sheepish aside.
- Exactly: objections answered one after another.
- Double Take: a surprising claim that asks for a second look.