Notification center panel — Activity block
Proactivity-notification-center-panel · for app pages
Notification center panel
The popover-sized list beside the bell: grouped Today / Earlier, unread marked, everything marked read
Documentation
Installation
One command copies the block into your project with the shadcn CLI (the registry is set once: Installation).
pnpm dlx shadcn-vue@latest add @trame/activity-notification-center-panelUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import ActivityNotificationCenterPanel from '@/components/trame/blocks/activity/activity-notification-center-panel.vue'
const props = {
title: "Notifications",
notifications: [
{
id: 1,
text: "Nadia Benali mentioned you in “Preparing order 2041”",
at: "9:12 a.m.",
exact: "October 11, 2026, 9:12 a.m.",
day: "Today",
actor: "Nadia Benali",
about: "Order 2041",
kind: "mention",
unread: true,
action: "task/2041"
},
{
id: 2,
text: "New order 2048 — 2 items, $148.00",
at: "8:47 a.m.",
exact: "October 11, 2026, 8:47 a.m.",
day: "Today",
about: "Order 2048",
kind: "order",
unread: true,
action: "orders/2048"
}
],
markAllRead: "notifications.read",
more: "notifications"
}
</script>
<template>
<ActivityNotificationCenterPanel v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe heading ("Notifications") |
| notifications* | Notification[] | Datathe notifications, newest first |
| markAllRead | string | Actionposts "Mark all as read" to the app |
| more | string | Actionthe full notifications page |
| filters | Filter[] | extra chips of the page ("Orders", "Payments") |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Notification notifications[] · 11 props
| Prop | Type | Description |
|---|---|---|
| id* | string | number | Datathe notification’s id in the tool that answers it |
| text* | string | Wordsthe sentence, as the app wrote it ("Nadia replied to your review") |
| at* | string | Wordswhen, as the app writes it ("09:12", "yesterday"): never computed here |
| exact | string | Wordsthe full date, shown as the time’s title |
| day | string | Wordsthe group the panel lists it under ("Today", "Earlier") |
| actor | string | Wordswho triggered it, when the text does not name them |
| avatar | string | Picturea picture: a root-relative path (/media/…) or an absolute URL |
| about | string | Wordsthe record it concerns ("Order 2041"); the digest groups by it |
| kind | 'mention' | 'order' | 'message' | 'payment' | 'stock' | 'system' | what the notification is about; it picks the icon |
| unread | boolean | true: the person has not read it yet |
| action | string | Actionthe page clicking it opens |
Filter filters[] · 2 props
| Prop | Type | Description |
|---|---|---|
| value* | string | Designa notification kind |
| label* | string | Wordsthe value in words, as shown |
Options options · 4 props
| Prop | Type | Description |
|---|---|---|
| emptyTitle | string | Wordswhat the empty state says ("You are up to date") |
| emptyText | string | Wordsthe empty state’s one line |
| pageSize | number | notifications shown before "See more" |
| mood | 'inverse' | 'brand' | 'warm' | 'tint' | string | a band of the page that redefines the theme surfaces inside it |
What it asks your app for
The block never knows your app: it asks it, through one context provided once, where its links lead, what its actions do, how a price reads and which words to say (The host context).
| Member | What it is for |
|---|---|
| href | the address an action leads to, or null to hide what leads there |
| act | runs a change (subscribe, add to cart, save) and answers { ok } or { ok: false, error } |
| can | whether the page has this action |
| asset | a picture’s address as your app serves it |
| Link | your router’s link component |
| cartCount | the cart badge’s number |
| cartDrawer | whether your app has a cart drawer |
| cartOpen | whether the cart drawer is open |
| label | your word for an interface key, or undefined to keep the block’s own |
The words it says itself, in English and French; label(key) replaces any of them:
| Key | English | French |
|---|---|---|
| newsletter.already | You are already subscribed. | Vous êtes déjà inscrit. |
| newsletter.done | Done: you are subscribed. | C’est noté : vous êtes inscrit. |
| newsletter.invalid | Check the email address. | Vérifiez l’adresse e-mail. |
| newsletter.tooMany | Too many attempts, try again in a moment. | Trop de tentatives, réessayez dans un moment. |
Features
- Every word in the server HTML
- Same markup in Vue and React
- Theme tokens only: every theme, light and dark
- Shows what you give it, invents nothing
- No motion; still under reduced motion
- Real buttons and links, a visible focus
- Asks your app through actions:
notifications[],markAllRead,more - Reads
notificationsfrom your app
A activity section, for app pages; it uses @lucide/vue, @vueuse/core, clsx, reka-ui, tailwind-merge.
Built with
The components this block is made of; each one installs on its own too.
More activity blocks
- Event briefing sidebar: A category-by-category briefing with a summary rail, using only the app’s own recorded events.
- Feed grouped: a workspace-wide feed with many events: rows under day headings, avatar beside the sentence.
- Feed rail: a record’s history on its page: a hairline with an icon per event, the sentence and its time.
- Feed steps: stages with a state (done, running, upcoming): a process or an onboarding that moves forward.
- Notification digest grouped: a quiet morning: the notifications grouped by the record they concern, each group with its count.
- Notification feed tabbed: the full notifications page: tabs All / Unread / Mentions, extra filter chips, room for long sentences.
- Read archive split: Unread work beside the read archive, for scanning attention and context together without hiding either.
- Record comments boxed: a discussion on a record: events with a body (comment, note) in an inset box, internal notes tinted.