# useWindowFocus

Reactively track window focus with and events.

**Package:** `@vueuse/core`
**Category:** Elements

## Usage

```ts
<script setup lang="ts">
import { useWindowFocus } from '@vueuse/core'

const focused = useWindowFocus()
</script>

<template>
  <div>{{ focused }}</div>
</template>
```

## Reference

[VueUse Docs](https://vueuse.org/core/useWindowFocus/)
