A lightweight particle backgrounds plugin for Angular
# npm install ngx-particlesjs --save
used on templates
<ngx-particle [total]="total" [default_height]="300" [default_width]="300" [args]="args"></ngx-particle>
Defining components
export class AppComponent {
total = 150;
args = {
speed: 'fast',
size: 1.2
}
}
-
total
particle number, default150
-
default_width
default stage width -
default_height
default stage height -
args
(not necessary)-
speed
particle motion speed, defaultnormal
, you can setfast
normal
slow
, can also be customized[2,2]
, the higher the value, the slower the motion -
size
particle size
-