Skip to content

Notify 消息通知

Feedback · Display component

Page-top notifications.

On-demand importwbbb-ui/components/notify

Basic Usage

Example code
<script setup lang="ts">
import { showNotify } from 'wbbb-ui/services/notify'

function open() { showNotify('Saved successfully') }
</script>

<template><button @click="open">Open Notify</button></template>
Live mobile previewOpen in a new tab ↗

States and Interaction

All listed states can be operated and verified in the live Playground preview.

DefaultPrimarySuccessWarningDangerInfo

Service components use <wbbb-overlay-host /> for library visuals and fall back to uni-app native capability without a host.

API Reference

Props

PropertyDescriptionTypeDefaultRequired
durationSets the display or animation duration in milliseconds.number2200No
messageProvides the notification or feedback message.string''No
modelValueProvides the current value used by v-model.booleanfalseNo
typeSets the semantic type or variant of the component.Exclude<WbbbType, 'default'>'info'No
zIndexSets the stacking order of the component.number1000No

Events

  • update:modelValue
  • close

Slots

  • default

Two-way binding

Supports v-model (modelValue).

Platform Notes

Build verification: H5, App Vue, WeChat Mini Program, Alipay Mini Program, and Douyin Mini Program.

Runtime differences: H5 supports keyboard focus and reduced motion. Mini Programs provide equivalent touch interaction; verify upload, date selection, and overlays on target platforms.

Usage note: Service APIs can be used without full installation and are queued by Overlay Host.

Wbbb UI · Built for uni-app product experiences