Import
Quick Reference
| Component | Purpose | Key Props |
|---|---|---|
<Render> | Root container | width, height, fps |
<Clip> | Time segment | duration, transition |
<Image> | AI or static image | prompt, src, zoom |
<Video> | AI or source video | prompt, src, volume |
<Speech> | Text-to-speech | voice, children |
<Music> | Background music | prompt, volume, loop |
<Title> | Text overlay | position, color |
<Captions> | Auto-generated subs | src, style |
<Overlay> | Positioned layer | left, top, width, height |
<Split> | Side-by-side | direction |
Container Components
Render
Root container for video composition. Required for all videos.| Prop | Type | Default | Description |
|---|---|---|---|
width | number | 1080 | Video width in pixels |
height | number | 1920 | Video height in pixels |
fps | number | 30 | Frames per second |
| Platform | Resolution | Aspect Ratio |
|---|---|---|
| TikTok/Reels/Shorts | 1080x1920 | 9:16 |
| YouTube | 1920x1080 | 16:9 |
| Instagram Feed | 1080x1080 | 1:1 |
Clip
Time segment container. Clips play sequentially.| Prop | Type | Default | Description |
|---|---|---|---|
duration | number | Required | Duration in seconds |
transition | object | undefined | Transition to next clip |
cutFrom | number | 0 | Start time offset |
cutTo | number | undefined | End time offset |
Media Components
Image
AI-generated or static image.| Prop | Type | Default | Description |
|---|---|---|---|
prompt | string | Required | Image description |
model | ImageModel | varg.imageModel("nano-banana-pro") | AI model |
aspectRatio | string | "1:1" | Output ratio |
| Prop | Type | Default | Description |
|---|---|---|---|
src | string or ImageRef | Required | Image source or reference |
zoom | "in" "out" "left" "right" | undefined | Ken Burns effect |
resize | "cover" or "contain" | "cover" | Resize mode |
Video
AI-generated or source video.| Prop | Type | Default | Description |
|---|---|---|---|
prompt | string or object | - | Generation prompt |
src | string | - | Source video path |
model | VideoModel | varg.videoModel("kling-v3") | AI model |
volume | number | 1 | Audio volume (0-1) |
cutFrom | number | 0 | Start trim |
cutTo | number | - | End trim |
Speech
Text-to-speech voiceover.| Prop | Type | Default | Description |
|---|---|---|---|
children | string | Required | Text to speak |
model | SpeechModel | varg.speechModel("eleven_v3") | TTS model |
voice | string | "rachel" | Voice name or ID |
volume | number | 1 | Audio volume |
rachel, adam, bella, josh, sam, antoni, elli, arnold, domi
Music
Background music generation.| Prop | Type | Default | Description |
|---|---|---|---|
prompt | string | - | Music description |
src | string | - | Source audio file |
model | MusicModel | varg.musicModel() | Generation model |
volume | number | 1 | Audio volume (0.1-0.3 for background) |
loop | boolean | false | Loop audio |
ducking | number | undefined | Lower volume during speech |
Text Components
Title
Text overlay on video.| Prop | Type | Default | Description |
|---|---|---|---|
children | string | Required | Title text |
position | "top" "center" "bottom" | "center" | Position |
color | string | "#ffffff" | Text color |
start | number | 0 | Start time |
end | number | - | End time |
Captions
Auto-generated subtitles from speech.| Prop | Type | Default | Description |
|---|---|---|---|
src | SpeechRef | Required | Speech reference for timing |
srt | string | - | Custom SRT file |
style | string | "tiktok" | Caption animation style |
color | string | "#ffffff" | Text color |
activeColor | string | - | Active word color |
| Style | Description |
|---|---|
tiktok | Word-by-word highlight |
karaoke | Fill left-to-right |
bounce | Words bounce in |
typewriter | Typing effect |
Layout Components
Overlay
Positioned layer on top of content.| Prop | Type | Default | Description |
|---|---|---|---|
left | number | 0 | X position |
top | number | 0 | Y position |
width | number | - | Width |
height | number | - | Height |
keepAudio | boolean | true | Keep overlay audio |
Split
Side-by-side layout.| Prop | Type | Default | Description |
|---|---|---|---|
direction | "horizontal" or "vertical" | "horizontal" | Split direction |
SplitLayout
Before/after comparison layout.Grid
Grid layout for multiple items.| Prop | Type | Default | Description |
|---|---|---|---|
columns | number | 2 | Number of columns |
Slider
Before/after reveal slider.Swipe
Tinder-style card swipe.| Prop | Type | Default | Description |
|---|---|---|---|
direction | "horizontal" or "vertical" | "horizontal" | Swipe direction |
interval | number | 2 | Seconds per card |
Special Components
TalkingHead
Complete talking character with automatic lipsync.| Prop | Type | Default | Description |
|---|---|---|---|
character | ImageRef | Required | Character image |
children | string | Required | Script text |
voice | string | "rachel" | Voice name |
model | VideoModel | - | Animation model |
lipsyncModel | VideoModel | - | Lipsync model |
Packshot
End card with call-to-action.| Prop | Type | Default | Description |
|---|---|---|---|
background | string | "#000000" | Background color |
logo | string | - | Logo image path |
cta | string | - | Call-to-action text |
blinkCta | boolean | false | Animate CTA |