Native Page Transitions
The Native Page Transitions plugin uses native hardware acceleration to animate your transitions between views. You have complete control over the type of transition, the duration, and direction.
https://github.com/Telerik-Verified-Plugins/NativePageTransitions
Stuck on a Cordova issue?
If you're building a serious project, you can't afford to spend hours troubleshooting. Ionic’s experts offer premium advisory services for both community plugins and premier plugins.
Installation
- Capacitor
- Cordova
- Enterprise
$ npm install com.telerik.plugins.nativepagetransitions
$ npm install @awesome-cordova-plugins/native-page-transitions
$ ionic cap sync
$ ionic cordova plugin add com.telerik.plugins.nativepagetransitions
$ npm install @awesome-cordova-plugins/native-page-transitions
Ionic Enterprise comes with fully supported and maintained plugins from the Ionic Team. Learn More or if you're interested in an enterprise version of this plugin Contact Us
Supported Platforms
- Android
- iOS
- Windows Phone 8
Usage
React
Learn more about using Ionic Native components in React
Angular
import { NativePageTransitions, NativeTransitionOptions } from '@awesome-cordova-plugins/native-page-transitions/ngx';
constructor(private nativePageTransitions: NativePageTransitions) { }
...
// example of adding a transition when a page/modal closes
ionViewWillLeave() {
let options: NativeTransitionOptions = {
direction: 'up',
duration: 500,
slowdownfactor: 3,
slidePixels: 20,
iosdelay: 100,
androiddelay: 150,
fixedPixelsTop: 0,
fixedPixelsBottom: 60
}
this.nativePageTransitions.slide(options)
.then(onSuccess)
.catch(onError);
}
// example of adding a transition when pushing a new page
openPage(page: any) {
this.nativePageTransitions.slide(options);
this.navCtrl.push(page);
}