Directory — Contact block

Pro

contact-directory · for contact pages

Directory

A table of topic, who answers, address and reply time: a larger house with many inboxes, looked up rather than read

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-directory

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import ContactDirectory from '@/components/trame/blocks/contact/contact-directory.vue'

const props = {
title: "Write to us",
lead: "Every message is read by a person on the team, not a bot.",
routes: [
{
topic: "A question about an order",
address: "[email protected]",
who: "Noah and Sally",
delay: "Reply within 24 hours, Monday to Friday"
},
{
topic: "A repair",
address: "[email protected]",
who: "Ivy",
delay: "Reply within 3 business days"
}
],
people: [
{
name: "Noah Girard",
role: "Shop and advice",
scope: "Orders, shipping and advice on our designs",
address: "[email protected]",
delay: "Within 24 hours",
avatar: "https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=1600&q=80"
},
{
name: "Ivy Marchand",
role: "Seamstress",
scope: "Repairs and alterations",
address: "[email protected]",
delay: "Within 3 days",
avatar: "https://images.unsplash.com/photo-1580489944761-15a19d654956?w=1600&q=80"
}
],
hours: [
{
label: "Tuesday – Friday",
value: "10 a.m. – 6 p.m."
},
{
label: "Saturday",
value: "10 a.m. – 5 p.m."
}
]
}
</script>

<template>
<ContactDirectory 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
routes*Route[]who to contact for what, each a topic and a way to reach the team
peoplePeople[]Datanamed people a visitor can write to
hoursHour[]opening or answering hours: hidden when absent
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Route routes[] · 5 props
PropTypeDescription
topic*stringWordswhat it is for ("A question about an order")
address*stringWordsthe e-mail address, phone number or other way to reach them, exactly as it is
whostringWordswho answers
delaystringWordsthe usual reply time, measured by the merchant ("reply within 24 h")
badgestringWordsa status the merchant can stand behind ("Monday to Friday")
People people[] · 9 props
PropTypeDescription
idstring | numberDatathe record’s id in the tool that answers it
name*stringWordsthe person’s name
rolestringWordstheir role or job title
companystringWordswhere they work
avatarstringPicturea picture: a root-relative path (/media/…) or an absolute URL
urlstringDesigna page about them
scopestringWordswhat they answer ("Orders and deliveries")
addressstringWordstheir e-mail address or phone number
delaystringWordstheir usual reply time, as the merchant measures it ("within 24 h")
Hour hours[] · 2 props
PropTypeDescription
label*stringWordsthe days or the place ("Monday – Friday")
value*stringWordsthe hours ("9 am – 6 pm")
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
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

A contact section, for contact pages; it uses @lucide/vue.

More contact blocks

  • 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.
  • 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).
  • Feedback form panel: one card with the rating, the comment and the button: one or two questions after a visit, an order or a delivery.
  • Feedback form scale strip: the words beside wide 1-to-5 tracks that name the chosen level: a quick satisfaction pulse of one to three questions.
  • Feedback form steps: one question at a time under a progress bar, back and next at the foot: a survey of three to twelve questions.

All 25 contact blocks