Hot Slab Morph
A glowing blue panel morphs from a template picker into a prompt input card: a TransitionSeries presentation that morphs one rectangle into another between your own scenes. A free, MIT-licensed Remotion transition.
In Remotion, Hot Slab Morph is a glowing panel morph: a hot blue slab lights up over a panel in the outgoing scene, reshapes through a haze into the position of a panel in the next scene, and cools into it. It ships as HotSlabMorphDemo, a template picker that becomes a prompt input card, and as hotSlabMorph(), a TransitionSeries presentation you can put between your own two scenes.
$ pnpm dlx shadcn@latest add @remocn/hot-slab-morphHow to morph a glowing panel from one scene into the next in Remotion
You don't need a shared-element system, @remotion/paths or Framer Motion. Install the component:
npx shadcn@latest add @remocn/hot-slab-morphTo morph between panels in your own scenes, pass hotSlabMorph() to a TransitionSeries.Transition and tell it where the panel is in each scene. from and to are [left, top, width, height] as fractions of the frame:
import { TransitionSeries, linearTiming } from "@remotion/transitions";
import { hotSlabMorph } from "@/components/remocn/hot-slab-morph";
// 60 fps composition: 24 frames of motion at 30 fps = 48 here.
export const TemplateToPrompt = () => (
<TransitionSeries>
<TransitionSeries.Sequence durationInFrames={132}>
<MyTemplatePicker />
</TransitionSeries.Sequence>
<TransitionSeries.Transition
timing={linearTiming({ durationInFrames: 48 })}
presentation={hotSlabMorph({
from: [0.32, 0.4, 0.36, 0.42], // the template panel in scene A
to: [0.25, 0.44, 0.5, 0.2], // the prompt card in scene B
})}
/>
<TransitionSeries.Sequence durationInFrames={168}>
<MyPromptCard />
</TransitionSeries.Sequence>
</TransitionSeries>
);- The slab is blue by default:
hot#2f62ff,core#8fb0ff,deep#1235d6. Pass your own to recolor it. - Other options:
fromRadiusandtoRadius(corner radius as a share of the frame),haze(the haze band rectangle, ornullto drop it) andhazeStrength,floodandfloodBlend(the light wash over the frame),seed. - In
HotSlabMorphDemo,accentcolors the UI of the demo scenes, not the slab. To recolor the slab there, passtransition={{ hot, core, deep }}.
Good to know
- Length: 24 frames of motion at 30 fps (48 at 60 fps), the value for
linearTiming. TheHotSlabMorphDemoexample below is a 60 fps composition of both demo scenes, so itsdurationInFrames(252) covers 66 + 84 − 24 frames at 30 fps, doubled. see Frame rate. - Installs:
remotion,@remotion/transitions,@remotion/google-fontsfrom npm, plus the remocn helpersgsh,glide,frame-rate.gshis the gradients.sh shader ground of the demo scenes. - Font: the demo loads Hanken Grotesk through
@remotion/google-fonts. PassfontFamilyto use your own face.
Usage
// src/Root.tsx
import { Composition } from "remotion";
import { HotSlabMorphDemo } from "@/components/remocn/hot-slab-morph";
const HotSlabMorphDemoScene = () => (
<HotSlabMorphDemo
lineA="Start from a template"
lineB="or just describe it"
prompt="A 30-second launch film for our new editor"
/>
);
export const RemotionRoot = () => (
<Composition
id="HotSlabMorphDemo"
component={HotSlabMorphDemoScene}
durationInFrames={252}
fps={60}
width={1280}
height={720}
/>
);Scene A is a headline above a panel of template rows. The panel lights up as a hot slab, morphs with a haze into the position of the input card, and settles into scene B, a prompt box that types your request with a second headline above it. Pass lineA, lineB and prompt for the copy; it ships light and dark.
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 |
|---|---|---|
| theme | "dark" | "light""dark" Light or dark palette for both scenes | |
| accent | string— Accent color; defaults to the theme accent | |
| ink | string— Text color of both scenes; overrides the theme ink. | |
| background | string— Solid fill in place of both gradient grounds; pass "transparent" to drop it. | |
| fontFamily | string"Hanken Grotesk" Typeface for the copy. Load the font in your project first. | |
| lineA | string"Start from a template" Headline above the template panel in scene A | |
| lineB | string"or just describe it" Headline above the prompt card in scene B | |
| prompt | string"A 30-second launch film for our new editor" Text typed into the prompt card | |
| placeholder | string"Describe your launch film" Prompt box text before typing starts | |
| searchLabel | string"Search templates" Search field label at the top of the template panel | |
| ground | GshPresetId— Preset id for the scene A gradients.sh shader ground | |
| groundParams | Partial<GradientParams>— Overrides for the scene A shader parameters | |
| groundB | GshPresetId— Preset id for the scene B gradients.sh shader ground | |
| groundParamsB | Partial<GradientParams>— Overrides for the scene B shader parameters | |
| transition | HotSlabMorphProps— Overrides for the transition presentation props | |
| scale | number1 Size of both scenes' heading and panels around the frame's center; the grounds stay put. | |
| delay | number0 Frames to hold the first frame before anything moves. | |
| speed | number1 Playback speed multiplier for the whole timeline. | |
- theme"dark" | "light"
Light or dark palette for both scenes
Default
"dark" - accentstring
Accent color; defaults to the theme accent
- inkstring
Text color of both scenes; overrides the theme ink.
- backgroundstring
Solid fill in place of both gradient grounds; pass "transparent" to drop it.
- fontFamilystring
Typeface for the copy. Load the font in your project first.
Default
"Hanken Grotesk" - lineAstring
Headline above the template panel in scene A
Default
"Start from a template" - lineBstring
Headline above the prompt card in scene B
Default
"or just describe it" - promptstring
Text typed into the prompt card
Default
"A 30-second launch film for our new editor" - placeholderstring
Prompt box text before typing starts
Default
"Describe your launch film" - searchLabelstring
Search field label at the top of the template panel
Default
"Search templates" - groundGshPresetId
Preset id for the scene A gradients.sh shader ground
- groundParamsPartial<GradientParams>
Overrides for the scene A shader parameters
- groundBGshPresetId
Preset id for the scene B gradients.sh shader ground
- groundParamsBPartial<GradientParams>
Overrides for the scene B shader parameters
- transitionHotSlabMorphProps
Overrides for the transition presentation props
- scalenumber
Size of both scenes' heading and panels around the frame's center; the grounds stay 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