Hey folks! It’s been a while since I wrote a piece here. I’ve been very busy with a premium WordPress Framework which I am building from the ground up for about last ten months (which will probably never see the light of the day). While building it, I had to build an impressive hero block or unit whatever you call it nowadays.
Hero Units#
So, if you don’t already know what is a hero unitΒ then here is a simple definition:
Normally the top most block of a website containing a heading with some description and one or two call to action buttons is what we call a hero unit. I believe this term was coined by people behind the Bootstrap project, but I may be wrong.
So, I’m about to complete the framework I was working over for so long and nowadays most my time is being spent at the front-end. I was designing a few if not many hero units for a premium WordPress theme when it hit me that I should create something creative with infinite user interaction. Yes! A hero unit which actually makes you stop doing everything and take a look at it while you interact and get engaged.
Particles.js saved the day. A lightweight JavaScript library for creating particles. All you need to build a particles.js based hero unit is
- A
div
Β element.
- Few lines of CSS code.
- And obviously the
particles.js
library.
I went ahead and built a demo of what I am working on, at CodePen. Hope so you guys will like it
Val
Is there a way you can quickly explain or provide me with a resource of how to implement this js library into WordPress?
Thanks!
AhmadAwais
All you have to do is enqueue the js file in WordPress and use it.
George
Is there any tutorial to showcase how to? Especially for rookies like us? :D thanks
Ahmad Awais
This is a tutorial :) Just shift the tabs inside that Codepen editor to read HTML/CSS/JS.
Aroosa
This is extremely awesome .
Tommy
Hi,
Doesn’t seem to work anymore. Tried changing the source to http://www.jsdelivr.com/#!particles.js but still didn’t see anything other than the header text.
Ahmad Awais
It needs an update. Looks like CodePen.io updated something at their end. Will look into it. Thanks for reporting!
No3x
I recently wrote a comment but just found the solution for the problem. (Updated github issue) You can delete both comments please. Thank you very much.
mattias
Hi my particles only show when clicked. how can i fix this?
thanks