Maintenance notice — Status block
Prostatus-maintenance-notice · for any pages
Maintenance notice
A planned closure: the merchant’s message, the return time only if the merchant gave one, the way to reach them
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/status-maintenance-noticeUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import StatusMaintenanceNotice from '@/components/trame/blocks/status/status-maintenance-notice.vue'
const props = {
code: "Maintenance",
title: "The shop is taking a break",
text: "We’re updating the catalog. Orders already placed aren’t affected.",
home: {
label: "Track an order",
action: "track"
},
options: {
returnAt: "Back Thursday, October 15, in the morning",
contact: {
label: "Write to the shop",
action: "contact"
}
}
}
</script>
<template>
<StatusMaintenanceNotice v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| code | string | Wordsthe short code or word that names the page ("404", "Offline") |
| title* | string | Wordswhat happened, plainly ("This page cannot be found") |
| text* | string | Wordsone sentence: why, and what the visitor can do |
| home* | Home | the link home: its words and the page action it runs |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Home home · 3 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat happens ("Back to the home page") |
| action* | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action opens (a category), if any |
Options options · 5 props
| Prop | Type | Description |
|---|---|---|
| returnAt | string | Wordswhen the shop is back, only as the merchant wrote it: never guessed |
| contact | Contact | the contact action: its words and the page action it runs |
| report | Report | the report action: its words and the page action it runs |
| status | Status | the link to the status page: its words and the page action |
| mood | 'inverse' | 'brand' | 'warm' | 'tint' | string | a band of the page that redefines the theme surfaces inside it |
Contact options.contact · 3 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat happens ("Back to the home page") |
| action* | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action opens (a category), if any |
Report options.report · 3 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat happens ("Back to the home page") |
| action* | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action opens (a category), if any |
Status options.status · 3 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat happens ("Back to the home page") |
| action* | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action opens (a category), if any |
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 |
| 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:
home,options.contact,options.report,options.status
A status section, for any pages; it uses class-variance-authority, clsx, reka-ui, tailwind-merge.
More status blocks
- Board component list: the plain answer to "is it working?": a summary line, then one row per part of the service.
- Board region grid: a service run in several regions or sites: one card each with its state and its response time.
- Incident history ledger: A dated incident ledger beside the current service state, with the service’s own published updates only.
- Incident history timeline: something happened: each incident with its updates in order, and the parts still affected above.
- Known problems list: problems the merchant already knows about, each with its status and a workaround.
- Maintenance windows list: planned work announced ahead: dated windows with what they touch.
- Uptime history bars: a service that measures daily: a strip of days per part, disruptions marked, availability beside it.
- Uptime history table: A monitoring register comparing state, availability and response time, from the service’s own measurements only.