
Security News
npm ‘is’ Package Hijacked in Expanding Supply Chain Attack
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.
scroll-hint
Advanced tools
Suggests that the elements are scrollable horizontally, with the pointer icon
.
npm install scroll-hint --save
yarn add scroll-hint
<link rel="stylesheet" href="https://unpkg.com/scroll-hint@latest/css/scroll-hint.css">
<script src="https://unpkg.com/scroll-hint@latest/js/scroll-hint.js"></script>
import the js with babel and Browserify/Webpack
import ScrollHint from 'scroll-hint';
new ScrollHint('.js-scrollable');
Name | Default | Description |
---|---|---|
suggestClass | is-active | Classname to be added when the element is scrolled-in |
scrollableClass | is-scrollable | Classname to be added when the element is scrollable |
scrollableRightClass | is-right-scrollable | Classname to be added when the element is right-scrollable |
scrollableLeftClass | is-left-scrollable | Classname to be added when the element is left-scrollable |
scrollHintClass | scroll-hint | Classname to be added to the element |
scrollHintShadowWrapClass | scroll-hint-shadow-wrap | Class name added to the wrapper element for shadow effects |
scrollHintIconClass | scroll-hint-icon | Classname to be added to the icon |
scrollHintIconAppendClass | scroll-hint-icon-white | Another classname to be added to the element's icon |
scrollHintIconWrapClass | scroll-hint-icon-wrap | Classname to be added to the icon's wrapper |
scrollHintText | scroll-hint-text | Classname to be added to the text |
remainingTime | -1 | When to hide scroll-hint icon (ms) |
scrollHintBorderWidth | 10 | Shadowbox border width of the element |
enableOverflowScrolling | true | When using iOS and the value is true, -webkit-overflow-scrolling property will be added to the element |
suggestiveShadow | false | Show suggestive shadow, when the element is scrollable |
applyToParents | false | Apply JavaScript to the parent element |
offset | 0 | You can change criteria for scrollable. |
i18n.scrollable | scrollable | You can change the scrollable text from here |
FAQs
JavaScript library to suggest that elements are scrollable
The npm package scroll-hint receives a total of 4,783 weekly downloads. As such, scroll-hint popularity was classified as popular.
We found that scroll-hint demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.
Security News
A critical flaw in the popular npm form-data package could allow HTTP parameter pollution, affecting millions of projects until patched versions are adopted.
Security News
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.