TypeScript-First Form Infrastructure

Backend-first questionnaires. Rendered by you.

Headless React hooks, immutable snapshot isolation, draft sessions, and typed server validation — without forcing any UI components or styling opinions.

pnpm add @dimah-form/server @dimah-form/react
playground
live snapshot
01import { defineForm } from "@dimah-form/server";
02
03export const feedbackForm = defineForm({
04 title: "Developer Feedback",
05 slug: "feedback",
06 fields: [
07 {
08 id: "framework",
09 type: "select",
10 label: "Primary Framework",
11 required: true,
12 options: [
13 { value: "nextjs", label: "Next.js" },
14 { value: "hono", label: "Hono" },
15 { value: "sveltekit", label: "SvelteKit" },
16 { value: "express", label: "Express" },
17 ],
18 },
19 {
20 id: "rating",
21 type: "number",
22 label: "Satisfaction (1-5)",
23 required: true,
24 min: 1,
25 max: 5,
26 },
27 {
28 id: "feedback",
29 type: "text",
30 label: "What can we improve?",
31 showWhen: { field: "rating", lte: 3 },
32 },
33 ],
34});
Live Questionnaire
Primary Framework *
Satisfaction Rating *
5 / 5

Engineered for reliable form lifecycles

Robust backend guarantees for multi-step questionnaires, surveys, and onboarding flows without sacrificing UI freedom.

Zero Schema Drift

Snapshot Isolation

Every response session captures an immutable definition snapshot at initialization. Live form updates never corrupt in-progress drafts or past submissions.

You Own the UI

100% Headless React

Zero forced widgets, registries, or opinionated CSS. Seamlessly bind headless hooks into Tailwind, shadcn/ui, Radix, or custom design components.

Pure TypeScript

End-to-End Type Safety

Export server form types directly to your client via $Infer. Enjoy complete autocomplete, dynamic field checking, and validation without codegen steps.

Ready to build with dimah-form?

Start building type-safe forms with Next.js App Router, Hono, Express, Fastify, Elysia, or SvelteKit.