Skip to content

Random Utils

Wrappers around Remotion’s seeded random function for common use cases.

Returns a floating-point number between min and max.

const opacity = randomFloat(index, 0.5, 1);

Returns an integer between min and max (inclusive).

const count = randomInt(index, 1, 10);

Returns a random element from an array.

const color = anyElement(index, ["red", "blue", "green"]);