Idea request form — Contact block

Pro

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

Usage

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.

PropTypeDescription
title*stringWordsthe roadmap’s title ("What we are preparing")
leadstringWordsone sentence on how the merchant plans and what a status means
form*Formthe form to propose an idea
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Form form · 5 props
PropTypeDescription
title*stringWordsthe form’s title ("Suggest an idea")
stepsstring[]Wordsone step of how an idea is handled
submitLabel*stringWordswhat the button does
consent*stringWordswhat happens to the message
action*stringActionthe page action that receives the idea
Options options · 3 props
PropTypeDescription
eyebrowstringWordswhat this is ("Roadmap")
notestringWordswhat a bar or a status measures
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
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: 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.

All 25 contact blocks