Contact
Contact form beside your contact details; works without JavaScript.
Preview
Get in touch
We reply within two working days. Sample copy.
- hello@example.com
- Office
- Sample Street 1, Example City
Installation
Run this in a project that already uses shadcn/ui. It adds the component and anything it needs.
Usage
import { Contact } from "@/components/custom/contact";
<Contact
action="/api/contact"
details={[{ label: "Email", value: "hello@example.com", href: "mailto:hello@example.com" }]}
/>Props
| Prop | Type | Default | Description |
|---|---|---|---|
| action* (required) | string | – | Where the form posts (name, email, message). |
| details | { label; value; href? }[] | – | Contact details beside the form. |
| submitLabel | string | "Send message" | Button text. |
| title / description | string | – | Heading (h2) and line under it. |
| ...props | React.ComponentProps<"section"> | – | Any other section attribute (id, aria-*, data-*, ref) goes to the root element. |
Accessibility
- Every field has a visible label and the right input type and autocomplete.