0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00
astro/.changeset/clever-emus-roll.md
Phil cce0894534
feat: support setting timeout for client:idle (#11743)
* feat: support setting timeout for `client:idle`

* tst: add client:idle timeout e2e test

* Update .changeset/clever-emus-roll.md

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* Update .changeset/clever-emus-roll.md

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* nit: we wait for times, not values!

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-08-28 12:09:19 +01:00

487 B

astro
minor

Adds a new, optional property timeout for the client:idle directive.

This value allows you to specify a maximum time to wait, in milliseconds, before hydrating a UI framework component, even if the page is not yet done with its initial load. This means you can delay hydration for lower-priority UI elements with more control to ensure your element is interactive within a specified time frame.

<ShowHideButton client:idle={{timeout: 500}} />