0.1.2 • Published 9 days ago

ngx-slight-scroll v0.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
9 days ago

ngx-slight-scroll (latest)

ngx-slight-scroll npm version npm.io

  • The CSS scrollbars styling module defines properties that you can use for visual styling of scrollbars. You can customize the width of the scrollbar as required. You can also customize the color of the scrollbar track, which is the background of the scrollbar, and the color of the scrollbar thumb, which is the draggable handle of the scrollbar.

  • ngxSlimScroll Add directive to any HTML block element in order to enable scrollbar.

Import Style

  • Import using CSS CDN and Add it to your application
<link rel="stylesheet" href="https://cdn.beforepost.com/neptune/ngx-slight-scroll-minified.css">

Add crossorigin attribute as (use-credentials or anonymous) to link element if required.

  • Directly add it to your Css / Scss file.
@import url("https://cdn.beforepost.com/neptune/ngx-slight-scroll-minified.css");


Import

Import the module on your app.module.ts file as follow.

import { NgxSlightScrollModule} from "ngx-slight-scroll";

Add to imports

imports: [
  ...
  NgxSlightScrollModule
  ...
],

Core function

<div class="card-body"
    [maxHeight]="'600px'"
    [minHeight]="'300px'"
    [scrollWidth]="12"
    [scrollThumbBg]="'darkblue'"
    [scrollBorder]="false"
    [scrollThumbRadius]="0"
    [scrollBg]="'white'"
    (scrollEndEvent)="scrollEndEvent($event)"

    ngxSlimScroll

    >

    <!-- Content goes here... -->

</div>
AttributeTypevalueRequired
maxHeightstringpx, vh, rem, anyoptional
minHeightstringpx, vh, rem, anyoptional
scrollWidthnumber0 - anyoptional
scrollBgstringcss color, hex, name, rgb, anyoptional
scrollThumbBgstringcss color, hex, name, rgb, anyoptional
scrollBorderbooleantrue, falseoptional
scrollThumbRadiusnumber0 - 100optional
functionTypeDescriptionRequired
scrollEndEventanycallback when scroll reach bottomoptional

Code integration

To use this package as a service npm i ngx-slight-scroll install this on the root angular project .

Note: Don't forget to run this commend npm i ngx-slight-scroll on root folder or else it will throw error.

Then import the module as follow on imports array

NgxResizeElementModule