Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
infinite-marquee
Advanced tools
Configurable package to create an infinite marquee effect. Animated with JS or CSS.
Configurable package to create an infinite marquee effect. Animated with either CSS or JS.
npm i infinite-marquee
# or
yarn add infinite-marquee
<div class="marquee">
<div class="marquee-inner">
<div class="marquee-content">EXAMPLE</div>
</div>
</div>
OR
@import 'infinite-marquee/assets/css/infinite-marquee
import InfiniteMarquee from 'infinite-marquee'
new InfiniteMarquee()
Option | Type | Default | Description |
---|---|---|---|
el | HTMLElement | document.querySelector('.marquee') | Container element. |
direction | string | left | Animation direction. |
duration | number | 5 | Animation duration in seconds. |
css | boolean | true | Whether to animate using CSS. If false GSAP will be used. |
disableResize | boolean | false | Disable internal window resize event so an external one can be used. |
Method | Description |
---|---|
onResize | Call the internal resize method. |
update | Recaculate DOM. |
Method | Description |
---|---|
animation | With {css: false} this will return a GSAP fromTo instance that can be controlled using all of GSAPs methods. |
<div class="marquee my-marquee">
<div class="marquee-inner">
<div class="marquee-content">
EXAMPLE
</div>
</div>
</div>
import InfiniteMarquee from 'infinite-marquee'
new InfiniteMarquee({
el: document.querySelector('.my-marquee'),
direction: 'right',
duration: 5,
css: false
})
For if you would like to batch resizes using an external resize event.
⚠️ I recommend using a debounce on an external resize to maximise performance. Internally this package uses the lodash debounce utility.
import InfiniteMarquee from 'infinite-marquee'
const marquee = new InfiniteMarquee({
disableResize: true
})
window.addEventListener(
'resize',
() => {
marquee.onResize()
},
{ passive: true }
)
⚠️ If your content DOM is modified after load e.g. fonts, images being lazyloaded. Please look into initialising your instance after these have loaded OR calling the
update
method to recalculate the marquee. Below are some package recommendations that might help with this.
FAQs
Configurable package to create an infinite marquee effect. Animated with JS or CSS.
The npm package infinite-marquee receives a total of 0 weekly downloads. As such, infinite-marquee popularity was classified as not popular.
We found that infinite-marquee 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
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.