Skip to content

Banner

Banner is a full-width announcement bar intended for top-of-page messaging. It supports four appearance variants and an optional dismiss button.

Info

Tailwind v4
vue
<Banner appearance="info">
  System maintenance is scheduled for Sunday at 2:00 AM. Expect brief downtime.
</Banner>

Warning

Tailwind v4
vue
<Banner appearance="warning">
  Your license expires in 7 days. Renew now to avoid interruption.
</Banner>

Error

Tailwind v4
vue
<Banner appearance="error">
  Data sync failed. Some records may be out of date.
</Banner>

Announcement

Tailwind v4
vue
<Banner appearance="announcement">
  New feature: Sieve test reports can now be exported as PDF from the Reports tab.
</Banner>

Dismissible

Tailwind v4
vue
<script setup>
import { ref } from 'vue'
const showBanner = ref(true)
</script>

<template>
  <Banner
    v-if="showBanner"
    appearance="info"
    :is-dismissible="true"
    @dismiss="showBanner = false"
  >
    This banner can be dismissed.
  </Banner>
</template>

Props

PropTypeDefaultDescription
appearance'info' | 'warning' | 'error' | 'announcement''info'Color scheme and icon
isDismissiblebooleanfalseShow a dismiss button on the right

Emits

EventPayloadDescription
dismissFired when the user clicks the dismiss button

Slots

SlotDescription
defaultBanner message content

Private — Jetpack Labs internal use only