5.1.0 • Published 2 years ago

@craftsjs/perfect-scrollbar v5.1.0

Weekly downloads
11
License
MIT
Repository
github
Last release
2 years ago

ADDAPPTABLES Perfect-scrollbar

Utility for scroll browser

Getting Started

To get started, let's install the package through npm:

Choose the version corresponding to your Angular version:

Angular@craftsjs/perfect-scrollbar
155.x
134.x
123.x
112.x
101.x
npm i @craftsjs/perfect-scrollbar perfect-scrollbar --S

How to use

Import PerfectScrollbarModule in your module

   import { PerfectScrollbarModule } from '@craftsjs/perfect-scrollbar';
    @NgModule({
        imports: [PerfectScrollbarModule]
    })
    export class AddapptableModule { }
    .menu-scroll-container{
        position: relative; //this property is important
    }
<div perfectScrollbar class="menu-scroll-container">
    ...large content
</div>

Options

export interface Options {
    handlers?: string[];
    maxScrollbarLength?: number;
    minScrollbarLength?: number;
    scrollingThreshold?: number;
    scrollXMarginOffset?: number;
    scrollYMarginOffset?: number;
    suppressScrollX?: boolean;
    suppressScrollY?: boolean;
    swipeEasing?: boolean;
    useBothWheelAxes?: boolean;
    wheelPropagation?: boolean;
    wheelSpeed?: number;
  }
<div perfectScrollbar [perfectScrollOptions]="{ wheelPropagation: true }" class="menu-scroll-container">
    ...large content
</div>