Previews

No matching results.

x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
<div class="tw:p-6 tw:max-w-7xl tw:mx-auto tw:space-y-8">
<!-- Introductory callout -->
<div class="callout">
<p class="tw:mb-1 tw:text-sm tw:font-mono">
<strong>NOTIFICATION CENTRE:</strong> "What happened since I last looked" drawer<br>
<strong>CLASSES:</strong> .notification-centre | .notification-centre-group | .notification-centre-item | .notification-centre-item-unread | .notification-centre-item-icon | .notification-centre-item-body | .notification-centre-item-time | .notification-centre-empty | .notification-centre-footer | .notification-centre-trigger<br>
<strong>COMPOSES:</strong> Drawer (.drawer shell + drawer_controller.js) | Empty State (.empty-state) | Badge (.badge-dot, .badge-notification)
</p>
<p class="tw:mb-0 tw:text-sm">
A right-hand drawer surfacing application status changes, document requests, and event
reminders for parents/applicants — infrequent, often first-time users with no login. Rows are
grouped by day, unread rows carry a surface-tint wash + link-blue dot, and every row is a real
button whose accessible name announces its read state. Requires
<code>notification_centre_controller.js</code> for mark-read / mark-all-read — no fetch, the
host page owns the data.
</p>
</div>
<!-- ============================================
Section 1: Mixed read/unread, two day groups
============================================ -->
<div class="tw:border-t tw:pt-6">
<h2 class="h4 tw:mb-4">Mixed Read / Unread</h2>
<div class="callout tw:mb-4">
<p class="tw:mb-0 tw:text-sm">
<strong>Default:</strong> Two day groups ("Today", "Yesterday"). 3 of 5 rows are unread
(surface-tint wash + link-blue dot before the timestamp). Clicking a row marks it read;
"Mark all as read" clears the rest. The bell's <code>.badge-notification</code> count and
<code>aria-label</code> stay in sync with the live unread count — there is no separate
counter to desync.
</p>
</div>
<div data-controller="drawer notification-centre">
<button class="btn btn-icon btn-outline-secondary tw:relative notification-centre-trigger"
type="button" data-action="click->drawer#open"
data-notification-centre-target="trigger"
data-label-base="Notifications" aria-label="Notifications, 3 unread" aria-expanded="false">
<i class="fa-regular fa-bell" aria-hidden="true"></i>
<span class="badge badge-danger badge-sm badge-circle badge-notification"
data-notification-centre-target="badge">3</span>
</button>
<div class="drawer-backdrop" data-drawer-target="backdrop"
data-action="click->drawer#close" aria-hidden="true"></div>
<div class="drawer notification-centre" data-drawer-target="panel"
role="dialog" aria-modal="true"
aria-labelledby="nc-mixed-title" aria-hidden="true">
<div class="drawer-header">
<h2 class="drawer-title" id="nc-mixed-title">Notifications</h2>
<button class="btn btn-icon btn-tertiary" type="button"
data-action="click->drawer#close" aria-label="Close notifications">
<i class="fa-solid fa-xmark"></i>
</button>
</div>
<div class="drawer-body">
<p class="tw:sr-only" role="status" aria-live="polite" data-notification-centre-target="status"></p>
<h3 class="h6 notification-centre-group">Today</h3>
<button type="button" class="notification-centre-item notification-centre-item-unread"
data-notification-centre-target="item" data-action="click->notification-centre#markRead"
data-notification-id="n1"
aria-label="Unread: St Mary's Academy requested a document. 2 hours ago."
data-read-label="St Mary's Academy requested a document. 2 hours ago.">
<span class="notification-centre-item-icon tw:bg-state-info-bg tw:text-state-info-ink">
<i class="fa-regular fa-file-lines" aria-hidden="true"></i>
</span>
<span class="notification-centre-item-body">
<span class="tw:text-body-s tw:leading-body-s tw:font-semibold tw:text-neutral-900">St Mary's Academy requested a document</span>
<span class="tw:text-body-s tw:leading-body-s tw:text-neutral-700">Upload a copy of Oscar's birth certificate to continue his application.</span>
<span class="notification-centre-item-time badge-dot">2 hours ago</span>
</span>
</button>
<button type="button" class="notification-centre-item notification-centre-item-unread"
data-notification-centre-target="item" data-action="click->notification-centre#markRead"
data-notification-id="n2"
aria-label="Unread: Application status updated. 5 hours ago."
data-read-label="Application status updated. 5 hours ago.">
<span class="notification-centre-item-icon tw:bg-state-success-bg tw:text-state-success-ink">
<i class="fa-regular fa-circle-check" aria-hidden="true"></i>
</span>
<span class="notification-centre-item-body">
<span class="tw:text-body-s tw:leading-body-s tw:font-semibold tw:text-neutral-900">Application status updated</span>
<span class="tw:text-body-s tw:leading-body-s tw:text-neutral-700">Greenford Sixth Form moved Ben's application to Offer Made.</span>
<span class="notification-centre-item-time badge-dot">5 hours ago</span>
</span>
</button>
<h3 class="h6 notification-centre-group">Yesterday</h3>
<button type="button" class="notification-centre-item notification-centre-item-unread"
data-notification-centre-target="item" data-action="click->notification-centre#markRead"
data-notification-id="n3"
aria-label="Unread: New reply from Cardinal Vaughan Memorial School. Yesterday, 9:05am."
data-read-label="New reply from Cardinal Vaughan Memorial School. Yesterday, 9:05am.">
<span class="notification-centre-item-icon tw:bg-state-info-bg tw:text-state-info-ink">
<i class="fa-regular fa-comment-dots" aria-hidden="true"></i>
</span>
<span class="notification-centre-item-body">
<span class="tw:text-body-s tw:leading-body-s tw:font-semibold tw:text-neutral-900">New reply from Cardinal Vaughan Memorial School</span>
<span class="tw:text-body-s tw:leading-body-s tw:text-neutral-700">The admissions team answered your question about transport routes.</span>
<span class="notification-centre-item-time badge-dot">Yesterday, 9:05am</span>
</span>
</button>
<button type="button" class="notification-centre-item"
data-notification-centre-target="item" data-action="click->notification-centre#markRead"
data-notification-id="n4"
aria-label="Open Day booking confirmed. Yesterday, 4:12pm.">
<span class="notification-centre-item-icon tw:bg-state-warning-bg tw:text-state-warning-ink">
<i class="fa-regular fa-calendar-check" aria-hidden="true"></i>
</span>
<span class="notification-centre-item-body">
<span class="tw:text-body-s tw:leading-body-s tw:font-semibold tw:text-neutral-900">Open Day booking confirmed</span>
<span class="tw:text-body-s tw:leading-body-s tw:text-neutral-700">You're booked in for King's College Maths School's Open Day, Thu 14 Aug, 6:00–8:00pm.</span>
<span class="notification-centre-item-time">Yesterday, 4:12pm</span>
</span>
</button>
<button type="button" class="notification-centre-item"
data-notification-centre-target="item" data-action="click->notification-centre#markRead"
data-notification-id="n5"
aria-label="Application update: not offered. Yesterday, 11:30am.">
<span class="notification-centre-item-icon tw:bg-state-danger-bg tw:text-state-danger-ink">
<i class="fa-regular fa-circle-xmark" aria-hidden="true"></i>
</span>
<span class="notification-centre-item-body">
<span class="tw:text-body-s tw:leading-body-s tw:font-semibold tw:text-neutral-900">Application update: not offered</span>
<span class="tw:text-body-s tw:leading-body-s tw:text-neutral-700">Manchester Communication Academy was unable to offer Tom a place this year.</span>
<span class="notification-centre-item-time">Yesterday, 11:30am</span>
</span>
</button>
</div>
<div class="drawer-footer notification-centre-footer">
<button class="btn btn-tertiary btn-sm" type="button"
data-action="click->notification-centre#markAllRead">Mark all as read</button>
</div>
</div>
</div>
<div class="tw:mt-4 tw:text-sm tw:text-neutral-700">
<code><div class="drawer notification-centre"><div class="drawer-body"><h3 class="h6 notification-centre-group">Today</h3><button class="notification-centre-item notification-centre-item-unread">...</button></div></div></code>
</div>
</div>
<!-- ============================================
Section 2: Empty state
============================================ -->
<div class="tw:border-t tw:pt-6">
<h2 class="h4 tw:mb-4">Empty State</h2>
<div class="callout tw:mb-4">
<p class="tw:mb-0 tw:text-sm">
<strong>No notifications:</strong> Composes <code>.empty-state</code> inside
<code>.notification-centre-empty</code>, which stretches to fill and center in the
remaining drawer height. The footer is omitted entirely — there is nothing to mark as
read — matching the Drawer pattern's own "Without Footer" precedent.
</p>
</div>
<div data-controller="drawer notification-centre">
<button class="btn btn-icon btn-outline-secondary tw:relative notification-centre-trigger"
type="button" data-action="click->drawer#open"
data-notification-centre-target="trigger"
data-label-base="Notifications" aria-label="Notifications" aria-expanded="false">
<i class="fa-regular fa-bell" aria-hidden="true"></i>
</button>
<div class="drawer-backdrop" data-drawer-target="backdrop"
data-action="click->drawer#close" aria-hidden="true"></div>
<div class="drawer notification-centre" data-drawer-target="panel"
role="dialog" aria-modal="true"
aria-labelledby="nc-empty-title" aria-hidden="true">
<div class="drawer-header">
<h2 class="drawer-title" id="nc-empty-title">Notifications</h2>
<button class="btn btn-icon btn-tertiary" type="button"
data-action="click->drawer#close" aria-label="Close notifications">
<i class="fa-solid fa-xmark"></i>
</button>
</div>
<div class="drawer-body">
<div class="notification-centre-empty empty-state">
<i class="fa-regular fa-bell empty-state-icon" aria-hidden="true"></i>
<h3 class="empty-state-title">No notifications yet</h3>
<p class="empty-state-text">
You'll see updates here as soon as a school responds, requests a document, or an
event is coming up.
</p>
<div class="empty-state-actions">
<a href="#" class="btn btn-secondary btn-sm" type="button">View your applications</a>
</div>
</div>
</div>
</div>
</div>
<div class="tw:mt-4 tw:text-sm tw:text-neutral-700">
<code><div class="notification-centre-empty empty-state"><i class="fa-regular fa-bell empty-state-icon"></i><h3 class="empty-state-title">No notifications yet</h3>...</div></code>
</div>
</div>
<!-- ============================================
Section 3: 9+ badge overflow
============================================ -->
<div class="tw:border-t tw:pt-6">
<h2 class="h4 tw:mb-4">9+ Badge Overflow</h2>
<div class="callout tw:mb-4">
<p class="tw:mb-0 tw:text-sm">
<strong>Overflow:</strong> 10 unread rows — the bell badge and its <code>aria-label</code>
cap the displayed count at <code>9+</code> rather than growing the circle. (Checked
<code>components/badge.css</code>: <code>.badge-notification-ceil</code> is a flush-to-top
<em>position</em> variant, not a numeric-overflow variant — overflow is handled entirely
by capping the badge's text content, the same idiom already shown in the Badge preview's
"99+" example.) Use "Mark all as read" to watch the badge collapse and hide.
</p>
</div>
<div data-controller="drawer notification-centre">
<button class="btn btn-icon btn-outline-secondary tw:relative notification-centre-trigger"
type="button" data-action="click->drawer#open"
data-notification-centre-target="trigger"
data-label-base="Notifications" aria-label="Notifications, 9+ unread" aria-expanded="false">
<i class="fa-regular fa-bell" aria-hidden="true"></i>
<span class="badge badge-danger badge-sm badge-circle badge-notification"
data-notification-centre-target="badge">9+</span>
</button>
<div class="drawer-backdrop" data-drawer-target="backdrop"
data-action="click->drawer#close" aria-hidden="true"></div>
<div class="drawer notification-centre" data-drawer-target="panel"
role="dialog" aria-modal="true"
aria-labelledby="nc-overflow-title" aria-hidden="true">
<div class="drawer-header">
<h2 class="drawer-title" id="nc-overflow-title">Notifications</h2>
<button class="btn btn-icon btn-tertiary" type="button"
data-action="click->drawer#close" aria-label="Close notifications">
<i class="fa-solid fa-xmark"></i>
</button>
</div>
<div class="drawer-body">
<p class="tw:sr-only" role="status" aria-live="polite" data-notification-centre-target="status"></p>
<h3 class="h6 notification-centre-group">Today</h3>
<button type="button" class="notification-centre-item notification-centre-item-unread"
data-notification-centre-target="item" data-action="click->notification-centre#markRead"
data-notification-id="o1"
aria-label="Unread: Greenford Sixth Form requested a reference letter. Just now."
data-read-label="Greenford Sixth Form requested a reference letter. Just now.">
<span class="notification-centre-item-icon tw:bg-state-info-bg tw:text-state-info-ink">
<i class="fa-regular fa-file-lines" aria-hidden="true"></i>
</span>
<span class="notification-centre-item-body">
<span class="tw:text-body-s tw:leading-body-s tw:font-semibold tw:text-neutral-900">Greenford Sixth Form requested a reference letter</span>
<span class="notification-centre-item-time badge-dot">Just now</span>
</span>
</button>
<button type="button" class="notification-centre-item notification-centre-item-unread"
data-notification-centre-target="item" data-action="click->notification-centre#markRead"
data-notification-id="o2"
aria-label="Unread: King's College Maths School moved you to Interview. 8 minutes ago."
data-read-label="King's College Maths School moved you to Interview. 8 minutes ago.">
<span class="notification-centre-item-icon tw:bg-state-success-bg tw:text-state-success-ink">
<i class="fa-regular fa-circle-check" aria-hidden="true"></i>
</span>
<span class="notification-centre-item-body">
<span class="tw:text-body-s tw:leading-body-s tw:font-semibold tw:text-neutral-900">King's College Maths School moved you to Interview</span>
<span class="notification-centre-item-time badge-dot">8 minutes ago</span>
</span>
</button>
<button type="button" class="notification-centre-item notification-centre-item-unread"
data-notification-centre-target="item" data-action="click->notification-centre#markRead"
data-notification-id="o3"
aria-label="Unread: New message from Hills Road Sixth Form College. 22 minutes ago."
data-read-label="New message from Hills Road Sixth Form College. 22 minutes ago.">
<span class="notification-centre-item-icon tw:bg-state-info-bg tw:text-state-info-ink">
<i class="fa-regular fa-comment-dots" aria-hidden="true"></i>
</span>
<span class="notification-centre-item-body">
<span class="tw:text-body-s tw:leading-body-s tw:font-semibold tw:text-neutral-900">New message from Hills Road Sixth Form College</span>
<span class="notification-centre-item-time badge-dot">22 minutes ago</span>
</span>
</button>
<button type="button" class="notification-centre-item notification-centre-item-unread"
data-notification-centre-target="item" data-action="click->notification-centre#markRead"
data-notification-id="o4"
aria-label="Unread: Open Day booking confirmed with Cardinal Vaughan Memorial School. 40 minutes ago."
data-read-label="Open Day booking confirmed with Cardinal Vaughan Memorial School. 40 minutes ago.">
<span class="notification-centre-item-icon tw:bg-state-warning-bg tw:text-state-warning-ink">
<i class="fa-regular fa-calendar-check" aria-hidden="true"></i>
</span>
<span class="notification-centre-item-body">
<span class="tw:text-body-s tw:leading-body-s tw:font-semibold tw:text-neutral-900">Open Day booking confirmed with Cardinal Vaughan Memorial School</span>
<span class="notification-centre-item-time badge-dot">40 minutes ago</span>
</span>
</button>
<button type="button" class="notification-centre-item notification-centre-item-unread"
data-notification-centre-target="item" data-action="click->notification-centre#markRead"
data-notification-id="o5"
aria-label="Unread: Manchester Communication Academy requested proof of address. 1 hour ago."
data-read-label="Manchester Communication Academy requested proof of address. 1 hour ago.">
<span class="notification-centre-item-icon tw:bg-state-info-bg tw:text-state-info-ink">
<i class="fa-regular fa-file-lines" aria-hidden="true"></i>
</span>
<span class="notification-centre-item-body">
<span class="tw:text-body-s tw:leading-body-s tw:font-semibold tw:text-neutral-900">Manchester Communication Academy requested proof of address</span>
<span class="notification-centre-item-time badge-dot">1 hour ago</span>
</span>
</button>
<button type="button" class="notification-centre-item notification-centre-item-unread"
data-notification-centre-target="item" data-action="click->notification-centre#markRead"
data-notification-id="o6"
aria-label="Unread: St Mary's Academy moved you to Offer Made. 2 hours ago."
data-read-label="St Mary's Academy moved you to Offer Made. 2 hours ago.">
<span class="notification-centre-item-icon tw:bg-state-success-bg tw:text-state-success-ink">
<i class="fa-regular fa-circle-check" aria-hidden="true"></i>
</span>
<span class="notification-centre-item-body">
<span class="tw:text-body-s tw:leading-body-s tw:font-semibold tw:text-neutral-900">St Mary's Academy moved you to Offer Made</span>
<span class="notification-centre-item-time badge-dot">2 hours ago</span>
</span>
</button>
<button type="button" class="notification-centre-item notification-centre-item-unread"
data-notification-centre-target="item" data-action="click->notification-centre#markRead"
data-notification-id="o7"
aria-label="Unread: Reminder: Greenford Sixth Form's Open Evening starts in 2 days. 3 hours ago."
data-read-label="Reminder: Greenford Sixth Form's Open Evening starts in 2 days. 3 hours ago.">
<span class="notification-centre-item-icon tw:bg-state-warning-bg tw:text-state-warning-ink">
<i class="fa-regular fa-calendar-days" aria-hidden="true"></i>
</span>
<span class="notification-centre-item-body">
<span class="tw:text-body-s tw:leading-body-s tw:font-semibold tw:text-neutral-900">Reminder: Greenford Sixth Form's Open Evening starts in 2 days</span>
<span class="notification-centre-item-time badge-dot">3 hours ago</span>
</span>
</button>
<button type="button" class="notification-centre-item notification-centre-item-unread"
data-notification-centre-target="item" data-action="click->notification-centre#markRead"
data-notification-id="o8"
aria-label="Unread: King's College Maths School requested a document. 4 hours ago."
data-read-label="King's College Maths School requested a document. 4 hours ago.">
<span class="notification-centre-item-icon tw:bg-state-info-bg tw:text-state-info-ink">
<i class="fa-regular fa-file-lines" aria-hidden="true"></i>
</span>
<span class="notification-centre-item-body">
<span class="tw:text-body-s tw:leading-body-s tw:font-semibold tw:text-neutral-900">King's College Maths School requested a document</span>
<span class="notification-centre-item-time badge-dot">4 hours ago</span>
</span>
</button>
<button type="button" class="notification-centre-item notification-centre-item-unread"
data-notification-centre-target="item" data-action="click->notification-centre#markRead"
data-notification-id="o9"
aria-label="Unread: Hills Road Sixth Form College moved you to Waitlisted. 5 hours ago."
data-read-label="Hills Road Sixth Form College moved you to Waitlisted. 5 hours ago.">
<span class="notification-centre-item-icon tw:bg-state-warning-bg tw:text-state-warning-ink">
<i class="fa-regular fa-triangle-exclamation" aria-hidden="true"></i>
</span>
<span class="notification-centre-item-body">
<span class="tw:text-body-s tw:leading-body-s tw:font-semibold tw:text-neutral-900">Hills Road Sixth Form College moved you to Waitlisted</span>
<span class="notification-centre-item-time badge-dot">5 hours ago</span>
</span>
</button>
<button type="button" class="notification-centre-item notification-centre-item-unread"
data-notification-centre-target="item" data-action="click->notification-centre#markRead"
data-notification-id="o10"
aria-label="Unread: New message from Cardinal Vaughan Memorial School. 6 hours ago."
data-read-label="New message from Cardinal Vaughan Memorial School. 6 hours ago.">
<span class="notification-centre-item-icon tw:bg-state-info-bg tw:text-state-info-ink">
<i class="fa-regular fa-comment-dots" aria-hidden="true"></i>
</span>
<span class="notification-centre-item-body">
<span class="tw:text-body-s tw:leading-body-s tw:font-semibold tw:text-neutral-900">New message from Cardinal Vaughan Memorial School</span>
<span class="notification-centre-item-time badge-dot">6 hours ago</span>
</span>
</button>
</div>
<div class="drawer-footer notification-centre-footer">
<button class="btn btn-tertiary btn-sm" type="button"
data-action="click->notification-centre#markAllRead">Mark all as read</button>
</div>
</div>
</div>
<div class="tw:mt-4 tw:text-sm tw:text-neutral-700">
<code><span class="badge badge-danger badge-sm badge-circle badge-notification" data-notification-centre-target="badge">9+</span></code>
</div>
</div>
<!-- ============================================
Section 4: Quick Reference
============================================ -->
<div class="tw:border-t tw:pt-6">
<h2 class="h4 tw:mb-4">Quick Reference</h2>
<div class="callout">
<p class="tw:mb-1 tw:text-sm tw:font-mono">
<strong>Container:</strong> .drawer .notification-centre (composed together on the panel)<br>
<strong>Group:</strong> .h6 .notification-centre-group (composed together on the day heading)<br>
<strong>Row:</strong> .notification-centre-item | .notification-centre-item-unread | .notification-centre-item-icon | .notification-centre-item-body | .notification-centre-item-time<br>
<strong>Empty:</strong> .notification-centre-empty .empty-state (composed together)<br>
<strong>Footer:</strong> .drawer-footer .notification-centre-footer (composed together)<br>
<strong>Trigger:</strong> .btn .btn-icon .notification-centre-trigger + .badge .badge-notification<br>
<strong>Controller:</strong> data-controller="drawer notification-centre" | data-action="click->notification-centre#markRead" | data-action="click->notification-centre#markAllRead"<br>
<strong>Events:</strong> notification-centre:read { id, unreadCount } | notification-centre:allRead { unreadCount: 0 }
</p>
</div>
</div>
</div>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
<div class="tw:p-6 tw:max-w-7xl tw:mx-auto tw:space-y-8">
<!-- Introductory callout -->
<div class="callout">
<p class="tw:mb-1 tw:text-sm tw:font-mono">
<strong>NOTIFICATION CENTRE:</strong> "What happened since I last looked" drawer<br>
<strong>CLASSES:</strong> .notification-centre | .notification-centre-group | .notification-centre-item | .notification-centre-item-unread | .notification-centre-item-icon | .notification-centre-item-body | .notification-centre-item-time | .notification-centre-empty | .notification-centre-footer | .notification-centre-trigger<br>
<strong>COMPOSES:</strong> Drawer (.drawer shell + drawer_controller.js) | Empty State (.empty-state) | Badge (.badge-dot, .badge-notification)
</p>
<p class="tw:mb-0 tw:text-sm">
A right-hand drawer surfacing application status changes, document requests, and event
reminders for parents/applicants — infrequent, often first-time users with no login. Rows are
grouped by day, unread rows carry a surface-tint wash + link-blue dot, and every row is a real
button whose accessible name announces its read state. Requires
<code>notification_centre_controller.js</code> for mark-read / mark-all-read — no fetch, the
host page owns the data.
</p>
</div>
<!-- ============================================
Section 1: Mixed read/unread, two day groups
============================================ -->
<div class="tw:border-t tw:pt-6">
<h2 class="h4 tw:mb-4">Mixed Read / Unread</h2>
<div class="callout tw:mb-4">
<p class="tw:mb-0 tw:text-sm">
<strong>Default:</strong> Two day groups ("Today", "Yesterday"). 3 of 5 rows are unread
(surface-tint wash + link-blue dot before the timestamp). Clicking a row marks it read;
"Mark all as read" clears the rest. The bell's <code>.badge-notification</code> count and
<code>aria-label</code> stay in sync with the live unread count — there is no separate
counter to desync.
</p>
</div>
<div data-controller="drawer notification-centre">
<button class="btn btn-icon btn-outline-secondary tw:relative notification-centre-trigger"
type="button" data-action="click->drawer#open"
data-notification-centre-target="trigger"
data-label-base="Notifications" aria-label="Notifications, 3 unread" aria-expanded="false">
<i class="fa-regular fa-bell" aria-hidden="true"></i>
<span class="badge badge-danger badge-sm badge-circle badge-notification"
data-notification-centre-target="badge">3</span>
</button>
<div class="drawer-backdrop" data-drawer-target="backdrop"
data-action="click->drawer#close" aria-hidden="true"></div>
<div class="drawer notification-centre" data-drawer-target="panel"
role="dialog" aria-modal="true"
aria-labelledby="nc-mixed-title" aria-hidden="true">
<div class="drawer-header">
<h2 class="drawer-title" id="nc-mixed-title">Notifications</h2>
<button class="btn btn-icon btn-tertiary" type="button"
data-action="click->drawer#close" aria-label="Close notifications">
<i class="fa-solid fa-xmark"></i>
</button>
</div>
<div class="drawer-body">
<p class="tw:sr-only" role="status" aria-live="polite" data-notification-centre-target="status"></p>
<h3 class="h6 notification-centre-group">Today</h3>
<button type="button" class="notification-centre-item notification-centre-item-unread"
data-notification-centre-target="item" data-action="click->notification-centre#markRead"
data-notification-id="n1"
aria-label="Unread: St Mary's Academy requested a document. 2 hours ago."
data-read-label="St Mary's Academy requested a document. 2 hours ago.">
<span class="notification-centre-item-icon tw:bg-state-info-bg tw:text-state-info-ink">
<i class="fa-regular fa-file-lines" aria-hidden="true"></i>
</span>
<span class="notification-centre-item-body">
<span class="tw:text-body-s tw:leading-body-s tw:font-semibold tw:text-neutral-900">St Mary's Academy requested a document</span>
<span class="tw:text-body-s tw:leading-body-s tw:text-neutral-700">Upload a copy of Oscar's birth certificate to continue his application.</span>
<span class="notification-centre-item-time badge-dot">2 hours ago</span>
</span>
</button>
<button type="button" class="notification-centre-item notification-centre-item-unread"
data-notification-centre-target="item" data-action="click->notification-centre#markRead"
data-notification-id="n2"
aria-label="Unread: Application status updated. 5 hours ago."
data-read-label="Application status updated. 5 hours ago.">
<span class="notification-centre-item-icon tw:bg-state-success-bg tw:text-state-success-ink">
<i class="fa-regular fa-circle-check" aria-hidden="true"></i>
</span>
<span class="notification-centre-item-body">
<span class="tw:text-body-s tw:leading-body-s tw:font-semibold tw:text-neutral-900">Application status updated</span>
<span class="tw:text-body-s tw:leading-body-s tw:text-neutral-700">Greenford Sixth Form moved Ben's application to Offer Made.</span>
<span class="notification-centre-item-time badge-dot">5 hours ago</span>
</span>
</button>
<h3 class="h6 notification-centre-group">Yesterday</h3>
<button type="button" class="notification-centre-item notification-centre-item-unread"
data-notification-centre-target="item" data-action="click->notification-centre#markRead"
data-notification-id="n3"
aria-label="Unread: New reply from Cardinal Vaughan Memorial School. Yesterday, 9:05am."
data-read-label="New reply from Cardinal Vaughan Memorial School. Yesterday, 9:05am.">
<span class="notification-centre-item-icon tw:bg-state-info-bg tw:text-state-info-ink">
<i class="fa-regular fa-comment-dots" aria-hidden="true"></i>
</span>
<span class="notification-centre-item-body">
<span class="tw:text-body-s tw:leading-body-s tw:font-semibold tw:text-neutral-900">New reply from Cardinal Vaughan Memorial School</span>
<span class="tw:text-body-s tw:leading-body-s tw:text-neutral-700">The admissions team answered your question about transport routes.</span>
<span class="notification-centre-item-time badge-dot">Yesterday, 9:05am</span>
</span>
</button>
<button type="button" class="notification-centre-item"
data-notification-centre-target="item" data-action="click->notification-centre#markRead"
data-notification-id="n4"
aria-label="Open Day booking confirmed. Yesterday, 4:12pm.">
<span class="notification-centre-item-icon tw:bg-state-warning-bg tw:text-state-warning-ink">
<i class="fa-regular fa-calendar-check" aria-hidden="true"></i>
</span>
<span class="notification-centre-item-body">
<span class="tw:text-body-s tw:leading-body-s tw:font-semibold tw:text-neutral-900">Open Day booking confirmed</span>
<span class="tw:text-body-s tw:leading-body-s tw:text-neutral-700">You're booked in for King's College Maths School's Open Day, Thu 14 Aug, 6:00–8:00pm.</span>
<span class="notification-centre-item-time">Yesterday, 4:12pm</span>
</span>
</button>
<button type="button" class="notification-centre-item"
data-notification-centre-target="item" data-action="click->notification-centre#markRead"
data-notification-id="n5"
aria-label="Application update: not offered. Yesterday, 11:30am.">
<span class="notification-centre-item-icon tw:bg-state-danger-bg tw:text-state-danger-ink">
<i class="fa-regular fa-circle-xmark" aria-hidden="true"></i>
</span>
<span class="notification-centre-item-body">
<span class="tw:text-body-s tw:leading-body-s tw:font-semibold tw:text-neutral-900">Application update: not offered</span>
<span class="tw:text-body-s tw:leading-body-s tw:text-neutral-700">Manchester Communication Academy was unable to offer Tom a place this year.</span>
<span class="notification-centre-item-time">Yesterday, 11:30am</span>
</span>
</button>
</div>
<div class="drawer-footer notification-centre-footer">
<button class="btn btn-tertiary btn-sm" type="button"
data-action="click->notification-centre#markAllRead">Mark all as read</button>
</div>
</div>
</div>
<div class="tw:mt-4 tw:text-sm tw:text-neutral-700">
<code><div class="drawer notification-centre"><div class="drawer-body"><h3 class="h6 notification-centre-group">Today</h3><button class="notification-centre-item notification-centre-item-unread">...</button></div></div></code>
</div>
</div>
<!-- ============================================
Section 2: Empty state
============================================ -->
<div class="tw:border-t tw:pt-6">
<h2 class="h4 tw:mb-4">Empty State</h2>
<div class="callout tw:mb-4">
<p class="tw:mb-0 tw:text-sm">
<strong>No notifications:</strong> Composes <code>.empty-state</code> inside
<code>.notification-centre-empty</code>, which stretches to fill and center in the
remaining drawer height. The footer is omitted entirely — there is nothing to mark as
read — matching the Drawer pattern's own "Without Footer" precedent.
</p>
</div>
<div data-controller="drawer notification-centre">
<button class="btn btn-icon btn-outline-secondary tw:relative notification-centre-trigger"
type="button" data-action="click->drawer#open"
data-notification-centre-target="trigger"
data-label-base="Notifications" aria-label="Notifications" aria-expanded="false">
<i class="fa-regular fa-bell" aria-hidden="true"></i>
</button>
<div class="drawer-backdrop" data-drawer-target="backdrop"
data-action="click->drawer#close" aria-hidden="true"></div>
<div class="drawer notification-centre" data-drawer-target="panel"
role="dialog" aria-modal="true"
aria-labelledby="nc-empty-title" aria-hidden="true">
<div class="drawer-header">
<h2 class="drawer-title" id="nc-empty-title">Notifications</h2>
<button class="btn btn-icon btn-tertiary" type="button"
data-action="click->drawer#close" aria-label="Close notifications">
<i class="fa-solid fa-xmark"></i>
</button>
</div>
<div class="drawer-body">
<div class="notification-centre-empty empty-state">
<i class="fa-regular fa-bell empty-state-icon" aria-hidden="true"></i>
<h3 class="empty-state-title">No notifications yet</h3>
<p class="empty-state-text">
You'll see updates here as soon as a school responds, requests a document, or an
event is coming up.
</p>
<div class="empty-state-actions">
<a href="#" class="btn btn-secondary btn-sm" type="button">View your applications</a>
</div>
</div>
</div>
</div>
</div>
<div class="tw:mt-4 tw:text-sm tw:text-neutral-700">
<code><div class="notification-centre-empty empty-state"><i class="fa-regular fa-bell empty-state-icon"></i><h3 class="empty-state-title">No notifications yet</h3>...</div></code>
</div>
</div>
<!-- ============================================
Section 3: 9+ badge overflow
============================================ -->
<div class="tw:border-t tw:pt-6">
<h2 class="h4 tw:mb-4">9+ Badge Overflow</h2>
<div class="callout tw:mb-4">
<p class="tw:mb-0 tw:text-sm">
<strong>Overflow:</strong> 10 unread rows — the bell badge and its <code>aria-label</code>
cap the displayed count at <code>9+</code> rather than growing the circle. (Checked
<code>components/badge.css</code>: <code>.badge-notification-ceil</code> is a flush-to-top
<em>position</em> variant, not a numeric-overflow variant — overflow is handled entirely
by capping the badge's text content, the same idiom already shown in the Badge preview's
"99+" example.) Use "Mark all as read" to watch the badge collapse and hide.
</p>
</div>
<div data-controller="drawer notification-centre">
<button class="btn btn-icon btn-outline-secondary tw:relative notification-centre-trigger"
type="button" data-action="click->drawer#open"
data-notification-centre-target="trigger"
data-label-base="Notifications" aria-label="Notifications, 9+ unread" aria-expanded="false">
<i class="fa-regular fa-bell" aria-hidden="true"></i>
<span class="badge badge-danger badge-sm badge-circle badge-notification"
data-notification-centre-target="badge">9+</span>
</button>
<div class="drawer-backdrop" data-drawer-target="backdrop"
data-action="click->drawer#close" aria-hidden="true"></div>
<div class="drawer notification-centre" data-drawer-target="panel"
role="dialog" aria-modal="true"
aria-labelledby="nc-overflow-title" aria-hidden="true">
<div class="drawer-header">
<h2 class="drawer-title" id="nc-overflow-title">Notifications</h2>
<button class="btn btn-icon btn-tertiary" type="button"
data-action="click->drawer#close" aria-label="Close notifications">
<i class="fa-solid fa-xmark"></i>
</button>
</div>
<div class="drawer-body">
<p class="tw:sr-only" role="status" aria-live="polite" data-notification-centre-target="status"></p>
<h3 class="h6 notification-centre-group">Today</h3>
<button type="button" class="notification-centre-item notification-centre-item-unread"
data-notification-centre-target="item" data-action="click->notification-centre#markRead"
data-notification-id="o1"
aria-label="Unread: Greenford Sixth Form requested a reference letter. Just now."
data-read-label="Greenford Sixth Form requested a reference letter. Just now.">
<span class="notification-centre-item-icon tw:bg-state-info-bg tw:text-state-info-ink">
<i class="fa-regular fa-file-lines" aria-hidden="true"></i>
</span>
<span class="notification-centre-item-body">
<span class="tw:text-body-s tw:leading-body-s tw:font-semibold tw:text-neutral-900">Greenford Sixth Form requested a reference letter</span>
<span class="notification-centre-item-time badge-dot">Just now</span>
</span>
</button>
<button type="button" class="notification-centre-item notification-centre-item-unread"
data-notification-centre-target="item" data-action="click->notification-centre#markRead"
data-notification-id="o2"
aria-label="Unread: King's College Maths School moved you to Interview. 8 minutes ago."
data-read-label="King's College Maths School moved you to Interview. 8 minutes ago.">
<span class="notification-centre-item-icon tw:bg-state-success-bg tw:text-state-success-ink">
<i class="fa-regular fa-circle-check" aria-hidden="true"></i>
</span>
<span class="notification-centre-item-body">
<span class="tw:text-body-s tw:leading-body-s tw:font-semibold tw:text-neutral-900">King's College Maths School moved you to Interview</span>
<span class="notification-centre-item-time badge-dot">8 minutes ago</span>
</span>
</button>
<button type="button" class="notification-centre-item notification-centre-item-unread"
data-notification-centre-target="item" data-action="click->notification-centre#markRead"
data-notification-id="o3"
aria-label="Unread: New message from Hills Road Sixth Form College. 22 minutes ago."
data-read-label="New message from Hills Road Sixth Form College. 22 minutes ago.">
<span class="notification-centre-item-icon tw:bg-state-info-bg tw:text-state-info-ink">
<i class="fa-regular fa-comment-dots" aria-hidden="true"></i>
</span>
<span class="notification-centre-item-body">
<span class="tw:text-body-s tw:leading-body-s tw:font-semibold tw:text-neutral-900">New message from Hills Road Sixth Form College</span>
<span class="notification-centre-item-time badge-dot">22 minutes ago</span>
</span>
</button>
<button type="button" class="notification-centre-item notification-centre-item-unread"
data-notification-centre-target="item" data-action="click->notification-centre#markRead"
data-notification-id="o4"
aria-label="Unread: Open Day booking confirmed with Cardinal Vaughan Memorial School. 40 minutes ago."
data-read-label="Open Day booking confirmed with Cardinal Vaughan Memorial School. 40 minutes ago.">
<span class="notification-centre-item-icon tw:bg-state-warning-bg tw:text-state-warning-ink">
<i class="fa-regular fa-calendar-check" aria-hidden="true"></i>
</span>
<span class="notification-centre-item-body">
<span class="tw:text-body-s tw:leading-body-s tw:font-semibold tw:text-neutral-900">Open Day booking confirmed with Cardinal Vaughan Memorial School</span>
<span class="notification-centre-item-time badge-dot">40 minutes ago</span>
</span>
</button>
<button type="button" class="notification-centre-item notification-centre-item-unread"
data-notification-centre-target="item" data-action="click->notification-centre#markRead"
data-notification-id="o5"
aria-label="Unread: Manchester Communication Academy requested proof of address. 1 hour ago."
data-read-label="Manchester Communication Academy requested proof of address. 1 hour ago.">
<span class="notification-centre-item-icon tw:bg-state-info-bg tw:text-state-info-ink">
<i class="fa-regular fa-file-lines" aria-hidden="true"></i>
</span>
<span class="notification-centre-item-body">
<span class="tw:text-body-s tw:leading-body-s tw:font-semibold tw:text-neutral-900">Manchester Communication Academy requested proof of address</span>
<span class="notification-centre-item-time badge-dot">1 hour ago</span>
</span>
</button>
<button type="button" class="notification-centre-item notification-centre-item-unread"
data-notification-centre-target="item" data-action="click->notification-centre#markRead"
data-notification-id="o6"
aria-label="Unread: St Mary's Academy moved you to Offer Made. 2 hours ago."
data-read-label="St Mary's Academy moved you to Offer Made. 2 hours ago.">
<span class="notification-centre-item-icon tw:bg-state-success-bg tw:text-state-success-ink">
<i class="fa-regular fa-circle-check" aria-hidden="true"></i>
</span>
<span class="notification-centre-item-body">
<span class="tw:text-body-s tw:leading-body-s tw:font-semibold tw:text-neutral-900">St Mary's Academy moved you to Offer Made</span>
<span class="notification-centre-item-time badge-dot">2 hours ago</span>
</span>
</button>
<button type="button" class="notification-centre-item notification-centre-item-unread"
data-notification-centre-target="item" data-action="click->notification-centre#markRead"
data-notification-id="o7"
aria-label="Unread: Reminder: Greenford Sixth Form's Open Evening starts in 2 days. 3 hours ago."
data-read-label="Reminder: Greenford Sixth Form's Open Evening starts in 2 days. 3 hours ago.">
<span class="notification-centre-item-icon tw:bg-state-warning-bg tw:text-state-warning-ink">
<i class="fa-regular fa-calendar-days" aria-hidden="true"></i>
</span>
<span class="notification-centre-item-body">
<span class="tw:text-body-s tw:leading-body-s tw:font-semibold tw:text-neutral-900">Reminder: Greenford Sixth Form's Open Evening starts in 2 days</span>
<span class="notification-centre-item-time badge-dot">3 hours ago</span>
</span>
</button>
<button type="button" class="notification-centre-item notification-centre-item-unread"
data-notification-centre-target="item" data-action="click->notification-centre#markRead"
data-notification-id="o8"
aria-label="Unread: King's College Maths School requested a document. 4 hours ago."
data-read-label="King's College Maths School requested a document. 4 hours ago.">
<span class="notification-centre-item-icon tw:bg-state-info-bg tw:text-state-info-ink">
<i class="fa-regular fa-file-lines" aria-hidden="true"></i>
</span>
<span class="notification-centre-item-body">
<span class="tw:text-body-s tw:leading-body-s tw:font-semibold tw:text-neutral-900">King's College Maths School requested a document</span>
<span class="notification-centre-item-time badge-dot">4 hours ago</span>
</span>
</button>
<button type="button" class="notification-centre-item notification-centre-item-unread"
data-notification-centre-target="item" data-action="click->notification-centre#markRead"
data-notification-id="o9"
aria-label="Unread: Hills Road Sixth Form College moved you to Waitlisted. 5 hours ago."
data-read-label="Hills Road Sixth Form College moved you to Waitlisted. 5 hours ago.">
<span class="notification-centre-item-icon tw:bg-state-warning-bg tw:text-state-warning-ink">
<i class="fa-regular fa-triangle-exclamation" aria-hidden="true"></i>
</span>
<span class="notification-centre-item-body">
<span class="tw:text-body-s tw:leading-body-s tw:font-semibold tw:text-neutral-900">Hills Road Sixth Form College moved you to Waitlisted</span>
<span class="notification-centre-item-time badge-dot">5 hours ago</span>
</span>
</button>
<button type="button" class="notification-centre-item notification-centre-item-unread"
data-notification-centre-target="item" data-action="click->notification-centre#markRead"
data-notification-id="o10"
aria-label="Unread: New message from Cardinal Vaughan Memorial School. 6 hours ago."
data-read-label="New message from Cardinal Vaughan Memorial School. 6 hours ago.">
<span class="notification-centre-item-icon tw:bg-state-info-bg tw:text-state-info-ink">
<i class="fa-regular fa-comment-dots" aria-hidden="true"></i>
</span>
<span class="notification-centre-item-body">
<span class="tw:text-body-s tw:leading-body-s tw:font-semibold tw:text-neutral-900">New message from Cardinal Vaughan Memorial School</span>
<span class="notification-centre-item-time badge-dot">6 hours ago</span>
</span>
</button>
</div>
<div class="drawer-footer notification-centre-footer">
<button class="btn btn-tertiary btn-sm" type="button"
data-action="click->notification-centre#markAllRead">Mark all as read</button>
</div>
</div>
</div>
<div class="tw:mt-4 tw:text-sm tw:text-neutral-700">
<code><span class="badge badge-danger badge-sm badge-circle badge-notification" data-notification-centre-target="badge">9+</span></code>
</div>
</div>
<!-- ============================================
Section 4: Quick Reference
============================================ -->
<div class="tw:border-t tw:pt-6">
<h2 class="h4 tw:mb-4">Quick Reference</h2>
<div class="callout">
<p class="tw:mb-1 tw:text-sm tw:font-mono">
<strong>Container:</strong> .drawer .notification-centre (composed together on the panel)<br>
<strong>Group:</strong> .h6 .notification-centre-group (composed together on the day heading)<br>
<strong>Row:</strong> .notification-centre-item | .notification-centre-item-unread | .notification-centre-item-icon | .notification-centre-item-body | .notification-centre-item-time<br>
<strong>Empty:</strong> .notification-centre-empty .empty-state (composed together)<br>
<strong>Footer:</strong> .drawer-footer .notification-centre-footer (composed together)<br>
<strong>Trigger:</strong> .btn .btn-icon .notification-centre-trigger + .badge .badge-notification<br>
<strong>Controller:</strong> data-controller="drawer notification-centre" | data-action="click->notification-centre#markRead" | data-action="click->notification-centre#markAllRead"<br>
<strong>Events:</strong> notification-centre:read { id, unreadCount } | notification-centre:allRead { unreadCount: 0 }
</p>
</div>
</div>
</div>