@tsparticles/ribbons
v4.1.3
Published
Easily create ready to use animated ribbons effects.
Readme
tsParticles Ribbons Bundle
tsParticles ribbons bundle to create animated ribbons effects with a single API.
Demo website: https://ribbons.js.org
Exposed API
The package API is centered on ribbons.
import { ribbons } from "@tsparticles/ribbons";
await ribbons(options);
await ribbons("canvas-id", options);
await ribbons.init();
const fireOnCanvas = await ribbons.create(canvas, defaultOptions);
await fireOnCanvas(options);
console.log(ribbons.version);Installation
pnpm add @tsparticles/ribbonsHow to use it
import { ribbons } from "@tsparticles/ribbons";
await ribbons({
count: 5,
position: { x: 50, y: 0 },
});With advanced ribbon shape customization:
import { ribbons } from "@tsparticles/ribbons";
await ribbons({
ribbonOptions: {
count: 70,
oscillationDistance: {
min: 120,
max: 170,
},
},
});Options
Main options:
countInteger (default: 5)ticksNumber (default: 200)positionObject (x/y, default 50/0)colorsArray<String>ribbonOptionsObject (particles.shape.options.ribbon)- Includes
darken: { enable: true, value: 30 }by default
- Includes
scalarNumber (default: 1)zIndexInteger (default: 100)disableForReducedMotionBoolean (default: true)
The ribbons bundle disables roll, rotate, tilt, and wobble on ribbon particles by default for better shape stability.
The emitter uses a full-width top strip (width: 100, height: 0) and downward movement speed range (4..6) for a falling-from-top behavior.
Deprecated aliases still accepted:
particleCount(usecount)origin(useposition)

