Callback request steps form — Contact block

Pro

contact-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-form

Usage

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.

PropTypeDescription
title*stringWordswhat the page offers ("Write to us")
leadstringWordsone sentence on who answers and how
hoursHour[]opening or answering hours: hidden when absent
stepsstring[]Wordsone step of what happens next
form*Formthe callback form: where it posts and its fields’ words
ctaCtathe call to action: its words and the page action it runs
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Hour hours[] · 2 props
PropTypeDescription
label*stringWordsthe days or the place ("Monday – Friday")
value*stringWordsthe hours ("9 am – 6 pm")
Form form · 8 props
PropTypeDescription
action*stringActionthe page action the form posts to
submit*stringWordsthe button ("Send the message")
nameLabel*stringWordsthe name field’s label ("Your name")
emailLabel*stringWordsthe e-mail field’s label ("Your email address")
messageLabel*stringWordsthe message field’s label ("Your message")
slotLabelstringWordsthe slot field’s label ("Preferred slot")
slotsstring[]Wordsone slot the merchant offers
consentstringWordsthe line under the button on how the message is used
Cta cta · 3 props
PropTypeDescription
label*stringWordswhat happens ("Book an appointment")
action*stringActiona named action of the page
recordRecord<string, unknown>Datathe record the action opens, if any
Options options · 1 props
PropTypeDescription
mood'inverse' | 'brand' | 'warm' | 'tint' | stringa 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).

MemberWhat it is for
hrefthe address an action leads to, or null to hide what leads there
actruns a change (subscribe, add to cart, save) and answers { ok } or { ok: false, error }
canwhether the page has this action
Linkyour router’s link component
cartCountthe cart badge’s number
cartDrawerwhether your app has a cart drawer
cartOpenwhether the cart drawer is open
labelyour 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:

KeyEnglishFrench
newsletter.alreadyYou are already subscribed.Vous êtes déjà inscrit.
newsletter.doneDone: you are subscribed.C’est noté : vous êtes inscrit.
newsletter.invalidCheck the email address.Vérifiez l’adresse e-mail.
newsletter.tooManyToo 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).

All 25 contact blocks