Skip to content

Commit

Permalink
fix: is in viewport doc
Browse files Browse the repository at this point in the history
  • Loading branch information
max-got committed Jan 5, 2025
1 parent bf4d6fa commit 01a8f4d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sites/docs/src/content/utilities/is-in-viewport.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ one-time animations or loading content when it becomes visible:
});
</script>
<div bind:this={targetNode} class="transition" class="transition-opacity {inViewport.current ? 'opacity-100' : 'opacity-0'}">
<div bind:this={targetNode} class="transition" class="transition-opacity {hasBeenSeen ? 'opacity-100' : 'opacity-0'}">
I'll fade in once when first visible, then stop observing
</div>
```

### Observer Controls
Expand Down

0 comments on commit 01a8f4d

Please sign in to comment.