vuetensils
Version:
A 'naked' component library for building accessible, lightweight, on-brand applications.
50 lines (44 loc) • 1.07 kB
Markdown
Open your console and scroll around to watch events get fired.
```vue
<template>
<div>
<VIntersect
@enter="log('@enter fired for block 1')"
@exit="log('@exit fired for block 1')"
@change="log('@change fired for block 1')"
>
<div class="intersection-content">Content block 1</div>
</VIntersect>
<VIntersect
@enter="log('@enter fired for block 2')"
@exit="log('@exit fired for block 2')"
@change="log('@change fired for block 2')"
>
<div class="intersection-content">Content block 2</div>
</VIntersect>
<VIntersect
@enter="log('@enter fired for block 3')"
@exit="log('@exit fired for block 3')"
@change="log('@change fired for block 3')"
>
<div class="intersection-content">Content block 3</div>
</VIntersect>
</div>
</template>
<script>
export default {
methods: {
log: console.log
}
};
</script>
<style>
.intersection-content {
display: flex;
align-items: center;
justify-content: center;
height: 50vh;
border: 1px solid;
}
</style>
```