Support cards form — Contact block
Procontact-support-cards-form · for app, account pages
Support cards form
Reaching a person: the channels with their hours, then the message form to write to 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/contact-support-cards-formUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import ContactSupportCardsForm from '@/components/trame/blocks/contact/contact-support-cards-form.vue'
const props = {
title: "Help with your workspace",
items: [
{
id: "profil",
label: "Set up your profile",
text: "Fill in the details your team needs.",
done: true,
keys: [
"G",
"P"
],
group: "Navigation",
link: {
label: "Open",
action: "profile"
}
},
{
id: "documents",
label: "Find your documents",
text: "Organize your files in a shared folder.",
done: false,
keys: [
"G",
"D"
],
group: "Navigation",
link: {
label: "Open",
action: "files"
}
}
],
contact: {
label: "Send message",
action: "support"
},
channels: [
{
label: "Illustrated guides",
text: "Most answers are already written up, step by step.",
meta: "84 guides in English",
icon: "book",
action: "help-guides"
},
{
label: "Live chat",
text: "A quick question, answered by a person on our team.",
meta: "Monday to Friday, 9 a.m. – 6 p.m.",
icon: "chat",
action: "help-chat"
}
],
options: {
channelsLabel: "Choose a channel",
subjectLabel: "Subject",
messageLabel: "Your message",
emailLabel: "Your email address"
}
}
</script>
<template>
<ContactSupportCardsForm v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe section’s heading |
| items* | Item[] | Datathe items shown, in order |
| contact | Contact | the contact action: its words and the page action it runs |
| channels* | Channel[] | the ways to reach a person, for "contact" |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Item items[] · 9 props
| Prop | Type | Description |
|---|---|---|
| id* | string | Datathe item’s id |
| label* | string | Wordsthe item’s name, as shown |
| text | string | Wordsthe item’s text |
| done | boolean | true: this item is completed |
| keys | string[] | Wordsthe keyboard keys of the shortcut, e.g. "Ctrl", "K" |
| group | string | Wordsthe heading it is grouped under |
| status | string | Wordsthe item’s status, in the host’s words |
| date | string | Wordsthe date, as the merchant writes it |
| link | Link | the link: its words and the page action it runs |
Link items[].link · 3 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsthe words on the button or link |
| action* | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action applies to, passed to the host with it, if any |
Contact contact · 3 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsthe words on the button or link |
| action* | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action applies to, passed to the host with it, if any |
Channel channels[] · 5 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsthe channel ("Live chat") |
| text | string | Wordswhat it is good for, one sentence |
| meta | string | Wordswhen it is answered or how fast, as the host wrote it ("Monday to Friday, 9 am – 6 pm") |
| icon | string | Designchat, mail, book or phone |
| action* | string | Actionopens that channel |
Options options · 5 props
| Prop | Type | Description |
|---|---|---|
| mood | 'inverse' | 'brand' | 'warm' | 'tint' | string | a band of the page that redefines the theme surfaces inside it |
| channelsLabel | string | Wordsthe label above the channels ("Choose a channel") |
| subjectLabel | string | Wordsthe subject field’s label of "contact" ("Subject") |
| messageLabel | string | Wordsthe message field’s label of "contact" ("Your message") |
| emailLabel | string | Wordsthe email field’s label of "contact" |
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:
items[].link,contact,channels[] - Reads
rowsfrom your app
A contact section, for app, account pages; it uses @lucide/vue, @vueuse/core, class-variance-authority, clsx, reka-ui, tailwind-merge.
Built with
The components this block is made of; each one installs on its own too.
More contact blocks
- Inquiry picker stepper panel: three numbered steps at the left (the request, the details, the message) and one panel at the right with back and continue: a longer request, a quote or a project brief; reply times are the merchant’s own measured ones.
- Inquiry picker tiles then form: a row of choice tiles, the chosen one lit, the form under them with that topic’s reply time and direct way: a contact or demo page with two to six kinds of request; reply times are the merchant’s own measured ones.
- Intake form: a request with picks and notes (custom order, repair, trade): the fields and one send button.
- Invite email only: one large address and a secondary action: a tiny business with a single inbox.
- Invite panel: one tinted panel: the main address as a large button, the people who answer as avatars, the hours in a strip below: a warm single invitation to write.
- People cards: portrait cards of the named people with what they answer: a small team that wants to be reached directly.
- Routes channels hours: channel rows with their status beside an hours card: when phone, chat and mail each have hours.
- Routes grid: one card per inbox with who answers and how fast: when different questions go to different people.