Inquiry picker tiles then form — Contact block
Procontact-inquiry-picker-tiles-then-form · for contact, landing pages
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
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-inquiry-picker-tiles-then-formUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import ContactInquiryPickerTilesThenForm from '@/components/trame/blocks/contact/contact-inquiry-picker-tiles-then-form.vue'
const props = {
title: "Let’s talk about your request",
lead: "First choose what it’s about: your message goes straight to the right person.",
topics: [
{
id: "projet",
label: "A custom project",
text: "A table, a bookcase, a fitted space: tell us what you have in mind.",
delay: "Reply within 48 business hours",
direct: {
label: "Book a 20-minute call",
action: "booking"
}
},
{
id: "commande",
label: "An order in progress",
text: "A delivery date, an address to change, a late parcel.",
delay: "Same-day reply, Monday to Friday"
}
],
form: {
action: "contact",
submit: "Send my request",
nameLabel: "Your name",
emailLabel: "Your email address",
messageLabel: "Your message",
topicLabel: "Your request is about",
consent: "Your message is read only by the workshop team and is never shared with a third party."
}
}
</script>
<template>
<ContactInquiryPickerTilesThenForm 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 ("Let’s talk about your request") |
| lead | string | Wordsone sentence on who answers and how |
| topics* | Topic[] | the kinds of request, two to six, the most frequent first |
| form* | Form | the inquiry form: where it posts and its fields’ words |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Topic topics[] · 5 props
| Prop | Type | Description |
|---|---|---|
| id* | string | Designthe value the form sends for this topic ("project") |
| label* | string | Wordsthe kind of request ("A made-to-measure project") |
| text* | string | Wordsone sentence on what it covers |
| delay | string | Wordsthe usual reply time for this kind of request, measured by the merchant ("Reply within 48 h") |
| direct | Direct | the direct way instead of the form: its words and the page action |
Direct topics[].direct · 3 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsthe direct way, instead of the form ("Book a 20-min call") |
| action* | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action opens, if any |
Form form · 7 props
| Prop | Type | Description |
|---|---|---|
| action* | string | Actionthe page action the form posts to |
| submit* | string | Wordsthe button ("Send my request") |
| 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") |
| topicLabel | string | Wordsthe question over the topics ("Your request is about") |
| consent | string | Wordsthe line under the button on how the message is used |
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:
topics[].direct,form
A contact section, for contact, landing 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
- Form big contacts: a very large title and the main addresses in oversized type beside a form of underlined fields: a studio or a premium brand, where the contact lines are the invitation.
- Form split: the contact lines and what happens next beside a real form: the default contact page.
- Form stacked centered: a centred title, a row of up to three columns (ways to reach, hours, what happens next) above the whole form in a soft card: a short page with a standard form.
- Idea request form: a visitor can propose an idea: how ideas are handled beside a short form.
- 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.