Skip to content

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

3.0 KB
Raw Blame
---
title: Icon Scatter
description: Scatter a field of icons over the cut, hiding the scene swap at the field's peak
component: icon-scatter
vibe: playful
length: 40
useWhen:
  - "Playful product or app transitions where icons are part of the brand's visual language."
  - "A feature-to-feature cut wants a moment of energy before settling into the next scene."
  - "The cover fill can be tuned to match the outgoing scene's background so the swap hides cleanly."
avoidWhen:
  - "The piece is minimal or serious — use `fade-through` for a quieter cut instead."
  - "The brand has no icon system to draw from — a generic icon field would look unrelated to the product."
askedAs:
  - "icons fly over the cut"
  - "emoji style icon burst scene change"
  - "I want a swarm of icons covering the screen while the scene swaps"
  - "playful app transition where icons are the visual language"
  - "feature to feature cut hidden by flying symbols"
  - "field of icons peaks and the next screen is underneath"
---

<ComponentPreview name="icon-scatter" />

<InstallBlock name="icon-scatter" />

## Usage

`iconScatter()` is a Remotion transition presentation. Pass it to a
`TransitionSeries.Transition` between two sequences. A field of line icons flies
in and fills the frame, a cover fill hides the swap at the field's peak, then
the icons scatter away to reveal the incoming scene.

```tsx
import { TransitionSeries, linearTiming } from "@remotion/transitions";
import { iconScatter } from "@/components/remocn/icon-scatter";

export const MyVideo = () => (
  <TransitionSeries>
    <TransitionSeries.Sequence durationInFrames={70}>
      <SceneA />
    </TransitionSeries.Sequence>
    <TransitionSeries.Transition
      timing={linearTiming({ durationInFrames: 40 })}
      presentation={iconScatter({ count: 15 })}
    />
    <TransitionSeries.Sequence durationInFrames={70}>
      <SceneB />
    </TransitionSeries.Sequence>
  </TransitionSeries>
);
```

## Props

`iconScatter(props)` accepts:

<PropsTable
  rows={[
    {
      name: "count",
      type: "number",
      default: "15",
      description: "How many icons populate the field.",
    },
    {
      name: "color",
      type: "string",
      default: '"#fafafa"',
      description: "Icon stroke color.",
    },
    {
      name: "coverColor",
      type: "string",
      default: '"#0a0a0a"',
      description: "The fill that hides the swap at the field's peak.",
    },
    {
      name: "coverOpacity",
      type: "number",
      default: "0.92",
      description: "Peak opacity of the cover fill (0–1). Lower shows more of the swap.",
    },
    {
      name: "strokeWidth",
      type: "number",
      default: "2",
      description: "Stroke width of the icons, in their 24px viewBox units.",
    },
    {
      name: "flyDistance",
      type: "number",
      default: "260",
      description: "How far icons fly on scatter, in pixels.",
    },
    {
      name: "seed",
      type: "string",
      default: '"icon-scatter"',
      description: "Seed so two scatters in one video can differ.",
    },
  ]}
/>