All Projects → thisissoon → angular-scrollspy

thisissoon / angular-scrollspy

Licence: MIT license
A simple lightweight library for Angular which automatically updates links to indicate the currently active section in the viewport

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to angular-scrollspy

angular-inviewport
A simple lightweight library for Angular with no other dependencies that detects when an element is within the browser viewport and adds a "sn-viewport-in" or "sn-viewport-out" class to the element
Stars: ✭ 72 (+111.76%)
Mutual labels:  scrolling, directive, ngx, ngx-library
angular-ellipsis
A simple lightweight library for Angular which removes excess text and add ellipsis symbol to end of text before text overflows container
Stars: ✭ 16 (-52.94%)
Mutual labels:  directive, ngx, ngx-library
bsnav
An extended Bootstrap 4 menu with a bunch of utilities
Stars: ✭ 90 (+164.71%)
Mutual labels:  navigation, navbar, navigationbar
Bubble Navigation
🎉 [Android Library] A light-weight library to easily make beautiful Navigation Bar with ton of 🎨 customization option.
Stars: ✭ 1,537 (+4420.59%)
Mutual labels:  navigation, navbar, navigationbar
Tlyshynavbar
Unlike all those arrogant UINavigationBar, this one is shy and humble! Easily create auto-scrolling navigation bars!
Stars: ✭ 3,780 (+11017.65%)
Mutual labels:  navigation, scrolling, navigationbar
Customnavigationbarsample
Navigation Bar Customization in Xamarin Forms
Stars: ✭ 104 (+205.88%)
Mutual labels:  navigation, navigationbar
React Site Nav
A kick ass site menu powered by styled components inspired by Stripe.
Stars: ✭ 155 (+355.88%)
Mutual labels:  navigation, navigationbar
Priority Nav Scroller
Priority Nav Scroller is a plugin for the priority+ navigation pattern.
Stars: ✭ 198 (+482.35%)
Mutual labels:  navigation, scrolling
Vhlnavigation
导航栏切换之颜色过渡切换,导航栏背景图片切换,微信红包两种不同颜色切换,导航栏透明度,有无导航栏切换
Stars: ✭ 210 (+517.65%)
Mutual labels:  navigation, navigationbar
Tiptoes
Simple navigation bar in the bottom, a beautiful discretion in your UI.
Stars: ✭ 221 (+550%)
Mutual labels:  navigation, navigationbar
Zxnavigationbar
灵活轻量的自定义导航栏,导航栏属于控制器view,支持导航栏联动,一行代码实现【导航栏背景图片设置、导航栏渐变、折叠、修改Item大小和边距、自定义导航栏高度、全屏手势返回、pop拦截、仿系统导航栏历史堆栈】等各种效果
Stars: ✭ 230 (+576.47%)
Mutual labels:  navigation, navigationbar
Immersionbar
android 4.4以上沉浸式状态栏和沉浸式导航栏管理,适配横竖屏切换、刘海屏、软键盘弹出等问题,可以修改状态栏字体颜色和导航栏图标颜色,以及不可修改字体颜色手机的适配,适用于Activity、Fragment、DialogFragment、Dialog,PopupWindow,一句代码轻松实现,以及对bar的其他设置,详见README。简书请参考:http://www.jianshu.com/p/2a884e211a62
Stars: ✭ 10,030 (+29400%)
Mutual labels:  navigation, navigationbar
Efnavigationbar
An ordinary custom navigation bar.
Stars: ✭ 92 (+170.59%)
Mutual labels:  navigation, navigationbar
Animatedbottombar
A customizable and easy to use BottomBar navigation view with sleek animations, with support for ViewPager, ViewPager2, NavController, and badges.
Stars: ✭ 797 (+2244.12%)
Mutual labels:  navigation, navigationbar
angular-masonry
A simple lightweight library to use Masonry layout in Angular
Stars: ✭ 11 (-67.65%)
Mutual labels:  ngx, ngx-library
resizing-header-on-scroll
When you scroll down the page a bit, the header resizes smaller with CSS3 animations, and gets back bigger when you scroll back to the top
Stars: ✭ 19 (-44.12%)
Mutual labels:  scrolling, navbar
Ypnavigationbartransition
A Full functional UINavigationBar framework for making bar transition more natural! You don't need to call any UINavigationBar api, implementing YPNavigationBarConfigureStyle protocol for your view controller instead. (类似微信 iOS Navigation Bar 的切换方案)
Stars: ✭ 725 (+2032.35%)
Mutual labels:  navigation, navigationbar
LLNavigationController
This is a subClass Of UINavigationController.本导航条继承UINavigationController,自定义滑动返回手势与滑动动画,同时可自定义过场动画,解决了手势共存时的冲突。在系统类的基础上进行扩展,节约性能,无任何代码耦合度,可随时集成与剥离。支持iOS7以上系统,兼容iOS11,版本稳定。
Stars: ✭ 20 (-41.18%)
Mutual labels:  navbar, navigationbar
Gknavigationbarviewcontroller
iOS自定义导航栏-导航栏联动
Stars: ✭ 637 (+1773.53%)
Mutual labels:  navigation, navigationbar
Gumshoe
A simple vanilla JS scrollspy script.
Stars: ✭ 640 (+1782.35%)
Mutual labels:  navigation, scrolling

Angular ScrollSpy

Build Status Coverage Status Commitizen friendly code style: prettier

A simple lightweight library for Angular which automatically updates links to indicate the currently active section in the viewport. Requires Angular Inviewport to be installed as well.

This is a simple library for Angular, implemented in the Angular Package Format v5.0.

Install

npm i @thisissoon/{angular-scrollspy,angular-inviewport} --save

app.module.ts

import { InViewportModule } from '@thisissoon/angular-inviewport';
import { ScrollSpyModule } from '@thisissoon/angular-scrollspy';

@NgModule({
  imports: [InViewportModule, ScrollSpyModule.forRoot()],
})
export class AppModule {}

Example

A working example can be found in the src folder.

app.component.html

<ul role="navigation" snScrollSpy id="foo">
  <li><a snScrollSpyItem for="foo" href="#section1">Section 1</a></li>
  <li><a snScrollSpyItem for="foo" href="#section2">Section 2</a></li>
  <li><a snScrollSpyItem for="foo" href="#section3">Section 3</a></li>
  <li><a snScrollSpyItem for="foo" href="#section4">Section 4</a></li>
</ul>

<sn-scroll-spy-section id="section1" for="foo">content goes here</sn-scroll-spy-section>
<sn-scroll-spy-section id="section2" for="foo">content goes here</sn-scroll-spy-section>
<sn-scroll-spy-section id="section3" for="foo">content goes here</sn-scroll-spy-section>
<sn-scroll-spy-section id="section4" for="foo">content goes here</sn-scroll-spy-section>

app.component.css

a {
  color: blue;
  transition: color 0.2s ease-in-out;
}

a.active {
  color: darkblue;
}

Browser Support

This library makes use of the Intersection Observer API which requires a polyfill to work on some browsers.

Install the polyfill

npm i intersection-observer

Or use yarn

yarn add intersection-observer

Include the polyfill

Add this somewhere in your src/polyfills.ts file

import 'intersection-observer';

Development server

Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Code scaffolding

Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.

Build

Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the -prod flag for a production build.

Running unit tests

Run ng test to execute the unit tests via Karma.

Running end-to-end tests

Run ng e2e to execute the end-to-end tests via Protractor.

Making Commits

This repo uses Commitizen CLI and Conventional Changelog to create commits and generate changelogs. Instead of running git commit run git cz and follow the prompts. Changelogs will then be generated when creating new releases by running npm run release.

Making Releases

Run npm run release to create a new release. This will use Standard Version to create a new release. Standard Version will generate / update the changelog based on commits generated using Commitizen CLI, update the version number following semantic versioning rules and then commit and tag the commit for the release. Simply run git push --follow-tags origin master.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI README.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].