graphics

Confetti

A celebratory confetti burst — pieces launch from an origin, fan outward, arc under gravity, tumble, and fade. Every per-piece value is seeded, so the same seed renders identically every time. Full-canvas layer; energetic but tasteful.

$ npx ondajs add confetti

Confetti

A celebratory confetti burst — pieces launch from an origin, fan outward, arc under gravity, tumble (rotation), and fade out. Every per-piece value (angle, velocity, spin, color, size) comes from a seeded PRNG keyed off the seed prop, and all motion is a pure function of the frame, so the same seed renders identically every time (§1). The default palette is the Onda accent plus tasteful neutrals. This is a full-canvas effect layer — no placement; the burst origin is set with originX/originY (0..1 fractions). Drop it over your scene with <AbsoluteFill>.

Props

PropTypeDefaultNotes
seednumber7Seed for all per-piece randomness (deterministic).
countnumber80Number of confetti pieces.
colorsstring[]accent + neutralsPalette pieces are picked from.
originXnumber0.5Burst origin X, fraction of canvas width.
originYnumber0.35Burst origin Y, fraction of canvas height.
delaynumber0Frames before the burst launches.
durationnumber70Frames a piece travels, tumbles and fades.
spreadnumber120Launch spread in degrees around straight up.
gravitynumber1Downward acceleration multiplier.
pieceSizenumber12Base piece size in pixels.

Usage

TSX
import { AbsoluteFill, Sequence } from 'remotion';
import { Confetti } from './components/onda/confetti/Confetti';

export const Scene = () => (
  <AbsoluteFill style={{ backgroundColor: '#08080A' }}>
    {/* your celebratory content */}
    <Sequence from={24}>
      <Confetti />
    </Sequence>
  </AbsoluteFill>
);