🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

scroll-hint

Package Overview
Dependencies
Maintainers
0
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scroll-hint

JavaScript library to suggest that elements are scrollable

1.2.9
latest
npm
Version published
Weekly downloads
3K
-70.12%
Maintainers
0
Weekly downloads
 
Created
Source

ScrollHint

Suggests that the elements are scrollable horizontally, with the pointer icon.

Installation

via npm

npm install scroll-hint --save

via yarn

yarn add scroll-hint

via cdn

<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>

Usage

import the js with babel and Browserify/Webpack

import ScrollHint from 'scroll-hint';
new ScrollHint('.js-scrollable');

Option

NameDefaultDescription
suggestClassis-activeClassname to be added when the element is scrolled-in
scrollableClassis-scrollableClassname to be added when the element is scrollable
scrollableRightClassis-right-scrollableClassname to be added when the element is right-scrollable
scrollableLeftClassis-left-scrollableClassname to be added when the element is left-scrollable
scrollHintClassscroll-hintClassname to be added to the element
scrollHintShadowWrapClassscroll-hint-shadow-wrapClass name added to the wrapper element for shadow effects
scrollHintIconClassscroll-hint-iconClassname to be added to the icon
scrollHintIconAppendClassscroll-hint-icon-whiteAnother classname to be added to the element's icon
scrollHintIconWrapClassscroll-hint-icon-wrapClassname to be added to the icon's wrapper
scrollHintTextscroll-hint-textClassname to be added to the text
remainingTime-1When to hide scroll-hint icon (ms)
scrollHintBorderWidth10Shadowbox border width of the element
enableOverflowScrollingtrueWhen using iOS and the value is true,
-webkit-overflow-scrolling property will be added to the element
suggestiveShadowfalseShow suggestive shadow, when the element is scrollable
applyToParentsfalseApply JavaScript to the parent element
offset0You can change criteria for scrollable.
i18n.scrollablescrollableYou can change the scrollable text from here

FAQs

Package last updated on 14 Jan 2025

Did you know?

Socket

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.

Install

Related posts