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

github.com/bfwg/ngx-drag-scroll

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/bfwg/ngx-drag-scroll

  • v1.2.6
  • Source
  • Go
  • Socket score

Version published
Created
Source

Angular2 Drag to Scroll

Lightweight drag to scroll directive for Angular2

npm version Maintenance Status License MIT

Scroll on drag!

Scroll

Try out the demo!

Install

You can get it on npm.

npm install angular2-drag-scroll --save

Setup

You'll need to add DragScrollModule to your application module.

import { DragScrollModule } from 'angular2-drag-scroll';
...

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    DragScrollModule,
    ...
  ],
  providers: [],
  bootstrap: [AppComponent]
})

export class AppModule {
}

Add the drag-scroll attribute to a scrollable element:

@Component({
  selector: 'sample',
  template:`
  <div drag-scroll>
    Big text goes here...
  </div>
  `
})
class Sample {}

That's it! Now you can scroll it by dragging.

API REFERENCE

NameTypeDescriptionDefault
scrollbar-hidden@InputWhether the scroll bar for this element is hidden.false
drag-scroll-disabled@InputWhether all draging and scrolling events is disabled.false
drag-scroll-x-disabled@InputWhether horizontally dragging and scrolling events is disabled.false
drag-scroll-y-disabled@InputWhether vertically dragging and scrolling events is disabled.false

License

MIT

FAQs

Package last updated on 17 Feb 2017

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