Pill Morph

A small logo pill grows into a product card, splits into three feature pills, then merges into an app tile. A free, MIT-licensed Remotion UI block.

Installation
$ pnpm dlx shadcn@latest add @remocn/pill-morph

Usage

tsx
// src/Root.tsx
import { Composition } from "remotion";
import { PillMorph } from "@/components/remocn/pill-morph";
 
const PillMorphScene = () => (
  <PillMorph
    name="Lumen"
    features={["Transitions", "Captions", "Backgrounds"]}
    src="/product-shot.jpg"
  />
);
 
export const RemotionRoot = () => (
  <Composition
    id="PillMorph"
    component={PillMorphScene}
    durationInFrames={480}
    fps={60}
    width={1280}
    height={720}
  />
);

A logo pill pops in and grows into a card showing a product clip, then collapses to a bar and splits into three feature pills before merging into an app tile with the name written below. Pass your own logo and name, the three features, and either a src image or children for the card. With no src or children it shows a built-in editor mock that uses a staticFile image from the Remocn repo. 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.

Props17

PropTypeDefault
name
string""

Product name shown in the pill and under the tile.

features
[string, string, string]—

Exactly three feature names for the split pills.

logo
React.ReactNode—

Brand mark node shown in the pill and the tile.

src
string—

Image shown inside the card. Replaces the built-in editor mock.

children
React.ReactNode—

Custom content shown inside the card. Takes priority over src.

caption
string"Launch day, in one take"

Caption over the preview in the built-in editor mock.

radius
number28

Corner radius of the open card, in pixels at 720p.

accent
string"#3B5BFD"

Accent color used inside the built-in editor.

speed
number1

Playback speed multiplier for the whole timeline.

theme
"dark" | "light""dark"

Color scheme. Ships light and dark.

ground
GshPresetId—

Shader preset id for the animated background.

groundParams
Partial<GradientParams>—

Partial shader parameters that override the ground preset.

background
string—

Solid fill in place of the gradient ground; pass "transparent" to drop it.

ink
string—

Text color; overrides the theme ink.

fontFamily
string"Figtree"

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

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.

  • namestring

    Product name shown in the pill and under the tile.

    Default""

  • features[string, string, string]

    Exactly three feature names for the split pills.

  • logoReact.ReactNode

    Brand mark node shown in the pill and the tile.

  • srcstring

    Image shown inside the card. Replaces the built-in editor mock.

  • childrenReact.ReactNode

    Custom content shown inside the card. Takes priority over src.

  • captionstring

    Caption over the preview in the built-in editor mock.

    Default"Launch day, in one take"

  • radiusnumber

    Corner radius of the open card, in pixels at 720p.

    Default28

  • accentstring

    Accent color used inside the built-in editor.

    Default"#3B5BFD"

  • speednumber

    Playback speed multiplier for the whole timeline.

    Default1

  • theme"dark" | "light"

    Color scheme. Ships light and dark.

    Default"dark"

  • groundGshPresetId

    Shader preset id for the animated background.

  • groundParamsPartial<GradientParams>

    Partial shader parameters that override the ground preset.

  • backgroundstring

    Solid fill in place of the gradient ground; pass "transparent" to drop it.

  • inkstring

    Text color; overrides the theme ink.

  • fontFamilystring

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

    Default"Figtree"

  • 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