The following answer is for ngb versionn 5.x.x
If you want to animate the [ngbCollapse] directive
use the code in your component's scss file and modify the following scss as per your requirement:
.collapse {
transition: transform .35s, opacity .35s, max-height .9s ease-out;
opacity: 0;
max-height: 0;
// transform: translateY(100%);
display: block !important;
&.show {
opacity: 1;
max-height: 600px;
// transform: translateY(0);
}
}
or if you are using CSS :
use the below-mentioned code:
.collapse {
transition: transform .35s, opacity .35s, max-height .9s ease-out;
opacity: 0;
max-height: 0;
// transform: translateY(100%);
display: block !important;
}
.collapse.show {
opacity: 1;
max-height: 600px;
// transform: translateY(0);
}