
Security News
GitHub Actions Pricing Whiplash: Self-Hosted Actions Billing Change Postponed
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.
vue-intersect
Advanced tools
A Vue component to add intersection-observer to a Vue component or HTML element.
A Vue component to add intersection observe a Vue component or HTML element.
The IntersectionObserver is an amazing API which allows you to observe one or more HTMLElement for when it has enterede or left the viewport.
This API has many use cases like, infinite-scroll, lazy-loading or animations when an element enters the viewport.
Simply install using your favorite package manager 🔥
npm install vue-intersect --save
yarn add vue-intersect
The package acts as an abstract component, much like what you may know from keep-alive or transition.
This means that it's basically a "decorator". A component which does not output any markup to the DOM, but adds the functionality under the hood 😱.
<template>
<intersect @intersected="msg = 'Intersected!'">
<div>{{ msg }}</div>
</intersect>
</template>
<script>
import Intersect from 'vue-intersect'
export default {
components: { Intersect },
data () {
return {
msg: 'Not intersected.'
}
},
methods: {
onIntersected () {
alert('Element has intersected.')
}
}
}
</script>
| Property | Type | Default | Required | Description |
|---|---|---|---|---|
| threshold | Array | [0.2] | no | MDN docs |
| root | HTMLElement | null | no | MDN docs |
| rootMargin | String | 0px 0px 0px 0px | no | MDN docs |
| Name | Arguments | Description |
|---|---|---|
| intersected | none | Event fired on intersected. |
The IntersectionObserver API is not currently available in all browsers (IE11, Safari and iOS Safari). If you intend to support these browsers, you'll need to add a poylfill to your bundle.
WICG IntersectionObserver Polyfill is higly recommended.
FAQs
A Vue component to add intersection-observer to a Vue component or HTML element.
The npm package vue-intersect receives a total of 2,391 weekly downloads. As such, vue-intersect popularity was classified as popular.
We found that vue-intersect 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
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.