@mahdikhashan/use-window-resize

0.1.1 • Public • Published

use-window-resize

npm (tag) npm bundle size npm npm peer dependency version GitHub commit activity NPM

Custom hook for Vue 3 to get page height and width


Demo

Demo

Installation

npm install --save @mahdikhashan/use-window-resize

How to use

add the custom directive to you component

<template>
  <div class="main">
    Page width {{ width }} and height {{ height }}
  </div>
</template>

<script setup>
import { useWindowResize } from '@mahdikhashan/use-window-resize'

const { width, height } = useWindowResize(1)

</script>

Contributing

If you want to contribute to this project simply fork it and clone it then run npm i in the root of the project, then run npm run start to run development server.

Licence and cast

MIT Licence

by Mahdi Khashan

Package Sidebar

Install

npm i @mahdikhashan/use-window-resize

Weekly Downloads

0

Version

0.1.1

License

MIT

Unpacked Size

4.67 kB

Total Files

6

Last publish

Collaborators

  • mahdikhashan