A Vue.js library to Get easy and reactive access to the width and height of your screen.
How to use it:
1. Import the vue-screen-size after you install the package.
import VueScreenSize from 'vue-screen-size'
2. Register the component.
Vue.use(VueScreenSize); // or export default { ... mixins: [VueScreenSize.VueScreenSizeMixin], ... }
3. Get the screen size using the following variables.
- $vssWidth: The width of your screen
- $vssHeight: The height of your screen
- $vssEvent: The event object data from the resizing event
Preview:
Changelog:
v2.1.0 (03/18/2023)
- Upgrade to Vue 3
Download Details:
Author: johndatserakis
Live Demo: https://johndatserakis.github.io/vue-screen-size/
Download Link: https://github.com/johndatserakis/vue-screen-size/archive/master.zip
Official Website: https://github.com/johndatserakis/vue-screen-size
Install & Download:
# Yarn
$ yarn add vue-screen-size
# NPM
$ npm install vue-screen-size --save