Feedback e status
VNotificationCenter
Centro de notificações in-app para mensagens, alertas e atualizações sem sair do fluxo de trabalho. Agrupa e filtra notificações (tabs All/Unread/Mentions/Updates), sinaliza não-lidas com badge e pontos, oferece gestão rápida ("Mark all as read", "View all notifications →") e agrupa por tempo ("Today", "Yesterday").
<script setup lang="ts">
import { VNotificationCenter } from 'vueui-nova-kit'
</script>Uso
<script setup lang="ts">
</script>
<template>
</template>Playground
Os controles abaixo são gerados a partir das props declaradas em VNotificationCenter.types.ts; o código acompanha cada mudança.
Exemplos
Variantes, tamanhos e estados, extraídos das stories da biblioteca.
Default
Variação Padrão. Estado padrão do componente; use a aba Controls para experimentar as props ao vivo.
Ver código
<script setup lang="ts">
import { VNotificationCenter } from 'vueui-nova-kit'
const notifications = [
{
id: '1',
title: 'Design file shared with you',
preview: 'Sarah shared "Landing Page v2.fig" with you.',
time: '2m ago',
unread: true,
group: 'Today',
tab: 'mentions',
},
{
id: '2',
title: 'Build completed',
preview: 'Deploy preview is ready for review.',
time: '5h ago',
unread: false,
group: 'Yesterday',
tab: 'updates',
},
]
</script>
<template>
<VNotificationCenter v-model="value" :notifications="notifications" />
</template>Grouped
Variação Grouped. Props: variant="grouped".
Ver código
<script setup lang="ts">
import { VNotificationCenter } from 'vueui-nova-kit'
const notifications = [
{
id: '1',
title: 'Design file shared with you',
preview: 'Sarah shared "Landing Page v2.fig" with you.',
time: '2m ago',
unread: true,
group: 'Today',
tab: 'mentions',
},
{
id: '2',
title: 'Build completed',
preview: 'Deploy preview is ready for review.',
time: '5h ago',
unread: false,
group: 'Yesterday',
tab: 'updates',
},
]
</script>
<template>
<VNotificationCenter
v-model="value"
variant="grouped"
:notifications="notifications" />
</template>Feed
Variação Feed. Props: variant="feed".
Ver código
<script setup lang="ts">
import { VNotificationCenter } from 'vueui-nova-kit'
const notifications = [
{
id: '1',
title: 'Design file shared with you',
preview: 'Sarah shared "Landing Page v2.fig" with you.',
time: '2m ago',
unread: true,
group: 'Today',
tab: 'mentions',
},
{
id: '2',
title: 'Build completed',
preview: 'Deploy preview is ready for review.',
time: '5h ago',
unread: false,
group: 'Yesterday',
tab: 'updates',
},
]
</script>
<template>
<VNotificationCenter
v-model="value"
variant="feed"
:notifications="notifications" />
</template>Open By Default
Variação Aberto por padrão. Interativo: o estado é mantido na própria story (v-model).
Ver código
<script setup lang="ts">
import { ref } from 'vue'
import { VNotificationCenter } from 'vueui-nova-kit'
const args = {
size: 'md',
variant: 'default',
notifications: [
{
id: '1',
title: 'Design file shared with you',
preview: 'Sarah shared \'Landing Page v2.fig\' with you.',
time: '2m ago',
unread: true,
group: 'Today',
tab: 'mentions'
},
{
id: '2',
title: 'Build completed',
preview: 'Deploy preview is ready for review.',
time: '5h ago',
unread: false,
group: 'Yesterday',
tab: 'updates'
}
]
}
const open = ref(true)
</script>
<template>
<VNotificationCenter v-bind="args" v-model="open" variant="grouped" />
</template>Loading
Variação Carregando. Props: loading=true, variant="grouped". Interativo: o estado é mantido na própria story (v-model).
Ver código
<script setup lang="ts">
import { ref } from 'vue'
import { VNotificationCenter } from 'vueui-nova-kit'
const args = {
size: 'md',
variant: 'grouped',
notifications: [
{
id: '1',
title: 'Design file shared with you',
preview: 'Sarah shared \'Landing Page v2.fig\' with you.',
time: '2m ago',
unread: true,
group: 'Today',
tab: 'mentions'
},
{
id: '2',
title: 'Build completed',
preview: 'Deploy preview is ready for review.',
time: '5h ago',
unread: false,
group: 'Yesterday',
tab: 'updates'
}
],
loading: true
}
const open = ref(true)
</script>
<template>
<VNotificationCenter v-bind="args" v-model="open" />
</template>Acessibilidade
Semântica nativa primeiro, foco visível, labels acessíveis e teclado conforme o padrão WAI-ARIA correspondente.
Estados
Default · Hover · Focus-visible · Pressed/Active quando aplicável · Disabled · Loading quando aplicável.
Motion
| Trigger | Property | Duration | Easing |
|---|---|---|---|
| Hover | background/transform | 100ms | standard |
| Focus | outline/box-shadow | 100ms | standard |
| Enter/Exit | opacity/transform | 160ms | standard |
Respeitar prefers-reduced-motion.
Todas as transições respeitam prefers-reduced-motion e os tokens --v-duration-*.
Props
| Prop | Tipo | Default | Descrição |
|---|---|---|---|
modelValue | boolean | — | — |
notifications | VNotificationCenterItem[] | [] | — |
size | VNotificationCenterSize | "md" | — |
variant | VNotificationCenterVariant | "default" | — |
placement | VNotificationCenterPlacement | "bottom-end" | — |
activeTab | VNotificationCenterTab | "all" | — |
searchQuery | string | "" | — |
disabled | boolean | false | — |
loading | boolean | false | — |
ariaLabel | string | — | — |
triggerLabel | string | — | — |
headerTitle | string | — | — |
markAllLabel | string | — | — |
viewAllLabel | string | — | — |
emptyLabel | string | — | — |
closeLabel | string | — | — |
motion | VMotionLevel | V_MOTION_DEFAULT ("expressive") | — |
expressiveLabel | string | — | Expressive pill label shown when the bell toggle is open. |
Events
| Evento | Payload | Descrição |
|---|---|---|
@update:modelValue | value: boolean | — |
@mark-all-read | — | — |
@view-all | — | — |
@item-click | id: string | — |
@update:activeTab | value: VNotificationCenterTab | — |
@update:searchQuery | value: string | — |
Slots
Sem slots.
Fonte: src/components/feedback/VNotificationCenter/VNotificationCenter.vue · tipos: src/components/feedback/VNotificationCenter/VNotificationCenter.types.ts