screenOrientation

Readable Screen Orientation API. It provides web developers with information about the user's current screen orientation.

Demo

For best results, please use a mobile or tablet device (or use your browser's native inspector to simulate an orientation change)
isSupported: false
Orientation Type: portrait-primary
Orientation Angle: 0

Usage

<script lang="ts">
import { screenOrientation } from "svelte-legos";

const data = screenOrientation();
$: ({ isSupported, orientation, angle } = $data);
</script>