Contact Form
manifest-ui/contact-formFreeBlock
A complete contact form with name fields, phone with country selector, email, message textarea, and file attachment.
Install it
npx shadcn@latest add https://ui.manifest.build/r/contact-form.jsonSource
1'use client';23import { Button } from '@/components/ui/button';4import { Input } from '@/components/ui/input';5import { Label } from '@/components/ui/label';6import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';7import { cn } from '@/lib/utils';8import { ChevronDown, Paperclip, Search, Send, X } from 'lucide-react';9import { useEffect, useRef, useState } from 'react';10import { countries } from './countries';11import { demoContactFormData } from './demo/form';1213/**14 * Data structure representing the contact form submission.15 * @interface ContactFormData16 * @property {string} firstName - The user's first name (required)17 * @property {string} lastName - The user's last name (required)18 * @property {string} [countryId] - The selected country identifier (e.g., 'us', 'fr')19 * @property {string} [countryCode] - The phone country code (e.g., '+1', '+33')20 * @property {string} [phoneNumber] - The user's phone number without country code21 * @property {string} [email] - The user's email address22 * @property {string} [message] - The message or project description23 * @property {File | null} [attachment] - An optional file attachment24 */25export interface ContactFormData {26 firstName?: string;27 lastName?: string;28 countryId?: string;29 countryCode?: string;30 phoneNumber?: string;31 email?: string;32 message?: string;33 attachment?: File | null;34}3536/**37 * ═══════════════════════════════════════════════════════════════════════════38 * ContactFormProps39 * ═══════════════════════════════════════════════════════════════════════════40 *41 * Props for the ContactForm component with name fields, phone number with42 * country selector, email input, message textarea, and file attachment support.43 */44export interface ContactFormProps {45 data?: {46 /** The form title displayed at the top. */47 title?: string;48 /** Descriptive text below the title. */49 subtitle?: string;50 /** Custom label for the submit button. */51 submitLabel?: string;52 /** Pre-filled form values. */53 initialValues?: Partial<ContactFormData>;54 };55 actions?: {56 /** Called when the form is submitted with form data. */57 onSubmit?: (data: ContactFormData) => void;58// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from Manifest UI
All 32 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Amount Inputamount-input | Manifest UI | Blocks | Free | 1 dep · 2 files | |
| Chat Conversationchat-conversation | Manifest UI | Blocks | Free | 1 dep · 3 files | |
| Date & Time Pickerdate-time-picker | Manifest UI | Blocks | Free | 1 dep · 2 files | |
| Event Cardevent-card | Manifest UI | Blocks | Free | 1 dep · 2 files | |
| Event Confirmationevent-confirmation | Manifest UI | Blocks | Free | 1 dep · 2 files | |
| Event Detailevent-detail | Manifest UI | Blocks | Free | 3 deps · 2 files | |
| Event Listevent-list | Manifest UI | Blocks | Free | 3 deps · 2 files | |
| Herohero | Manifest UI | Blocks | Free | 1 dep · 2 files |
