• Stars
    star
    327
  • Rank 128,686 (Top 3 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 8 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Vue directive to detect resize events with deboucing and throttling capacity.

Vue.resize

GitHub open issues GitHub closed issues Npm download Npm version vue2 MIT License

Vue directive to detect HTML resize events based on CSS Element Queries with debouncing and throttling capacity.

Demo

demo gif

Typical usage

Simple

Use this option when you need to receive all the resize events.

The onResize function will be called each time the element resizes with the corresponding HTML element as only argument.

<div v-resize="onResize">

Throttle

Use throttle when you need to rate-limit resize events frequency.

  • With default timeout (150 ms):
<div v-resize:throttle="onResize">
  • With custom timeout (in ms):
<div v-resize:throttle.100="onResize">

Debounce

Use debounce when you only need to be notified when resize events ends.

  • With default timeout (150 ms):
<div v-resize:debounce="onResize">
  • With custom timeout (in ms):
<div v-resize:debounce.50="onResize">

Initial

Use this option to receive the resize callback right after the element is mounted on the DOM and visible.

<div v-resize.initial="onResize">

Installation

  • Available through npm:
 npm install vue-resize-directive --save
  • For Modules
// ES6
import resize from 'vue-resize-directive'
//...
export default {
    directives: {
        resize,
    }
//...
  
// ES5
var resize = require('vue-resize-directive')
  • For <script> Include

    Just include Vueresize.js after ResizeSensor.js from css-element-queries and lodash.js script.

More Repositories

1

Vue.D3.tree

Vue component to display tree based on D3.js layout.
Vue
868
star
2

draggable-example

vue.draggable example
Vue
510
star
3

Vue.Isotope

📱 Vue component for isotope filter & sort magical layouts
JavaScript
345
star
4

RateLimiter

C# rate limiting utility
C#
278
star
5

vue-plotly

📈 vue wrapper for plotly.js
JavaScript
254
star
6

Vue.ImagesLoaded

Vue.js 2.0 directive to detect images loading
JavaScript
144
star
7

vue-cli-plugin-component

🛠️ vue-cli 3 plugin to create component
JavaScript
88
star
8

Vue.D3.sunburst

Vue sunburst component based on D3.js
Vue
62
star
9

ComponentFixture

🛠️Interactive sandox playground for vue components
Vue
51
star
10

Vue-Semantic-Modal

Vue modal component for Semantic-Ui no jquery
JavaScript
45
star
11

DiscogsClient

Discogs API C# Client
C#
41
star
12

CodeDependencyScanner

.Net assembly code depency inspector
JavaScript
37
star
13

ComposableAsync

Create, compose and inject asynchronous behaviors in .Net Framework and .Net Core.
C#
31
star
14

MVVM-for-awesomium

MVVM binding framework between C# ViewModel and awesomium HTLM-javascript view
C#
16
star
15

RestSharpHelper

Small library helper for RestSharp inclusing rate limit, OAuth, helper for async download among others
C#
7
star
16

Music.Cover.Finder

C# application that display music cover art
C#
7
star
17

MusicCollection

Music Library and Player
C#
6
star
18

Retlang

C#
5
star
19

vue-ajax-handler

Ultra minimal generic vue component to deal with ajax loading
JavaScript
2
star
20

datascience_detroit_bligth

Predicting Detroit Blight using Machine Learning
Jupyter Notebook
2
star
21

David-Desmaisons

1
star
22

tape-tests

Minimal repository to show problem with esm modules and windows
JavaScript
1
star
23

ScreenSaver

JavaScript
1
star
24

MovieExplorer

C#
1
star
25

ProxyDebugLogger

Create proxy that logs method call. For debug purpose.
JavaScript
1
star
26

MoreCollection

C# collection framework
C#
1
star