Z
Zyeon UI

usePageVisibility · Zyeon UI

Subscribes to page visibility via useSyncExternalStore so polling, timers and video pause when the tab is hidden, with onVisible/onHidden callbacks and the away duration.

npx shadcn@latest add @zyeon/use-page-visibility
Preview usePageVisibility on Zyeon UI's site (opens in a new tab)

Not checked yet

Zyeon UI limits how often it can be asked, and usePageVisibility hasn't had its turn. Its source will show here once it has.