<script setup lang="ts"> import ErrorExpiredLinkForm from '@/components/trame/blocks/error/error-expired-link-form.vue'
const props = { code: "Link expired", title: "This sign-in link has done its job", text: "Sign-in links only last fifteen minutes, so a forwarded email never turns into a key. Yours ran out; getting a new one takes a single click.", home: { label: "Back to home", action: "home" }, facts: [ { label: "Link sent", value: "9:14 a.m." }, { label: "First opened", value: "9:47 a.m." } ], submit: "sign-in-link", options: { emailLabel: "Your email address", submitLabel: "Send me a new link", note: "A new link makes all the old ones unusable." } } </script>
import { ErrorExpiredLinkForm } from '@/components/trame/blocks/error/error-expired-link-form'
const props = { code: "Link expired", title: "This sign-in link has done its job", text: "Sign-in links only last fifteen minutes, so a forwarded email never turns into a key. Yours ran out; getting a new one takes a single click.", home: { label: "Back to home", action: "home" }, facts: [ { label: "Link sent", value: "9:14 a.m." }, { label: "First opened", value: "9:47 a.m." } ], submit: "sign-in-link", options: { emailLabel: "Your email address", submitLabel: "Send me a new link", note: "A new link makes all the old ones unusable." } }
export function Section() { return <ErrorExpiredLinkForm {...props} /> }
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
facts*
Fact[]
Datawhat the app recorded about a dead link (sent, opened, expired)
submit*
string
Actionthe action an email form posts to (a fresh link)
options
Options
the block’s settings: layout choices and secondary words, read by every variant
Homehome · 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
Factfacts[] · 2 props
Prop
Type
Description
label*
string
Wordswhat the value is about
value*
string
Wordsthe value, as the merchant states it
Optionsoptions · 7 props
Prop
Type
Description
emailLabel
string
Wordsthe email field’s label
submitLabel
string
Wordsthe email form’s button ("Send me a new link")
note
string
Wordsthe reassurance under the form or the request ("A new link makes the old ones unusable")
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
Contactoptions.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
Reportoptions.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
Statusoptions.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, submit, options.contact, options.report, options.status
Reads categories from your app
A error section, for any pages; it uses @lucide/vue, @vueuse/core, class-variance-authority, clsx, reka-ui, tailwind-merge.
More error blocks
Access denied gatekeeper card: a page the account cannot open: who is signed in, who can grant the access, and the way to ask.
Message centered: a 404 or 500 that keeps to the point: a big code, the reason, the way home.
Page full bleed: a page with one strong picture: the words laid over it on a scrim.
Recovery search links: a lost visitor on a shop with a catalogue: a search field and helpful links, plus a way to report a broken link.
Way back split image: a page with room for the shop’s mood: the words and the ways back on one side, its picture on the other.