Idea request form — Contact block
Procontact-idea-request-form · for roadmap, landing pages
Idea request form
A visitor can propose an idea: how ideas are handled beside a short form
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-idea-request-formUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import ContactIdeaRequestForm from '@/components/trame/blocks/contact/contact-idea-request-form.vue'
const props = {
title: "What we’re working on",
lead: "Each project’s status shows where it stands; it may change over the months.",
form: {
title: "Suggest an idea",
steps: [
"You describe what you’re missing.",
"We read every idea each week and reply to you."
],
submitLabel: "Send my idea",
consent: "Your address is only used to reply to you.",
action: "roadmap-idea"
},
options: {
eyebrow: "Roadmap"
}
}
</script>
<template>
<ContactIdeaRequestForm v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe roadmap’s title ("What we are preparing") |
| lead | string | Wordsone sentence on how the merchant plans and what a status means |
| form* | Form | the form to propose an idea |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Form form · 5 props
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe form’s title ("Suggest an idea") |
| steps | string[] | Wordsone step of how an idea is handled |
| submitLabel* | string | Wordswhat the button does |
| consent* | string | Wordswhat happens to the message |
| action* | string | Actionthe page action that receives the idea |
Options options · 3 props
| Prop | Type | Description |
|---|---|---|
| eyebrow | string | Wordswhat this is ("Roadmap") |
| note | string | Wordswhat a bar or a status measures |
| 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:
form.submit
A contact section, for roadmap, landing pages; it uses @vueuse/core, class-variance-authority, clsx, reka-ui, tailwind-merge.
More contact blocks
- 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.
- 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.
- 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.