4.0.0 • Published 8 months ago
@svelte-put/intersect v4.0.0
@svelte-put/intersect
Svelte action use:intersect
- wrapper for IntersectionObserver
svelte-put
This package is part of the @svelte-put family. For contributing guideline and more, refer to its readme.
Usage & Documentation
See the dedicated documentation page here.
Quick Start
<script lang="ts">
import { intersect, type IntersectDetail } from '@svelte-put/intersect';
function onIntersect(e: CustomEvent<IntersectDetail>) {
const { observer, entries, direction } = e.detail;
console.log('the observer itself', observer);
console.log('scrolling direction:', direction);
console.log('intersecting:', entries[0]?.isIntersecting ? 'entering' : 'leaving');
}
</script>
<div use:intersect onintersect={onIntersect} onintersectonce></div>
Changelog
4.0.0
8 months ago
4.0.0-next.1
1 year ago
4.0.0-next.0
1 year ago
4.0.0-next.3
11 months ago
4.0.0-next.2
12 months ago
3.0.1
1 year ago
3.0.0
2 years ago
2.0.0
2 years ago
1.2.1
2 years ago
1.2.0
3 years ago
1.1.1
3 years ago
1.1.0
3 years ago
1.0.7
3 years ago
1.0.6
3 years ago
1.0.5
3 years ago
1.0.4
3 years ago
1.0.3
3 years ago
1.0.2
3 years ago
1.0.1
3 years ago
1.0.0
3 years ago