Skip to content

Production-ready animations, transitions, backgrounds, and scenes for Remotion

3.6 KB
Raw Blame
---
title: Hot Slab Morph
description: "A glowing blue slab morphs from a template panel into a prompt input card"
component: hot-slab-morph
vibe: tech
length: 24
useWhen:
  - "A beat that moves from choosing a template to describing a video in your own words."
  - "A launch demo where one UI panel should visibly become the next control, with a hot light bloom in between."
  - "You want a heated, glowing morph between two layouts instead of a cut."
avoidWhen:
  - "The two scenes share no panel to morph between — use `zoom-blur` for a general-purpose cut."
  - "You want a clean geometric reveal with no glow — use `ring-cut`."
  - "The cut should read as light, not a solid slab — use `bloom-ring`."
askedAs:
  - "glowing blue panel morphs into prompt box"
  - "template card becomes input"
  - "I want a glowing blue shape morphing from a template picker into a text box"
  - "go from choosing a template to describing your own video"
  - "one UI panel transforming into another in a launch demo"
  - "a luminous slab reshapes and becomes the prompt input card"
---

<ComponentPreview name="hot-slab-morph" />

<InstallBlock name="hot-slab-morph" />

## Usage

```tsx
// 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={126}
    fps={30}
    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.

<PropsTable title="Props"
  rows={[
    {
      name: "theme",
      type: "\"dark\" | \"light\"",
      default: "\"dark\"",
      description: "Light or dark palette for both scenes",
    },
    {
      name: "accent",
      type: "string",
      description: "Accent color; defaults to the theme accent",
    },
    {
      name: "lineA",
      type: "string",
      default: "\"Start from a template\"",
      description: "Headline above the template panel in scene A",
    },
    {
      name: "lineB",
      type: "string",
      default: "\"or just describe it\"",
      description: "Headline above the prompt card in scene B",
    },
    {
      name: "prompt",
      type: "string",
      default: "\"A 30-second launch film for our new editor\"",
      description: "Text typed into the prompt card",
    },
    {
      name: "ground",
      type: "GshPresetId",
      description: "Preset id for the scene A gradients.sh shader ground",
    },
    {
      name: "groundParams",
      type: "Partial<GradientParams>",
      description: "Overrides for the scene A shader parameters",
    },
    {
      name: "groundB",
      type: "GshPresetId",
      description: "Preset id for the scene B gradients.sh shader ground",
    },
    {
      name: "groundParamsB",
      type: "Partial<GradientParams>",
      description: "Overrides for the scene B shader parameters",
    },
    {
      name: "transition",
      type: "HotSlabMorphProps",
      description: "Overrides for the transition presentation props",
    },
  ]}
/>