Search docs/
Getting StartedPlugins

Screen Orientation

Cordova plugin to set/lock the screen orientation in a common way.

Requires Cordova plugin: cordova-plugin-screen-orientation. For more info, please see the Screen Orientation plugin docs.

Premier Version Available

Featuring regular release cycles, security and bug fixes, and guaranteed SLAs.

Available here


ionic cordova plugin add cordova-plugin-screen-orientationnpm install @ionic-native/screen-orientationnpm install cordova-plugin-screen-orientationnpm install @ionic-native/screen-orientationionic cap sync
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


Using React?

See here.

import { ScreenOrientation } from '@ionic-native/screen-orientation/ngx';

constructor(private screenOrientation: ScreenOrientation) { }


// get current
console.log(this.screenOrientation.type); // logs the current orientation, example: 'landscape'

// set to landscape

// allow user rotate

// detect orientation changes
   () => {
       console.log("Orientation Changed");