New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

angular4-slimscroll

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular4-slimscroll

Slim scroll directive for angular4

latest
Source
npmnpm
Version
1.0.5
Version published
Maintainers
1
Created
Source

angular-io-slimScroll

Customizable slimScroll directive for Angular 2.

Code Example

Demo

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

import { SlimScroll } from 'angular4-slimscroll';

@NgModule({
  declarations: [
    SlimScroll,
    AppComponent
  ],
  imports: [
    ...
  ],
  bootstrap: [AppComponent]
})
export class AppModule {}

And then add slimScroll attribute with options to your element:

<div slimScroll
     width="auto"
     height="250px"
     size="7px">
    Lorem ipsum dolor sit amet...   
 </div>

Motivation

Existing slimScrolls do not work as they should... So we have written another one 😏

Installation

npm i angular4-slimscroll --save

API Reference

Options can be passed to an element via html attributes:

PropertyTypeDefaultDescription
widthstringautoWidth in pixels of the visible scroll area
heightstring250pxHeight in pixels of the visible scroll area
sizestring7pxWidth in pixels of the scrollbar and rail
colorstring#000Scrollbar color, accepts any hex/color value
positionstringrightScrollbar position - left/right
distancestring1pxDistance in pixels between the side edge and the scrollbar
startstringtopDefault scroll position on load - top / bottom
opacitynumber.4Sets scrollbar opacity
transitionnumber.3Set transition for opacity in seconds
alwaysVisiblebooleanfalseEnables always-on mode for the scrollbar
disableFadeOutbooleanfalseCheck if we should hide the scrollbar when user is hovering over
railVisiblebooleanfalseSets visibility of the rail
railColorstring#333Sets rail color
railOpacitynumber.2Sets rail opacity
railClassstringslimScrollRailDefautlt CSS class of the slimscroll rail
barClassstringslimScrollBarDefautlt CSS class of the slimscroll bar
wrapperClassstringslimScrollDivDefautlt CSS class of the slimscroll wrapper
allowPageScrollbooleanfalseCheck if mousewheel should scroll the window if we reach top/bottom
wheelStepnumber20Scroll amount applied to each mouse wheel step
touchScrollStepnumber200Scroll amount when user is using gestures
borderRadiusstring7pxSets border radius
railBorderRadiusstring7pxSets border radius of the rail
scrollTonumber0Set default point from which to start scrolling
autoScrollToBottombooleanfalseScroll to bottom on adding new content to container

License

This project is licensed under the MIT license. See the LICENSE file for more info.

Keywords

angular

FAQs

Package last updated on 26 Sep 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