Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bekzod/ember-active-scroll-list
Ember Addon
https://github.com/bekzod/ember-active-scroll-list
ember ember-addon
Last synced: 8 days ago
JSON representation
Ember Addon
- Host: GitHub
- URL: https://github.com/bekzod/ember-active-scroll-list
- Owner: bekzod
- License: mit
- Created: 2015-12-23T17:01:28.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-04T11:15:34.000Z (over 7 years ago)
- Last Synced: 2024-10-14T00:29:58.137Z (23 days ago)
- Topics: ember, ember-addon
- Language: JavaScript
- Homepage:
- Size: 17.6 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# ember-active-scroll-list
Ember Addon helps to keep active item of list visible in viewport### [DEMO](http://ember-active-scroll-list.surge.sh)
## Usage
```hbs
{{#active-scroll-list tolerance=0 scrollTimeout=2000 activeIndex=activeIndex class='list'}}
{{#each items as |item index|}}
{{item}}
{{/each}}
{{/active-scroll-list}}
```
can be also be extended as mixin
```javascript
import Ember from 'ember';
import ActiveScrollListMixin from 'ember-active-scroll-list';export default Ember.Component.extend(ActiveScrollListMixin, {
...
});
```## Options
* `activeIndex`
Index of element which needs to be visible on the list* `tolerance`
How much `top` and `bottom` edges should be offset when determining overflow* `scrollTimeout`
Timeout for when autoscroll is activated## Installation
You can install either with `ember install`:```shell
ember install ember-active-scroll-list
```