This project is not covered by Drupal’s security advisory policy.

This is a very simple module providing a wrapper for the Particles.js library :


Install Libraries API :

Download a Particles.js release on

Extract it to sites/all/libraries/particles.js. You must have a sites/all/libraries/particles.js/particles.js file.

Enable this module.

Check that the library is detected at /admin/reports/libraries/particles.js


Attach or load the library

The prefered way to load the library is to attach it to a render array:

$build['my_render_array']['#attached']['libraries_load'][] = array('particles.js');

You can load load it manually in a hook in a custom module, too:


Finally, for convenience you can load it on every page if you check the checkbox on admin/config/user-interface/particlesjs, but please remember it's bad practice.

Add the div for Particles.js

Somewhere in your template, add a div:

<div id="particles-js"></div>

Call it in your JS

Default settings:


To customize your particules, copy particles.js/demo/particles.json somewhere in your theme, customize it and call it:

particlesJS.load('particles-js', '/sites/all/themes/my_custom_theme/particles.json');

Project information

  • caution Minimally maintained
    Maintainers monitor issues, but fast responses are not guaranteed.
  • caution Maintenance fixes only
    Considered feature-complete by its maintainers.
  • Module categories: JavaScript Utilities
  • chart icon13 downloads
  • shield alertThis project is not covered by the security advisory policy.
    Use at your own risk! It may have publicly disclosed vulnerabilities.