← packages
vue-idle-guard
WEEKLY RELEASESession timeout for Vue 3 — idle detection, logout countdown, multi-tab activity sync.
v0.1.0↓ 1,230/wk★ 368MIT#vue
README
README.md
# vue-idle-guard
Session timeout for Vue 3 — idle detection, logout countdown, multi-tab activity sync.
## Install
```bash
npm i vue-idle-guard
```
## Usage
```ts
import { createVueIdleGuard } from "vue-idle-guard";
const instance = createVueIdleGuard({
timeout: 15 * 60 * 1000,
onIdle: () => console.warn("session expiring"),
});
```
## Why
Most projects reimplement this badly, once per codebase. This does it in one
place, with tests, and stays out of your way.
- Zero dependencies
- Fully typed
- MIT licensed