
Research
PyPI Package Disguised as Instagram Growth Tool Harvests User Credentials
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
vue3-scroll-spy
Advanced tools
Scrollspy and animated scroll-to for Vue3, inspired by vue2-scrollspy.
ββ Made with β€οΈ by TriDiamond
npm i vue3-scroll-spy -S
OR
yarn add vue3-scroll-spy
Supported Package | Version |
---|---|
Vue | 3+ |
// global register at main.js
import { registerScrollSpy } from '@/directives/ScrollSpy'
const app = createApp(App)
// Using default options
registerScrollSpy(app)
// or custom global options
registerScrollSpy(app, options)
app.mount('#app')
<ul v-scroll-spy-active v-scroll-spy-link>
<li>
<a>Menu 1</a>
</li>
<li>
<a>Menu 2</a>
</li>
</ul>
<div v-scroll-spy>
<div>
<h1>Header 1</h1>
<p>Content</p>
</div>
<div>
<h1>Header 2</h1>
<p>Content</p>
</div>
</div>
Binding scroll-spy to sections (or elements) of a container.
Directive name | Description | Default |
---|---|---|
v-scroll-spy="{allowNoActive: true}" | When scroll position is outside of the container, active class will be removed. | Keep one section stays active at all time. |
v-scroll-spy="{offset: 50}" | TAdding offset to scroll and active elements. | Default: 0 |
v-scroll-spy="{time: 200, steps: 30}" | Set the animation options, time is animation duration, steps is step per frame. | {time: 200, steps: 30} |
Setting active elements' selector
and class
properties.
Directive name | Description | Default |
---|---|---|
v-scroll-spy-active="{selector: 'li.menu-item', class: 'custom-active'}" | Customize elements selector and class name. | {selector: null, class: 'active'} |
Add click handler
on children elements allow scrolling to the related section.
Directive name | Description | Default |
---|---|---|
v-scroll-spy-link="{selector: 'a.menu-link'}" | Customize menu links selector. | {selector: null, class: 'active'} |
import { registerScrollSpy, Easing } from '@/directives/ScrollSpy'
const app = createApp(App)
// or custom global options
registerScrollSpy(app, {
easing: Easing.Cubic.In
})
app.mount('#app')
v-scroll-spy
, v-scroll-spy-active
, v-scroll-spy-link
for this directive to work correctly.data-scroll-spy-id=""
on each element container, where this directive is bind.Vue3 Scroll-Spy also support multi-leveled sections:
<ol
v-scroll-spy
v-scroll-spy-active="{selector: 'li.menu-item', class: 'active'}"
>
<li class="menu-item">Item 1</li>
<li class="menu-item">
Item 2
<ol>
<li class="menu-item">Item 2.1</li>
<li class="menu-item">Item 2.2</li>
</ol>
</li>
</ol>
MIT License
FAQs
Unknown package
The npm package vue3-scroll-spy receives a total of 1,472 weekly downloads. As such, vue3-scroll-spy popularity was classified as popular.
We found that vue3-scroll-spy 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.
Research
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.