Migrate from v1.x
Migrating from v1.x to current usually requires a full dependency refresh and config verification.
The biggest practical blockers are:
- Old package/import patterns.
tsParticles.load(...)call shape.- Option key updates in modern schemas.
Load API migration
Modern load accepts one params object:
Before (legacy positional style):
ts
await tsParticles.load("tsparticles", oldOptions);After:
ts
await tsParticles.load({
id: "tsparticles",
options: oldOptions,
});If you load from JSON:
ts
await tsParticles.load({
id: "tsparticles",
url: "/particles.json",
});Options migration highlights
Start by searching these keys in your configs:
particles.color->particles.paint.fillparticles.stroke->particles.paint.stroke
Example rewrite:
ts
// before
particles: {
color: { value: ["#ff6b6b", "#4ecdc4"] },
stroke: { width: 0 }
}
// after
particles: {
paint: {
fill: { value: ["#ff6b6b", "#4ecdc4"] },
stroke: { width: 0 }
}
}Recommended steps
- Replace old package names with the current
@tsparticles/*packages. - Start from
@tsparticles/engine+@tsparticles/slim, then add required plugins. - Convert old
loadcalls to the object-basedload({ ... })signature. - Validate option keys against current docs and fix renamed/removed fields.
- Run visual and performance checks in desktop and mobile targets.
Checklist
- Remove obsolete imports from older package structure.
- Confirm interactions, links, and custom shapes still behave as expected.
- For legacy
particles.jsstyle configs, consider the compatibility layer.
Useful option docs
- Option rename matrix:
/guide/option-rename-matrix particles.paint:/options/particles-paintparticles.colormigration note:/options/particles-colorparticles.strokemigration note:/options/particles-stroke
References
- Legacy compatibility and particles.js bridge:
/migration/ - Installation matrix:
/guide/installation - Root repository releases: https://github.com/tsparticles/tsparticles/releases
