Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
vue-scrolly
Advanced tools
Overlay scrollbar for Vue.js.
Check out the live demo.
$ npm install vue-scrolly
First, import vue-scrolly
into your Vue component.
import { Scrolly, ScrollyViewport, ScrollyBar } from 'vue-scrolly';
export default {
// ...
components: {
Scrolly,
ScrollyViewport,
ScrollyBar
}
}
Then, construct your div block with overlay scrollbar using scrolly component.
<scrolly class="foo" :style="{ width: '400px', height: '300px' }">
<scrolly-viewport>
<!-- Your contents here -->
</scrolly>
<scrolly-bar axis="y"></scrolly-bar>
<scrolly-bar axis="x"></scrolly-bar>
</scrolly>
You can customize the appearance of the overlay scrollbar using CSS overrides.
This simple example below creates custom blue overlay scrollbar:
.scrolly.foo .scrolly-bar:before {
background: blue;
}
For complete reference, you can look at vue-scrolly's default CSS stylesheet from the main Scrolly.vue component file.
Scrolly
Property | Description | Type | Default |
---|---|---|---|
parentScroll | Scroll parent when user has completed scrolling to the beginning or the end of the viewport. | Boolean | true |
passiveScroll | When true, mousewheel event is attached as a non-blocking passive listener for improved scrolling performance. Disabling parentScroll will not be possible. See: https://www.chromestatus.com/feature/5745543795965952 | Boolean | false |
ScrollyBar
Property | Description | Type | Default |
---|---|---|---|
axis | Displays horizontal or vertical scrollbar. | String [x, y] | y |
Event | Description | Parameters |
---|---|---|
scrollchange | Triggers when user scrolls the viewport | scrollLayout: object |
vue-scrolly by Yan Sern licensed under the MIT+BSD. This project also uses normalizeWheel packaged by basilfx which contains codes extracted from BSD-licensed Fixed Data Table project by Facebook.
PS: I would love to know if you're using vue-scrolly. Tweet to me at @yansernio.
FAQs
Overlay scrollbar for Vue.js.
The npm package vue-scrolly receives a total of 61 weekly downloads. As such, vue-scrolly popularity was classified as not popular.
We found that vue-scrolly demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.