Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ngx-syncscroll

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-syncscroll

SyncScroll is a micro Angular component, which allows to scroll two or more scrollable areas simultaneously.

  • 1.0.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
67
decreased by-34.95%
Maintainers
1
Weekly downloads
 
Created
Source

ngx-syncscroll

NPM

Demo

ngx-syncscroll is a micro library rewritten in Angular, which allows to scroll two or more scrollable areas simultaneously.

Based on https://github.com/asvd/syncscroll.

<ngx-syncscroll [classSyncScroll]="'drag-timeline'" [dragState]="true" [attributeName]="'drag-scroll-timeline'">
       <div class="container syncscroll dragscroll frame time romanian" [ngClass]="'drag-timeline'"
            [attr.drag-scroll-timeline]="true">
         <img src="../assets/romanian_timeline.png">
       </div>
   
       <div class="container syncscroll dragscroll frame time floss" [ngClass]="'drag-timeline'"
            [attr.drag-scroll-timeline]="true">
         <img src="../assets/floss_timeline.png">
       </div>
</ngx-syncscroll>

Installation

npm install --save ngx-syncscroll

Usage

Add NgxSyncScrollModule to your list of module imports:

import { NgxSyncScrollModule } from 'ngx-syncscroll';

@NgModule({
  declarations: [AppComponent],
  imports: [BrowserModule, NgxSyncScrollModule],
  bootstrap: [AppComponent]
})
class AppModule {}

You can then use the component in your templates:

@Component({
  selector: 'app',
  template: `
    <ngx-syncscroll [classSyncScroll]="'drag-timeline'" [dragState]="true" [attributeName]="'drag-scroll-timeline'">
       <div class="container syncscroll dragscroll frame time romanian" [ngClass]="'drag-timeline'"
            [attr.drag-scroll-timeline]="true">
         <img src="../assets/romanian_timeline.png">
       </div>
   
       <div class="container syncscroll dragscroll frame time floss" [ngClass]="'drag-timeline'"
            [attr.drag-scroll-timeline]="true">
         <img src="../assets/floss_timeline.png">
       </div>
     </ngx-syncscroll>
       `
})

Options

Property nameTypeDefaultDescription
dragStatebooleanfalseDrag mode for images.
attributeNamestringnullUnique attribute name for a block with scrolling. Need to be used with [attr] property for child.
classSyncScrollstringnullUnique class name for a block with scrolling. Need to be used with [ngClass] or html class for child.

Keywords

FAQs

Package last updated on 04 Aug 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc