slide div on click angular

Solutions on MaxInterview for slide div on click angular by the best coders in the world

showing results for - "slide div on click angular"
Marilyn
01 Jan 2020
1<div *ngIf="visible" [@slideInOut]>This element will slide up and down when the value of 'visible' changes from true to false and vice versa.</div>
2
Federico
09 Mar 2020
1import { trigger, transition, animate, style } from '@angular/animations'
2
3@Component({
4  ...
5  animations: [
6    trigger('slideInOut', [
7      transition(':enter', [
8        style({transform: 'translateY(-100%)'}),
9        animate('200ms ease-in', style({transform: 'translateY(0%)'}))
10      ]),
11      transition(':leave', [
12        animate('200ms ease-in', style({transform: 'translateY(-100%)'}))
13      ])
14    ])
15  ]
16})
17
similar questions
queries leading to this page
slide div on click angular