Skip to content

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

2.7 KB
Raw Blame
---
title: Absorb Stack
description: "A centred stack of small lines, ending in a red \"on top.\", on a dark brown ground"
component: absorb-stack
vibe: premium
length: 60
useWhen:
  - "A short poetic statement set as a centered stack of lines in a brand film."
  - "A closing slogan where the final line should carry the brand color."
  - "A quiet text beat between two louder scenes."
avoidWhen:
  - "You need one big loud headline rather than a stack — use `full-bleed-type`."
  - "The lines should reveal one at a time with a delay — use `line-by-line-slide`."
  - "You want the stack to dim line by line toward one highlighted claim — use `what-sticks`."
askedAs:
  - "centered lines with red last line"
  - "poetic slogan stack on dark brown"
  - "I want a short statement stacked in the middle with the final line in red"
  - "brand film closing slogan with a final emphasised line"
  - "quiet minimal lines that settle on a red on top"
  - "viewer reads a few small lines and the last one lands with force"
---

<ComponentPreview name="absorb-stack" />

<InstallBlock name="absorb-stack" />

## Usage

```tsx
// src/Root.tsx
import { Composition } from "remotion";
import { AbsorbStack } from "@/components/remocn/absorb-stack";

const AbsorbStackScene = () => <AbsorbStack lines={["made to", "sink into", "your cut,", "not sit", "on top."]} accentLine={4} />;

export const RemotionRoot = () => (
  <Composition
    id="AbsorbStack"
    component={AbsorbStackScene}
    durationInFrames={120}
    fps={30}
    width={1280}
    height={720}
  />
);
```

A stack of small lowercase lines fades in from the center outward, spread wide, then eases together into a tight block, with the last line in the accent color. Pass `lines` (one string per line) and optionally `accentLine` for which line gets the accent.

<PropsTable title="Props"
  rows={[
    {
      name: "lines",
      type: "string[]",
      description: "Lines of text, centered and set in lowercase.",
    },
    {
      name: "accentLine",
      type: "number",
      description: "Index of the line set in the accent color; defaults to the last.",
    },
    {
      name: "accent",
      type: "string",
      description: "Color of the accented line; defaults to the theme accent.",
    },
    {
      name: "background",
      type: "string",
      description: "Stage fill color; pass \"transparent\" to overlay your own footage.",
    },
    {
      name: "speed",
      type: "number",
      default: "1",
      description: "Playback multiplier for the whole timeline.",
    },
    {
      name: "theme",
      type: "\"dark\" | \"light\"",
      default: "\"dark\"",
      description: "Color scheme; ships dark and light.",
    },
  ]}
/>