Create forms visually with our interactive form builder. Features a modular tab system that can be extended with custom tabs for specialized workflows.
Start using the form builder to create forms with a visual interface. Extend it with custom tabs to match your specific workflow needs.
Get started with the form builder using the default configuration with builder, preview, and code tabs.
The form builder provides an intuitive interface for creating forms visually. It includes three main tabs by default: Builder for form design, Preview for testing, and Code for export.
import { FormBuilder } from '@/components/formedible/builder/form-builder';export default function MyBuilderPage() {return (<div className="min-h-screen"><FormBuilder /></div>);}
Control which tabs are available and customize the builder's functionality.
You can configure which tabs are enabled and set the default tab that opens when the builder loads.
// Builder and Preview only<FormBuilder enabledTabs={["builder", "preview"]} />// All tabs with custom default<FormBuilderenabledTabs={["builder", "preview", "code"]}defaultTab="preview"/>
builder
Visual form designer with drag-and-drop fields
preview
Live preview of the form as users will see it
code
Generated code that can be copied and used
Extend the builder with custom tabs for specialized functionality.
Create custom tabs to add specialized functionality to the form builder. Custom tabs receive props to access and modify form data.
import { TabContentProps, TabConfig } from '@/components/formedible/builder/types';// 1. Create tab content componentconst DocumentationTabContent: React.FC<TabContentProps> = ({getFormMetadata,getAllFields}) => {const metadata = getFormMetadata();const fields = getAllFields();return (<div className="p-8"><h2 className="text-2xl font-bold mb-4">Form Documentation</h2><div className="space-y-4"><p><strong>Title:</strong> {metadata.title}</p><p><strong>Fields:</strong> {fields.length}</p><div className="space-y-2">{fields.map((field) => (<div key={field.id} className="border rounded p-3"><span className="font-medium">{field.label}</span><span className="ml-2 text-muted-foreground">({field.type})</span></div>))}</div></div></div>);};// 2. Define tab configurationconst documentationTab: TabConfig = {id: "documentation",label: "Docs",icon: FileText,component: DocumentationTabContent,enabled: true,order: 4,};
import { FormBuilder } from '@/components/formedible/builder/form-builder';import { builderTab, previewTab, codeTab } from '@/components/formedible/builder/default-tabs';<FormBuildertabs={[builderTab, previewTab, codeTab, documentationTab]}defaultTab="builder"/>
Props available to custom tab components for accessing and modifying form data.
interface TabContentProps {// Form data accessgetFormMetadata: () => FormMetadata;getAllFields: () => FieldConfig[];selectedFieldId?: string;// Form modificationonFormMetadataChange: (metadata: Partial<FormMetadata>) => void;onAddField: (field: FieldConfig) => void;onUpdateField: (id: string, updates: Partial<FieldConfig>) => void;onDeleteField: (id: string) => void;onSelectField: (id: string) => void;onDuplicateField: (id: string) => void;onReorderFields: (startIndex: number, endIndex: number) => void;}
Auto-generate form documentation and field references
Customize form themes, colors, and appearance
Review sensitive fields and security settings
Export form data in different formats (JSON, YAML, etc.)
Control the order of tabs and customize the builder workflow.
You can control the order in which tabs appear by setting the order property or by arranging them in the tabs array.
// Method 1: Using order propertyconst customTabs = [{ ...stylingTab, order: 1 }, // First tab{ ...builderTab, order: 2 }, // Second tab{ ...previewTab, order: 3 }, // Third tab{ ...codeTab, order: 4 }, // Fourth tab];<FormBuildertabs={customTabs}defaultTab="styling" // Start with styling tab/>// Method 2: Array order (simpler)<FormBuildertabs={[stylingTab, builderTab, previewTab, codeTab]}defaultTab="styling"/>
Start using the form builder to create forms with a visual interface. Extend it with custom tabs to match your specific workflow needs.