+
+ For best results, please use a mobile or tablet device (or use your browser's native inspector to simulate an
+ orienatation change)
+
+
+ isSupported:
+ {{ isSupported }}
+
+
+ Orientation Type: {{ orientation }}
+ Orientation Angle: {{ angle }}
+
diff --git a/packages/core/useScreenOrientation/index.md b/packages/core/useScreenOrientation/index.md
new file mode 100644
index 00000000000..8339489a87e
--- /dev/null
+++ b/packages/core/useScreenOrientation/index.md
@@ -0,0 +1,47 @@
+---
+category: Browser
+---
+
+# useScreenOrientation
+
+Reactive [Screen Orientation API](https://developer.mozilla.org/en-US/docs/Web/API/Screen_Orientation_API). It provides web developers with information about the user's current screen orientation.
+
+## Usage
+
+```ts
+import { useScreenOrientation } from '.'
+
+const {
+ isSupported,
+ orientation,
+ angle,
+ lockOrientation,
+ unlockOrientation,
+} = useScreenOrientation()
+```
+
+To lock the orientation, you can pass an [OrientationLockType](https://developer.mozilla.org/en-US/docs/Web/API/ScreenOrientation/type) to the lockOrientation function:
+
+```ts
+import { useScreenOrientation } from '.'
+
+const {
+ isSupported,
+ orientation,
+ angle,
+ lockOrientation,
+ unlockOrientation,
+} = useScreenOrientation()
+
+lockOrientation('primary-portrait')
+```
+
+and then unlock again, with the following:
+
+```ts
+unlockOrientation()
+```
+
+Accepted orientation types are one of `"landscape-primary"`, `"landscape-secondary"`, `"portrait-primary"`, `"portrait-secondary"`, `"any"`, `"landscape"`, `"natural"` and `"portrait"`.
+
+[Screen Orientation API MDN](https://developer.mozilla.org/en-US/docs/Web/API/Screen_Orientation_API)
diff --git a/packages/core/useScreenOrientation/index.test.ts b/packages/core/useScreenOrientation/index.test.ts
new file mode 100644
index 00000000000..320a462c491
--- /dev/null
+++ b/packages/core/useScreenOrientation/index.test.ts
@@ -0,0 +1,7 @@
+import { useScreenOrientation } from '.'
+
+describe('useScreenOrientation', () => {
+ it('should be defined', () => {
+ expect(useScreenOrientation).toBeDefined()
+ })
+})
diff --git a/packages/core/useScreenOrientation/index.ts b/packages/core/useScreenOrientation/index.ts
new file mode 100644
index 00000000000..ecb4d583745
--- /dev/null
+++ b/packages/core/useScreenOrientation/index.ts
@@ -0,0 +1,52 @@
+import { ref } from 'vue-demi'
+import { useEventListener } from '../useEventListener'
+import type { ConfigurableWindow } from '../_configurable'
+import { defaultWindow } from '../_configurable'
+
+/**
+ *
+ * Reactive screen orientation
+ *
+ * @see https://vueuse.org/useScreenOrientation
+ */
+export const useScreenOrientation = (options: ConfigurableWindow = {}) => {
+ const {
+ window = defaultWindow,
+ } = options
+
+ const isSupported = !!(window && 'screen' in window && 'orientation' in window.screen)
+
+ const screenOrientation = isSupported ? window.screen.orientation : {} as ScreenOrientation
+
+ const orientation = ref