

Hooks for browser APIs, DOM events, viewport state, and client lifecycle behavior.

## Hooks [#hooks]

<Cards columns="3">
  <Card title="useClickAnyWhere" href="/hooks/browser/use-click-any-where">
    Run a handler whenever the document is clicked.
  </Card>

  <Card title="useEventCallback" href="/hooks/browser/use-event-callback">
    Create a stable callback that always sees the latest state.
  </Card>

  <Card title="useEventListener" href="/hooks/browser/use-event-listener">
    Attach typed listeners to window, document, or element refs.
  </Card>

  <Card title="useHover" href="/hooks/browser/use-hover">
    Track whether an element ref is currently hovered.
  </Card>

  <Card title="useIntersectionObserver" href="/hooks/browser/use-intersection-observer">
    Observe when an element enters or leaves a viewport/root.
  </Card>

  <Card title="useIsClient" href="/hooks/browser/use-is-client">
    Detect whether code is running on the client.
  </Card>

  <Card title="useIsMounted" href="/hooks/browser/use-is-mounted">
    Check whether the component is still mounted.
  </Card>

  <Card title="useIsomorphicLayoutEffect" href="/hooks/browser/use-isomorphic-layout-effect">
    Use layout effect on client and effect on server.
  </Card>

  <Card title="useMediaQuery" href="/hooks/browser/use-media-query">
    Subscribe to media query match state.
  </Card>

  <Card title="useOnClickOutside" href="/hooks/browser/use-on-click-outside">
    Trigger handlers when interaction happens outside refs.
  </Card>

  <Card title="useResizeObserver" href="/hooks/browser/use-resize-observer">
    Measure element size changes with ResizeObserver.
  </Card>

  <Card title="useScreen" href="/hooks/browser/use-screen">
    Read 

    `window.screen`

     values reactively.
  </Card>

  <Card title="useScript" href="/hooks/browser/use-script">
    Load external scripts and track loading status.
  </Card>

  <Card title="useScrollLock" href="/hooks/browser/use-scroll-lock">
    Lock and unlock scrolling on body or target elements.
  </Card>

  <Card title="useUnmount" href="/hooks/browser/use-unmount">
    Run cleanup logic when a component unmounts.
  </Card>

  <Card title="useWindowSize" href="/hooks/browser/use-window-size">
    Track viewport width and height.
  </Card>
</Cards>
