https://github.com/bradleftley/ember-scroll-spy
Scroll spy for Ember.js
https://github.com/bradleftley/ember-scroll-spy
ember ember-scroll-spy viewport
Last synced: 7 months ago
JSON representation
Scroll spy for Ember.js
- Host: GitHub
- URL: https://github.com/bradleftley/ember-scroll-spy
- Owner: BradLeftley
- License: mit
- Created: 2020-04-21T21:25:01.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-12T17:45:41.000Z (almost 3 years ago)
- Last Synced: 2025-04-19T06:52:11.019Z (7 months ago)
- Topics: ember, ember-scroll-spy, viewport
- Language: JavaScript
- Homepage:
- Size: 4.57 MB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 23
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
ember-scroll-spy
==============================================================================
Ember scroll spy allows you to easily replicate bootstrap's scroll spy functionality. Based on the anchor being in the viewport the scroll-container with the corresponding Id will be updated with an active class.
Simply pass through the the id to each component and the addon does the rest.
Compatibility
------------------------------------------------------------------------------
* Ember.js v3.16 or above
* Ember CLI v2.13 or above
* Node.js v10 or above
Installation
------------------------------------------------------------------------------
```
ember install ember-scroll-spy
```
Usage
------------------------------------------------------------------------------
In this current version `0.0.6` you have two components an `scroll-container` and an `anchor`.
```
```
The id `about` will now be tracked and if it is found in the viewport the corresponding `scroll-container` with the same `id` it will be given an active class in which you can style from.
```
Some content
```
Simply embed the `anchor` into your section, divs or any template and begin adding scroll spy to your apps.
Contributing
------------------------------------------------------------------------------
See the [Contributing](CONTRIBUTING.md) guide for details.
License
------------------------------------------------------------------------------
This project is licensed under the [MIT License](LICENSE.md).