Callback request steps form — Contact block
Procontact-callback-request-steps-form · for contact pages
Callback request steps form
Reassuring steps beside a form that asks for a call back at a slot: services and appointments
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/contact-callback-request-steps-formUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import ContactCallbackRequestStepsForm from '@/components/trame/blocks/contact/contact-callback-request-steps-form.vue'
const props = {
title: "Write to us",
lead: "Every message is read by a person on the team, not a bot.",
hours: [
{
label: "Tuesday – Friday",
value: "10 a.m. – 6 p.m."
},
{
label: "Saturday",
value: "10 a.m. – 5 p.m."
}
],
steps: [
"We read your message the same day.",
"A person on the team replies by email."
],
form: {
action: "contact",
submit: "Send message",
nameLabel: "Your name",
emailLabel: "Your email address",
messageLabel: "Your message",
slotLabel: "Preferred time",
slots: [
"Tuesday, between 10 a.m. and noon",
"Thursday, between 2 and 5 p.m."
],
consent: "Your message is read only by the team and never passed on to anyone else."
},
cta: {
label: "Book an appointment",
action: "booking"
}
}
</script>
<template>
<ContactCallbackRequestStepsForm v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordswhat the page offers ("Write to us") |
| lead | string | Wordsone sentence on who answers and how |
| hours | Hour[] | opening or answering hours: hidden when absent |
| steps | string[] | Wordsone step of what happens next |
| form* | Form | the callback form: where it posts and its fields’ words |
| cta | Cta | the call to action: its words and the page action it runs |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Hour hours[] · 2 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsthe days or the place ("Monday – Friday") |
| value* | string | Wordsthe hours ("9 am – 6 pm") |
Form form · 8 props
| Prop | Type | Description |
|---|---|---|
| action* | string | Actionthe page action the form posts to |
| submit* | string | Wordsthe button ("Send the message") |
| nameLabel* | string | Wordsthe name field’s label ("Your name") |
| emailLabel* | string | Wordsthe e-mail field’s label ("Your email address") |
| messageLabel* | string | Wordsthe message field’s label ("Your message") |
| slotLabel | string | Wordsthe slot field’s label ("Preferred slot") |
| slots | string[] | Wordsone slot the merchant offers |
| consent | string | Wordsthe line under the button on how the message is used |
Cta cta · 3 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat happens ("Book an appointment") |
| action* | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action opens, if any |
Options options · 1 props
| Prop | Type | Description |
|---|---|---|
| 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 |
| 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
- Subtle motion: one short reveal; still under reduced motion
- Real buttons and links, a visible focus
- Asks your app through actions:
form,cta
A contact section, for contact pages; it uses @lucide/vue, @vueuse/core, class-variance-authority, clsx, reka-ui, tailwind-merge.
More contact blocks
- Community channels: Channel cards with a clear destination, using the merchant's own community only.
- Community guidelines split: A quiet introduction and figures beside numbered rules, the merchant's own only.
- Community quote band: A member quotation as the invitation, the merchant's own collected quote only.
- Community stats banner: A compact invitation with people and supplied figures, the merchant's own only.
- Contributor call commission cards: Commission formats with explicit scope rows, using the merchant's own rates and delays only.
- Contributor call split steps: Topics beside an ordered pitch process, with the merchant's own terms only.
- Directory: a table of topic, who answers, address and reply time: a larger house with many inboxes, looked up rather than read.
- Feedback form criteria rows: an overall rating on top, then a ruled list of aspects each with its own rating, one comment at the end: when the merchant wants a mark per aspect (delivery, packaging, support).