@craftsjs/perfect-scrollbar
v5.1.0
Published
Perfect scrollbar library for angular
Downloads
6,073
Maintainers
Readme
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 ----------- | ------------------- 15 | 5.x 13 | 4.x 12 | 3.x 11 | 2.x 10 | 1.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>