1.0.0 • Published 8 years ago

vuelation-affix v1.0.0

Weekly downloads
42
License
MIT
Repository
github
Last release
8 years ago

Vuelation Affix

A Vue.js component for affixing an element in place while scrolling.

Installation

Install via npm:

$ npm install vuelation-affix --save

Add webpack config:

{
  module: {
    loaders: [{
      test:    /vuelation-.*/,
      loaders: ['vue']
    }]
  }
}

Usage

Register the Vue component:

Vue.component('affix', require('vuelation-affix'));

Use the component:

<div class="container">
  <affix>
    <div class="affixed-element">
      This element will be affixed in place when the window is
      scrolled to the top of the container.

      The element will be affixed to the bottom of the container
      when the window is scrolled past the bottom of the container.
    </div>
  </affix>
</div>