NoticeBar 通知栏
Display · Display component
Important notification banners.
On-demand import
wbbb-ui/components/notice-barBasic Usage
Example code
<script setup lang="ts">
import { WbbbNoticeBar } from 'wbbb-ui/components/notice-bar'
import 'wbbb-ui/styles/notice-bar'
</script>
<template>
<WbbbNoticeBar />
</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
API Reference
Props
| Property | Description | Type | Default | Required |
|---|---|---|---|---|
closeable | Allows the overlay or notification to be closed by the user. | boolean | false | No |
color | Sets the primary display color. | string | '' | No |
text | Provides the primary display text. | string | '' | No |
type | Sets the semantic type or variant of the component. | WbbbStatus \| 'primary' | 'warning' | No |
Events
close
Slots
default
Two-way binding
Does not support v-model.
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: Use Playground to verify further state combinations and cross-platform behavior.
