Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/synapsium/ngx-scrollbar

Customizable and lightweight scrollbar Angular library based on native browser scrollbar
https://github.com/synapsium/ngx-scrollbar

angular chrome firefox ie lightweight ngx-scrollbar opera scrollbar

Last synced: about 1 month ago
JSON representation

Customizable and lightweight scrollbar Angular library based on native browser scrollbar

Awesome Lists containing this project

README

        




ngx-scrollbar




Ngx-scrollbar is a customizable and lightweight scrollbar based on native browser scrollbar for Angular.

## Setup

### Installation

Install `ngx-scrollbar` library from `npm`

```bash
npm install @synapsium/ngx-scrollbar --save
```

### Style

Import ngx-scrollbar style into your project `styles.css`

```javascript
@import '../node_modules/@synapsium/ngx-scrollbar/styles/styles.scss';
```

### Module usage

Add `ScrollbarModule` to module

```javascript
import { ScrollbarModule, ScrollbarConfig, SCROLLBAR_CONFIG } from '@synapsium/ngx-scrollbar';

const DEFAULT_SCROLLBAR_CONFIG: ScrollbarConfig = {
autoHide: true,
trackbarMinThickness: 17,
trackbarMaxThickness: 20,
barMinSize: 20
};

@NgModule({
...
imports: [
...
ScrollbarModule
],
providers: [
{
provide: SCROLLBAR_CONFIG,
useValue: DEFAULT_SCROLLBAR_CONFIG
}
]
})
```

## How to use

Add `scrollbar` directive to the container

```html




```