A powerful React hook that wraps TanStack Form with shadcn/ui components. Features schema validation, multi-page support, component overrides, and custom wrappers.
Answer a few questions and we'll find the perfect car for your trip. This form demonstrates dynamic text that personalizes based on your responses.
Get the use-formedible hook installed in your project that uses shadcn/ui
npx shadcn@latest add https://formedible.dev/r/use-formedible.json
import { useFormedible } from "@/hooks/use-formedible";import { z } from "zod";const schema = z.object({email: z.string().email("Invalid email"),message: z.string().min(10, "Message too short"),});export function MyForm() {const { Form } = useFormedible({schema,fields: [{ name: "email", type: "email", label: "Email" },{ name: "message", type: "textarea", label: "Message" },],formOptions: {defaultValues: { email: "", message: "" },onSubmit: async ({ value }) => console.log(value),},});return <Form />;}
hooks/use-formedible.tsx
- Main form hookcomponents/fields/*
- All field components (text, select, date, etc.)Everything you need for building powerful forms with shadcn/ui