title | description |
---|---|
Window Size |
Reactive window size. |
Reactive window size.
<script>
import { windowSize } from "@sveu/browser"
const { width, height } = windowSize()
</script>
<script>
import { windowSize } from "@sveu/browser"
const { width, height } = windowSize()
</script>
<p class="text-center">{$width} x {$height}</p>
Name | Description | Type |
---|---|---|
initialWidth | The initial width of the window. | number |
initialHeight | The initial height of the window. | number |
orientation | Whether to use the orientationchange. | boolean |
scrollbar | Whether the scrollbar should be included in the width and height. | boolean |
Name | Description | Type |
---|---|---|
width | A readable store with the window width. | Readable<number > |
height | A readable store with the window height. | Readable<number > |