3.3.2 • Published 3 years ago

ng-transitions v3.3.2

Weekly downloads
150
License
-
Repository
github
Last release
3 years ago

NgTransitions

Quickstart

npm i ng-transitions

Overview

The ngTransition is a directive that can help you with transitions about ngIf & ngFor with CSS animations in angular. make the life easier to add transitions when you add or remove element from DOM. this development was inspired by react-transition-group.

Demo

Animations

IMPORTANT the directive useing animation name that you need to add, you can use animate.css or any css animation.

Add directive to appication

import { NgTransitionsModule } from 'ng-transitions';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    NgTransitionsModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

List of items - transition is done when adding and removing items from list

this.options = {
  appendTo: 'app-root',
  enterAnimationName: 'fadeIn',
  leaveAnimationName: 'fadeOut',
  enterDuration: 1000,
  leaveDuration: 1000,
  enterAnimationDelay: 0,
  leaveAnimationDelay: 0
};

<div [NgTransition]="optionsItems"
     *ngFor="let item of items; let i = index;"
     [transitionIndex]="i"></div>

Single element - transition is done when adding and removing single element

this.options = {
  appendTo: 'app-root',
  enterAnimationName: 'fadeIn',
  leaveAnimationName: 'fadeOut',
  enterDuration: 1000,
  leaveDuration: 1000,
  enterAnimationDelay: 0,
  leaveAnimationDelay: 0
};

<div [NgTransition]="optionsItems"
     *ngFor="let item of items; let i = index;"
     [transitionIndex]="i"></div>

License

(The MIT License)

Copyright (c) 2018 Nadav Avisror

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

3.3.1

3 years ago

3.3.0

3 years ago

3.3.2

3 years ago

3.2.1-test.7

3 years ago

3.2.1-test.5

3 years ago

3.2.1-test.6

3 years ago

3.2.1-test.3

3 years ago

3.2.1-test.4

3 years ago

3.2.1-test.0

3 years ago

3.2.1-test.1

3 years ago

3.2.1-test.2

3 years ago

3.2.1

3 years ago

11.0.0

3 years ago

11.0.1

3 years ago

3.2.0

3 years ago

3.1.12

5 years ago

3.1.11

5 years ago

3.1.10

5 years ago

3.1.9

5 years ago

3.1.8

5 years ago

3.1.7

5 years ago

3.1.6

5 years ago

3.1.5

5 years ago

3.1.4

5 years ago

3.1.3

5 years ago

3.1.2

5 years ago

3.1.1

5 years ago

3.1.0

5 years ago

3.0.0

5 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago