Block 198 of 297
Closings Alert
Today's open, delayed, closed or remote status with icon and words, a message, update time and notes for buses and programs.
- Puck key
- ClosingsAlertBlock
- Export
- closingsAlertBlock
- React component
- <ClosingsAlert />
- Path
- components/puck/closings-alert-block.tsx
- Dependencies
- None
- License
- MIT
About this block
When to use it, how to write for it, and what to change in the code.
What it's for
A single status panel for today's school operations: open, delayed, closed or remote learning, shown as a large badge with an icon and words, a short message, the last-updated time and notes for programs such as buses and child care. The panel tint follows the status. Program notes run two columns on wider screens and one on phones.
- The top of a district home page on snow or emergency days
- A dedicated "School status" page that families bookmark
- A school site banner area during a planned remote learning day
Writing the content
- Change Today's status first, then the Message and Last updated time. Update Last updated on every edit so families can tell the notice is current.
- The delayed status reads "Delayed 2 hours" by default; use Status wording for anything else, like "Delayed 90 minutes".
- Program notes holds up to ten entries. Lead with what most families ask about, usually buses, then meals and child care.
Accessibility
- Each status pairs its color with a distinct icon and visible words, plus a hidden "Status:" prefix, so it is not conveyed by color alone (WCAG 1.4.1).
- The panel is static content with no live region, so a change is only announced when the page is reloaded. Publish updates as page edits rather than expecting an automatic alert.
Customizing the code
- The statuses object at the top of the file holds each status's default label, panel tint, badge colors and icon; add a status such as "Early dismissal" there and in the radio options.
Editor fields
What content editors see in the P1 sidebar when they select this block.
- Headingtext
- Heading levelselect
- Today's statusradio
- Status wordingtext
- Datetext
- Messagetextarea
- Last updatedtext
- Program notesarray
- Alerts link texttext
- Alerts linktext
- Contact notetextarea