---
title: "Show app-wide notices"
description: "Place <BackendNotices> once in your layout for every notice the backend raises: an administrator's visit, maintenance, a past-due payment, a scheduled account deletion, low credits, a gift to claim and announcements, each replaceable through a named slot."
canonical_url: "https://nuxt-backend.dev/docs/build/ui/notices"
---
# Show app-wide notices

> Place <BackendNotices> once in your layout for every notice the backend raises: an administrator's visit, maintenance, a past-due payment, a scheduled account deletion, low credits, a gift to claim and announcements, each replaceable through a named slot.

Version: nuxt-backend 0.6.x · Tab: Build · Kind: how-to · Status: stable

Every page: [llms.txt](https://nuxt-backend.dev/llms.txt) · Skill for coding agents: [nuxt-backend](https://nuxt-backend.dev/.well-known/skills/nuxt-backend/SKILL.md)

Commands use npm; use your project's package manager.

Some messages hold for the whole session, on every page: an administrator is acting as the account, the app is under maintenance, a gift is waiting. `<BackendNotices>` is one region for all of them. Place it once in your layout; it renders nothing until a notice applies, then shows each one in order of importance. Each notice has a named slot, so you can reword or restyle one and keep the rest. The state behind each notice comes from the backend: the session, the maintenance flag, the billing provider's subscription status and the credit balance. The package adds the one region, the order, and the accessible announcement.

## Place it in your layout

```vue [app/layouts/default.vue]
<template>
  <div>
    <header><!-- your navigation --></header>
    <BackendNotices />
    <slot />
  </div>
</template>
```

The packaged pages render `<BackendNotices>` in their [frame](https://nuxt-backend.dev/docs/build/ui/pages#the-frame), and the [app shell](https://nuxt-backend.dev/docs/build/ui/app-shell) renders it under its header. A packaged page inside your layout leaves the notices to yours, so each one shows and is announced once.

## The notices

Most important first:

<table>
<thead>
  <tr>
    <th>
      Notice
    </th>
    
    <th>
      Shows while
    </th>
    
    <th>
      Slot
    </th>
    
    <th>
      Arrives with
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      An administrator's visit
    </td>
    
    <td>
      An administrator is <a href="https://nuxt-backend.dev/docs/build/auth/admin/impersonation">
        acting as the account
      </a>
      
      : whose account, when the visit ends, and a way out
    </td>
    
    <td>
      <code>
        impersonation
      </code>
    </td>
    
    <td>
      Built
    </td>
  </tr>
  
  <tr>
    <td>
      Maintenance
    </td>
    
    <td>
      The <a href="https://nuxt-backend.dev/docs/ship/operate/flags">
        maintenance switch
      </a>
      
       is on, with the administrator's message
    </td>
    
    <td>
      <code>
        maintenance
      </code>
    </td>
    
    <td>
      Built
    </td>
  </tr>
  
  <tr>
    <td>
      Payment past due
    </td>
    
    <td>
      The subscription's last payment failed and the provider is retrying: the plan's features stay on during the grace period, with a button that opens the billing portal to update the card. Only to the billing managers
    </td>
    
    <td>
      <code>
        past-due
      </code>
    </td>
    
    <td>
      Built
    </td>
  </tr>
  
  <tr>
    <td>
      Deletion scheduled
    </td>
    
    <td>
      The account's <a href="https://nuxt-backend.dev/docs/build/auth/accounts/data#delete-an-account">
        deletion
      </a>
      
       waits out its grace period: when it happens, and a <strong>
        Keep my account
      </strong>
      
       button
    </td>
    
    <td>
      <code>
        deletion
      </code>
    </td>
    
    <td>
      Built
    </td>
  </tr>
  
  <tr>
    <td>
      Low credits
    </td>
    
    <td>
      The balance is under the threshold, with a top-up
    </td>
    
    <td>
      <code>
        low-credits
      </code>
    </td>
    
    <td>
      Built
    </td>
  </tr>
  
  <tr>
    <td>
      A gift to claim
    </td>
    
    <td>
      A <a href="https://nuxt-backend.dev/docs/build/growth/offers/gifts">
        gift
      </a>
      
       addressed to the person waits, with a claim button
    </td>
    
    <td>
      <code>
        gift
      </code>
    </td>
    
    <td>
      Built
    </td>
  </tr>
  
  <tr>
    <td>
      Announcements
    </td>
    
    <td>
      An <a href="https://nuxt-backend.dev/docs/build/growth/engage/announcements">
        announcement
      </a>
      
       you published is live and not dismissed, with a <strong>
        Dismiss
      </strong>
      
       button
    </td>
    
    <td>
      <code>
        announcement
      </code>
    </td>
    
    <td>
      Built
    </td>
  </tr>
</tbody>
</table>

<table>
<thead>
  <tr>
    <th>
      Prop
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      Effect
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        threshold
      </code>
    </td>
    
    <td>
      <code>
        appConfig.backend.billing.lowCreditsThreshold
      </code>
      
      , <code>
        10
      </code>
    </td>
    
    <td>
      The balance under which the low-credits notice shows
    </td>
  </tr>
</tbody>
</table>

## Replace one notice

A named slot replaces that notice and receives its state and actions. Leave the others to the component:

```vue [app/layouts/default.vue]
<template>
  <div>
    <BackendNotices>
      <template #low-credits="{ balance, topUp, dismiss }">
        <p>Only {{ balance }} credits left for new strips.</p>
        <button type="button" @click="topUp()">Add credits</button>
        <button type="button" @click="dismiss()">Not now</button>
      </template>
      <template #gift />
    </BackendNotices>
    <slot />
  </div>
</template>
```

An empty slot, like `#gift` above, turns that notice off. A slot of yours keeps what the notice promised: say it in words, keep a busy button focusable, and announce a failure as an alert ([Accessibility](https://nuxt-backend.dev/docs/build/ui/accessibility#what-a-replacement-must-keep)). Its words otherwise come from the `impersonation`, `maintenance`, `deletion`, `credits`, `gift` and `announcement` [label groups](https://nuxt-backend.dev/docs/build/ui/customize/labels#the-groups), and from `pastDue` once it lands.

## What it guarantees

One polite live region stays mounted, and each notice appears inside it, so a screen reader announces it. Each notice is a region named in words, never by colour alone. A dismissed notice leaves focus where it was. Nothing renders, and nothing is read, while no notice applies.

## What happens when…

<table>
<thead>
  <tr>
    <th>
      Situation
    </th>
    
    <th>
      Result
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      Two notices apply at once
    </td>
    
    <td>
      Both show, most important first
    </td>
  </tr>
  
  <tr>
    <td>
      A person dismisses low credits
    </td>
    
    <td>
      It stays hidden until the balance rises above the threshold and falls again
    </td>
  </tr>
  
  <tr>
    <td>
      The past-due payment succeeds on a retry
    </td>
    
    <td>
      The notice disappears on every open page
    </td>
  </tr>
  
  <tr>
    <td>
      The past-due grace period ends without payment
    </td>
    
    <td>
      The subscription is canceled by the provider; the notice gives way to the free plan
    </td>
  </tr>
</tbody>
</table>

## Limits

- **Not for page-level messages.** A form's outcome belongs next to the form, not in the app-wide region.
- **Past-due needs a subscription.** It follows the billing provider's status; credit-only apps never show it ([React to billing events](https://nuxt-backend.dev/docs/build/billing/events)).

## Test it

Turn the maintenance switch on in the admin console's Flags tab: every page shows the maintenance notice, and a screen reader announces it once. In a component test, mount `<BackendNotices>` over a mock backend whose subscription status is `past_due` ([Test pages over a mock backend](https://nuxt-backend.dev/docs/develop/testing/pages)).

## Related

- [Default pages](https://nuxt-backend.dev/docs/build/ui/pages#the-frame): the frame's notices region.
- [Build the app shell](https://nuxt-backend.dev/docs/build/ui/app-shell): the shell that renders the notices for you.
- [Show parts of a page to the right people](https://nuxt-backend.dev/docs/build/ui/gate): `<Gate>`, the other component every layout leans on.
- [Change copy and labels](https://nuxt-backend.dev/docs/build/ui/customize/labels): the words of each notice.


## Sitemap

See the full [sitemap](https://nuxt-backend.dev/sitemap.md) for all pages.
