1.0.5 • Published 4 years ago
@ambroisebazie/ngx-animations v1.0.5
Ngx Animations
Some angular animations to save your development time
- Expand-collapse
- fade
- shake
- slide
- zoom
Demo

Installation
Use your favorite node package management
npm i --save @ambroisebazie/ngx-animations
OR
yarn add @ambroisebazie/ngx-animationsList of animations triggers defined
Expand Collapse triggers
expandCollapse
Fade animation triggers
fadeInfadeInTopfadeInBottomfadeInLeftfadeInRightfadeOutfadeOutTopfadeOutBottomfadeOutLeftfadeOutRightShake
shakeSlide
slideInTopslideInBottomslideInLeftslideInRightslideOutTopslideOutBottomslideOutLeftslideOutRightZoom
zoomInzoomOut
Usage
Inside app.component.ts
import {NgxAnimations} from '@ambroisebazie/ngx-animations';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss'],
animations: [NgxAnimations]
})
export class AppComponent implements OnInit {
showText = false;
constructor () {}
ngOnInit () {
// Example how to trigger animations
setTimeout(() => this.showText = true, 2000)
}
}Inside your html file app.component.html
<div *ngIf="showText" [@fadeIn]="showText">
Hello world
</div>