Skip to content

Notify

A notification bar that slides in from the top of the page. Supports multiple types and imperative invocation.

Basic Usage

vue
<script setup>
import { ref } from 'vue'
const show = ref(false)
</script>

<template>
  <see-notify v-model:show="show" message="New message received" type="success" />
</template>

Imperative Usage

ts
import { useNotify } from 'see-u-ui'

const notify = useNotify()

notify.success('Operation successful')
notify.error('An error occurred')
notify.warning('Warning: ...')
notify.info('New message received')

Props

PropTypeDefaultDescription
showbooleanfalseWhether to show the notification
messagestring''Notification message text
typestring'info'Notification type: success, error, warning, info
durationnumber3000Display duration in ms
iconstring''Custom icon
colorstring''Custom text color
backgroundstring''Custom background color
isClosablebooleanfalseWhether to show close button

Events

EventParametersDescription
onClick-Triggered when notification is clicked
onClose-Triggered when notification closes
update:show(value: boolean)Triggered when show state changes

Liao ICP No. 2025070134