Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,20 @@ VBar is fully customizable. You can use your CSS classes to make it even more be
*optional* hBarInternal=""
```

## Scroll position manipulation
VBar lets you manipulate the scroll position however you want. For that, all you need to do is define a unique `ref` property:
``` html
<v-bar wrapper="wrapper" ref="vBar"></v-bar>
```

#### vbar:y-scroll-to
This allows you to set the vertical scroll position
``` javascript
this.$refs.vBar.$emit('vbar:y-scroll-to', 'bottom') // Scrolls all the way to the bottom
this.$refs.vBar.$emit('vbar:y-scroll-to', 'top') // Sets the scroll at the top
this.$refs.vBar.$emit('vbar:y-scroll-to', 400) // Scrolls 400px from the top
```

## To contribute and make it better
Clone the repo, change what you want and send PR

Expand Down
Loading