Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/azz/knockout-scrollbar

perfect-scrollbar binding for knockout.js
https://github.com/azz/knockout-scrollbar

Last synced: 2 days ago
JSON representation

perfect-scrollbar binding for knockout.js

Awesome Lists containing this project

README

        

# knockout-scrollbar
perfect-scrollbar binding for knockout.js

> knockout-scrollbar uses a custom Knockout binding for
> perfect-scrollbar, and uses
> ResizeSensor.js
> to performantly determine whenever the dimensions of the scroll target change.
> This means there is no need to programmatically call an update function.

## demo

https://derflatulator.github.io/knockout-scrollbar/demo/

## install

```sh
npm i -S knockout-scrollbar
```

## import

If you're using a bundler, just `require('knockout-scrollbar')`.

Otherwise you can include `node_modules/knockout-scrollbar/dist/knockout-scrollbar.js` with a script tag,
which bundles in `perfect-scrollbar` and `ResizeSensor.js`. `ko` is assumed to be a global.

You'll need to separately include `perfect-scrollbar.css` though:

```html

```

## use

```html


Some content...

```

Defaults for both `x` and `y` scrollbars is `true`.