Up Close

An image starts zoomed in on one detail, then pulls back into a framed shot with a second caption. A free, MIT-licensed Remotion media layout.

Installation
$ pnpm dlx shadcn@latest add @remocn/up-close

Usage

tsx
// src/Root.tsx
import { Composition } from "remotion";
import { UpClose } from "@/components/remocn/up-close";
 
const UpCloseScene = () => (
  <UpClose
    src="/shots/product.png"
    close="Up close, it’s code."
    wide="From here, it’s your launch."
    focus={{ x: 0.58, y: 0.52 }}
  />
);
 
export const RemotionRoot = () => (
  <Composition
    id="UpClose"
    component={UpCloseScene}
    durationInFrames={125}
    fps={30}
    width={1280}
    height={720}
  />
);

The image fills the frame zoomed in on the focus point under the close caption. It then pulls back into a framed shot and the wide caption writes in while the first caption lifts. Pass your own image through src and tune zoom and focus; the default is a staticFile image from the Remocn repo. The timeline scales with the composition length, and 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

PropTypeDefault
close
string"Up close, it’s code."

Caption shown while zoomed in.

wide
string"From here, it’s your launch."

Caption shown after pulling back.

src
string—

Image URL. Defaults to a repo-only file.

aspect
number1200 / 630

Aspect ratio of the image.

focus
{ x: number; y: number }{ x: 0.58, y: 0.52 }

Point of interest as fractions of width and height, 0 to 1.

zoom
number3

Initial zoom factor on the focus point.

readoutLabel
string"Zoom"

Label above the zoom readout.

pullAt
number44

Frame the shot pulls back from the close-up, at the default 125-frame length.

accent
string—

Accent color for the zoom readout. Defaults depend on theme.

ink
string—

Text color; overrides the theme ink.

background
string—

Solid background. Use 'transparent' to drop the ground.

fontFamily
string"Onest"

Typeface for the copy. Load the font in your project first.

ground
GshPresetId—

Shader preset id for the animated background.

groundParams
Partial<GradientParams>—

Partial shader parameters that override the ground preset.

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
"dark" | "light""dark"

Color scheme. Ships light and dark.

  • closestring

    Caption shown while zoomed in.

    Default"Up close, it’s code."

  • widestring

    Caption shown after pulling back.

    Default"From here, it’s your launch."

  • srcstring

    Image URL. Defaults to a repo-only file.

  • aspectnumber

    Aspect ratio of the image.

    Default1200 / 630

  • focus{ x: number; y: number }

    Point of interest as fractions of width and height, 0 to 1.

    Default{ x: 0.58, y: 0.52 }

  • zoomnumber

    Initial zoom factor on the focus point.

    Default3

  • readoutLabelstring

    Label above the zoom readout.

    Default"Zoom"

  • pullAtnumber

    Frame the shot pulls back from the close-up, at the default 125-frame length.

    Default44

  • accentstring

    Accent color for the zoom readout. Defaults depend on theme.

  • inkstring

    Text color; overrides the theme ink.

  • backgroundstring

    Solid background. Use 'transparent' to drop the ground.

  • fontFamilystring

    Typeface for the copy. Load the font in your project first.

    Default"Onest"

  • groundGshPresetId

    Shader preset id for the animated background.

  • groundParamsPartial<GradientParams>

    Partial shader parameters that override the ground preset.

  • scalenumber

    Size of the foreground around the frame's center; the background stays put.

    Default1

  • delaynumber

    Frames to hold the first frame before anything moves.

    Default0

  • speednumber

    Playback speed multiplier for the whole timeline.

    Default1

  • theme"dark" | "light"

    Color scheme. Ships light and dark.

    Default"dark"