Components
Example Form
A contact form with Zod validation demonstrating form patterns.
Example Form
A contact form showcasing form validation with Zod and proper accessibility patterns.
Preview
Loading preview...
Installation
Terminal
$npx shadcn@latest add @vandoko/example-formUsage
import { ExampleForm } from "@/components/example-form";
export default function ContactPage() {
return (
<div className="container py-10">
<ExampleForm />
</div>
);
}Features
- Zod Validation - Schema-based form validation
- Accessible - Proper ARIA attributes and error messages
- Loading States - Submit button shows pending state
- Error Display - Field-level error messages
- Card Layout - Clean presentation with Card component
Form Fields
| Field | Type | Validation |
|---|---|---|
| Name | string | Required, min 1 character |
string | Required, valid email format | |
| Message | string | Required, min 1 character |
Dependencies
zod
Registry Dependencies
buttoninputlabeltextareacard
Lineage
| Property | Value |
|---|---|
| Type | registry:component |
| Curated | 2025-01-19 |