Skip to content

Banner

Alert to convey information or actions

Usage

Simple usage

preview
vue
<template>
  <p-banner>
    Every sign will requires privy balance.
    Please make sure you have enough privy balance
    before sign the document(s)
  </p-banner>
</template>

With title

preview
vue
<template>
  <p-banner>
    <p-subheading>
      Your enterprise Privy Balance is running out.
    </p-subheading>
    <div class="text-sm">
      Every sign will requires privy balance. Please make sure you have enough privy balance before sign the document(s)
    </div>
  </p-banner>
</template>

With title and button

preview
vue
<template>
  <p-banner>
    <p-subheading>
      Your enterprise Privy Balance is running out.
    </p-subheading>
    <div class="text-sm">
      Every sign will requires privy balance.
      Please make sure you have enough privy balance
      before sign the document(s)
    </div>
    <div class="mt-3">
      <p-button variant="outline" size="sm">Top Up Balance</p-button>
      <p-button variant="link">Learn More</p-button>
    </div>
  </p-banner>
</template>

Custom Icon

preview
vue
<template>
  <p-banner>
    <template #icon>
      <IconCheck class="text-success" />
    </template>
    <span>
      Great! Your Privy ID and NPWP are verified.
    </span>
  </p-banner>

  <script setup>
  import IconCheck from '@privyid/persona-icon/vue/checkmark-circle-solid/20.vue'
  </script>
</template>

Variants

Banner have 2 variants: info and danger, default is info

preview
vue
<template>
  <p-banner variant="info">
    Every sign will requires privy balance.
    Please make sure you have enough privy balance
    before sign the document(s)
  </p-banner>
  <p-banner variant="danger">
    Every sign will requires privy balance.
    Please make sure you have enough privy balance
    before sign the document(s)
  </p-banner>
</template>

Hide close button

You can hide close button with dismissable set to false

preview
vue
<template>
  <p-banner :dismissable="false">
    Every sign will requires privy balance.
    Please make sure you have enough privy balance
    before sign the document(s)
  </p-banner>
</template>

No Icon

preview
vue
<template>
  <p-banner variant="danger" :dismissable="false" noIcon>
    <p-subheading>
      Your e-Meterai balance is sufficient only for 2 placements
    </p-subheading>
    <span>
      You can continue with 2 e-Meterai or contact admin to top up then retry the process
    </span>
  </p-banner>
</template>

API

Props

PropsTypeDefaultDescription
variantStringinfoBanner variant, valid value is info, danger
dismissableBooleantrueShow / Hide dismiss button

Slots

NameDescription
defaultContent to place in banner
iconContent to place icon in banner

Events

NameArgumentsDescription
dismissed-Event when close button clicked

Released under the MIT License.