Skip to content

Commit

Permalink
Fix code blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
skryukov committed Oct 25, 2024
1 parent 6c4acdd commit 1bbd841
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/guide/load-when-visible.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ export default () => (
<!-- ... -->
{/each}
</WhenVisible>
```

== Svelte 5

Expand All @@ -223,6 +224,8 @@ export default () => (
</WhenVisible>
```

:::

In the above example, the data will start loading 500 pixels before the element is visible.

By default, the `WhenVisible` component wraps the fallback template in a `div` element so it can ensure the element is visible in the viewport. If you want to customize the wrapper element, you can provide the `as` prop.
Expand Down

0 comments on commit 1bbd841

Please sign in to comment.