Components
Contact template
A contact page that routes the message first: pick the topic and it says who answers and how soon. The form keeps what you typed if sending fails and confirms where the reply will go.
pnpm dlx shadcn@latest add @caliper/contact-templateWhen to use
Use it for
- Sales, support and press enquiries on one page.
- Teams with offices people visit.
Skip it when
- Signed-in customers with an account; give them in-app support.
Installation
pnpm dlx shadcn@latest add @caliper/contact-template
Adds its 16 files to components/ui/, each with its own stylesheet, and installs their packages. No account needed. The first part also adds Caliper UI’s tokens; import them once as in Installation.
Usage
This is the code behind the preview above.
import { FaqBlock } from "@/components/ui/faq-block" import { FooterBlock } from "@/components/ui/footer-block" import { ContactTemplate } from "@/components/ui/contact-template" const faqs: Parameters<typeof FaqBlock>[0] = { eyebrow: "FAQ", title: "Questions finance teams ask", lead: "Straight answers, each linked to the page that explains it in full.", ask: { label: "Ask us about it", href: "mailto:help@halden.app" }, items: [ { question: "Does Halden replace our accountant?", answer: "No. It prepares the close; your accountant reviews it and signs off, usually faster.", doc: { label: "How review works", href: "#" } }, { question: "Which banks and ledgers connect?", answer: "11,000 banks through Plaid, plus Xero, QuickBooks and NetSuite in both directions.", doc: { label: "Connections", href: "#" } }, { question: "What if a match is wrong?", answer: "Undo it in one click. Halden learns from the correction for that vendor.", doc: { label: "Corrections", href: "#" } }, { question: "Is our data used to train models?", answer: "Never. Your data is processed in eu-central-1 and deleted 30 days after you leave.", doc: { label: "Data processing terms", href: "#" } }, ] }; const columns = (product: string[], company: string[] = ["About", "Careers", "Contact"], resources: string[] = ["Docs", "Changelog", "Status"]) => [ { title: "Product", links: product.map((label) => ({ label, href: "#" })) }, { title: "Resources", links: resources.map((label) => ({ label, href: "#" })) }, { title: "Company", links: company.map((label) => ({ label, href: "#" })) }, { title: "Legal", links: ["Privacy", "Terms", "DPA"].map((label) => ({ label, href: "#" })) }, ]; const footers: Parameters<typeof FooterBlock>[0] = { brand: "Halden", tagline: "Month-end close for finance teams. Lisbon and London.", columns: columns(["Matching", "Review", "Audit trail", "Pricing"]), newsletter: { label: "The close, monthly", note: "One email at month end. Unsubscribe in one click.", onSubmit: () => new Promise((resolve) => setTimeout(resolve, 600)) }, legal: "© 2026 Halden Ltd", status: { label: "All systems normal", href: "#" } }; const startTrial = { label: "Start the trial", href: "#" }; const nav = (current: string) => [ { label: "Product", href: "#product" }, { label: "Customers", href: "#customers" }, { label: "Blog", href: "#blog" }, { label: "About", href: "#about" }, { label: "Contact", href: "#contact" }, ].map((link) => ({ ...link, current: link.label.toLowerCase() === current })); const signIn = { label: "Sign in", href: "#" }; const frame = "h-[720px] w-full overflow-auto rounded-overlay border border-border shadow-resting"; const wait = (ms: number) => new Promise<void>((resolve) => setTimeout(resolve, ms)); export function ContactDemo() { return ( <div className={frame}> <ContactTemplate brand="Halden" nav={nav("contact")} signIn={signIn} primary={startTrial} intro={{ eyebrow: "Contact", title: "Talk to a person", lead: "Choose what it is about and we will say who answers and how soon. Type “fail” in the message to see a failed send." }} topics={[ { value: "sales", label: "Pricing and plans", response: "The sales team replies within one working day.", email: "sales@halden.app" }, { value: "support", label: "Help with my account", response: "Support replies within four working hours, 8:00–18:00 Lisbon time.", email: "help@halden.app" }, { value: "security", label: "Security or compliance", response: "Our security lead replies within two working days. For an urgent issue, write to security@halden.app.", email: "security@halden.app" }, { value: "press", label: "Press", response: "Aoife Byrne replies within two working days.", email: "press@halden.app" }, ]} offices={[ { city: "Lisbon", address: "Rua do Ouro 120, 3º, 1100-063 Lisboa", hours: "Mon–Fri 9:00–18:00", timezone: "WET", mapHref: "#lisbon" }, { city: "London", address: "71 Leonard Street, London EC2A 4QS", hours: "Mon–Thu 9:00–18:00", timezone: "GMT", mapHref: "#london" }, ]} faq={{ ...faqs, title: "Before you write", items: faqs.items.slice(0, 4) }} onSubmit={async (message) => { await wait(800); if (message.message.toLowerCase().includes("fail")) throw new Error("Our mail server did not answer."); }} footer={footers} /> </div> ); }
API reference
ContactTemplate
component
Accessibility
It exposes status semantics, with aria-label, aria-hidden, aria-labelledby and aria-live kept in step with state. Changes that matter are announced through a live region.
Keyboard and focus handling comes from Radix popover: arrow keys move through items, Enter and Space select, and Escape closes and returns focus.
Motion
It declares no animation in its component source. Any transition comes from its stylesheet, which uses the duration tokens that collapse to instant under prefers-reduced-motion.