mirror of
https://github.com/withastro/astro.git
synced 2025-01-20 22:12:38 -05:00
11 lines
354 B
Markdown
11 lines
354 B
Markdown
|
---
|
||
|
'astro': minor
|
||
|
---
|
||
|
|
||
|
Extends the `client:visible` directive by adding an optional `rootMargin` property. This allows a component to be hydrated when it is close to the viewport instead of waiting for it to become visible.
|
||
|
|
||
|
```html
|
||
|
<!-- Load component when it's within 200px away from entering the viewport -->
|
||
|
<Component client:visible="200px" />
|
||
|
```
|