shadimage
formscn
libform-generatorsource: ok · hit

Form Generator

Form code generation utilities

npx shadcn add "https://www.formscn.space/r/form-generator.json"
free

Visual style

terminal-mono

Tags auto-generated by rules on 9/24/2026 — empty means no evidence, not lack of support.

Dependencies

Bundle weight · light
formszod

Files2 · source cached 10/8/2026, 3:38:13 PM

src/registry/default/lib/form-generator.ts
import { generateFormComponent } from "./form-generator/index";
export * from "./form-generator/index";
export default generateFormComponent;
src/registry/default/types.ts
import * as z from "zod";
import { type OAuthProvider } from "@/lib/oauth-providers-config";
import { type AuthPluginsConfig } from "./lib/form-generator/types";
import type { CountryCode } from "libphonenumber-js";

export interface FormField {
  type: "input" | "textarea" | "select" | "checkbox" | "radio" | "date" | "file" | "switch" | "number";
  name: string;
  label: string;
  placeholder?: string;
  description?: string;
  required?: boolean;
  options?: Array<{ label: string; value: string }>;
  inputType?: "text" | "email" | "password" | "tel" | "url" | "number" | "date";
  accept?: string;
  uiType?: string;
  uiConfig?: {
    rows?: number;
    country?: CountryCode;
    icon?: string;
    accept?: string;
  };
}

export interface FormStep {
  id: string;
  title: string;
  description?: string;
  fields: FormField[];
}

export interface FormTemplate {
  id: string;
  name: string;
  description: string;
  category: "authentication" | "contact" | "ecommerce" | "survey" | "profile" | "booking";
  schema: z.ZodObject<any>;
  defaultValues: Record<string, any>;
  fields?: FormField[];
  steps?: FormStep[];
  oauthProviders?: OAuthProvider[];
  authPlugins?: AuthPluginsConfig;
}

More from formscn

Browse all components in this library →