Inquiry picker tiles then form — Contact block

Pro

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

Usage

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.

PropTypeDescription
title*stringWordswhat the page offers ("Let’s talk about your request")
leadstringWordsone sentence on who answers and how
topics*Topic[]the kinds of request, two to six, the most frequent first
form*Formthe inquiry form: where it posts and its fields’ words
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Topic topics[] · 5 props
PropTypeDescription
id*stringDesignthe value the form sends for this topic ("project")
label*stringWordsthe kind of request ("A made-to-measure project")
text*stringWordsone sentence on what it covers
delaystringWordsthe usual reply time for this kind of request, measured by the merchant ("Reply within 48 h")
directDirectthe direct way instead of the form: its words and the page action
Direct topics[].direct · 3 props
PropTypeDescription
label*stringWordsthe direct way, instead of the form ("Book a 20-min call")
action*stringActiona named action of the page
recordRecord<string, unknown>Datathe record the action opens, if any
Form form · 7 props
PropTypeDescription
action*stringActionthe page action the form posts to
submit*stringWordsthe button ("Send my request")
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")
topicLabelstringWordsthe question over the topics ("Your request is about")
consentstringWordsthe line under the button on how the message is used
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: 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.

All 25 contact blocks