<SkewNotification> · Nuxt Skew Protection · Nuxt SEO

-
-
-
-

[Sign In](https://nuxtseo.com/auth/github)

[Nuxt SEO on GitHub](https://github.com/harlan-zw/nuxt-seo)

Skew Protection

-
-
-
-
-
-
-
-
-
-

Search…```k`` /`

v1.1.1

- [Discord Support](https://discord.com/invite/275MBUBvgP)

### Nuxt API

-
-
-
-
-

### Nitro API

-
-

Nuxt API

# <SkewNotification>

[Copy for LLMs](https://nuxtseo.com/docs/skew-protection/api/skew-notification.md)

A headless Vue component that gives you notification logic without imposing any UI.

This component uses `useSkewProtection()` internally and auto-connects on mount. For manual connection control (lazy mode), use the composable directly with `useSkewProtection({ lazy: true })`.

## [Basic Usage](#basic-usage)

```
<template>
  <SkewNotification v-slot="{ isCurrentChunksOutdated, dismiss, reload, timeAgo }">
    <div v-if="isCurrentChunksOutdated" class="notification">
      <p>New version available! ({{ timeAgo }})</p>
      <button @click="reload">
        Reload
      </button>
      <button @click="dismiss">
        Dismiss
      </button>
    </div>
  </SkewNotification>
</template>
```

## [Slot Props](#slot-props)

The component gives you these props via scoped slot:

### [`version`](#version)

- Type: `string`

The user's current version (from cookie or buildId).

```
<SkewNotification v-slot="{ version }">
  <div>
    <p>Current version: {{ version }}</p>
  </div>
</SkewNotification>
```

### [`isCurrentChunksOutdated`](#iscurrentchunksoutdated)

- Type: `boolean`

Whether the notification should be shown.

Automatically set to `true` when:

- User's loaded modules are invalidated by a new deployment
- Can be manually controlled via the `open` prop

```
<SkewNotification v-slot="{ isCurrentChunksOutdated }">
  <div v-if="isCurrentChunksOutdated">
    Update available!
  </div>
</SkewNotification>
```

### [`dismiss()`](#dismiss)

- Type: `() => void`

Dismiss the notification (sets `isCurrentChunksOutdated` to `false`).

```
<SkewNotification v-slot="{ isCurrentChunksOutdated, dismiss }">
  <div v-if="isCurrentChunksOutdated">
    <p>Update available!</p>
    <button @click="dismiss">Not now</button>
  </div>
</SkewNotification>
```

### [`reload()`](#reload)

- Type: `() => void`

Reload the page to get the new version.

Calls `window.location.reload()`.

```
<SkewNotification v-slot="{ isCurrentChunksOutdated, reload }">
  <div v-if="isCurrentChunksOutdated">
    <button @click="reload">Update Now</button>
  </div>
</SkewNotification>
```

### [`timeAgo`](#timeago)

- Type: `string`

Human-readable time since the release.

Examples: "just now", "2 minutes ago", "1 hour ago"

```
<SkewNotification v-slot="{ isCurrentChunksOutdated, timeAgo }">
  <div v-if="isCurrentChunksOutdated">
    <p>Released {{ timeAgo }}</p>
  </div>
</SkewNotification>
```

### [`releaseDate`](#releasedate)

- Type: `Date | null`

The release date as a Date object.

```
<SkewNotification v-slot="{ isCurrentChunksOutdated, releaseDate }">
  <div v-if="isCurrentChunksOutdated">
    <p>Released: {{ releaseDate?.toLocaleString() }}</p>
  </div>
</SkewNotification>
```

### [`payload`](#payload)

- Type: `ChunksOutdatedPayload | null`

Payload from chunks outdated event with detailed information.

```
<SkewNotification v-slot="{ isCurrentChunksOutdated, payload }">
  <div v-if="isCurrentChunksOutdated">
    <p>Deleted chunks: {{ payload?.deletedChunks.length }}</p>
    <p>Invalidated modules: {{ payload?.invalidatedModules.length }}</p>
  </div>
</SkewNotification>
```

### [`isAppOutdated`](#isappoutdated)

- Type: `boolean`

Whether entire app is outdated (not just current chunks).

```
<SkewNotification v-slot="{ isAppOutdated }">
  <div v-if="isAppOutdated">
    <p>Full app update available</p>
  </div>
</SkewNotification>
```

## [Props](#props)

### [`forceOpen`](#forceopen)

- Type: `boolean`
- Default: `undefined`

Force notification open for testing/debugging.

```
<script setup lang="ts">
const forceOpen = ref(true)
</script>

<template>
  <SkewNotification v-slot="{ reload }" :force-open="forceOpen">
    <div>
      <button @click="reload">
        Update
      </button>
    </div>
  </SkewNotification>
</template>
```

## [Events](#events)

### [`@dismiss`](#dismiss-1)

Emitted when notification is dismissed.

```
<SkewNotification @dismiss="console.log('dismissed')">
  <!-- ... -->
</SkewNotification>
```

### [`@reload`](#reload-1)

Emitted when the component triggers a reload.

```
<SkewNotification @reload="console.log('reloading')">
  <!-- ... -->
</SkewNotification>
```

## [Examples](#examples)

See

 for complete examples including Nuxt UI, toast notifications, banners, and more.

[Edit this page](https://github.com/nuxt-seo-pro/nuxt-skew-protection/edit/main/docs/content/3.api/2.skew-notification.md)

[Markdown For LLMs](https://nuxtseo.com/docs/skew-protection/api/skew-notification.md)

Did this page help you?

On this page

- [Basic Usage](#basic-usage)
- [Slot Props](#slot-props)
- [Props](#props)
- [Events](#events)
- [Examples](#examples)

[GitHub](https://github.com/harlan-zw/nuxt-seo) [ Discord](https://discord.com/invite/275MBUBvgP)

###

-
-

Modules

-
-
-
-
-
-
-
-
-

###

-
-
-

###

Nuxt

-
-
-
-
-

Vue

-
-
-
-
-
-
-
-

###

-
-
-
-
-
-
-
-
-
-

Copyright © 2023-2026 Harlan Wilton - [MIT License](https://github.com/harlan-zw/nuxt-seo/blob/main/license) · [mdream](https://mdream.dev)