Intake form — Contact block
Procontact-intake-form · for landing, home, catalog, account pages
Intake form
A request with picks and notes (custom order, repair, trade): the fields and one send button
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-intake-formUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import ContactIntakeForm from '@/components/trame/blocks/contact/contact-intake-form.vue'
const props = {
title: "International shipping",
lead: "We ship from the United States to 28 countries. The rates and delivery times below are the shop’s own.",
fields: [
{
name: "name",
label: "Your name",
kind: "text"
},
{
name: "email",
label: "Your email",
kind: "email"
}
],
submit: "custom-request",
footnote: "Rates in effect as of March 1, 2026. They may change for future orders, never for an order already paid.",
options: {
submitLabel: "Send request"
}
}
</script>
<template>
<ContactIntakeForm v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe service or policy, said plainly ("International delivery", "Repairs") |
| lead | string | Wordswhat this page tells, in one or two sentences |
| fields* | Field[] | the intake form |
| submit | string | Actionthe action the intake form posts to |
| footnote | string | Wordsa small closing line, the merchant’s own words (the rounding, the date of the rates) |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Field fields[] · 5 props
| Prop | Type | Description |
|---|---|---|
| name* | string | Designthe field’s name |
| label* | string | Wordsthe field’s name, as shown |
| kind | 'text' | 'email' | 'textarea' | 'select' | what kind of field it is: text, email, textarea, select |
| choices | string[] | Wordsthe options of a select |
| hint | string | Wordsone line helping to answer |
Options options · 2 props
| Prop | Type | Description |
|---|---|---|
| submitLabel | string | Wordsthe intake form’s button ("Send the request") |
| 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 |
| 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:
submit
A contact section, for landing, home, catalog, account pages; it uses @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 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.
- 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.
- 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.