React / Templates

Templates

16 production-ready form schemas included with the free templates package, covering 7 categories.

Free templates

@squaredr/fieldcraft-templates includes 16 production-ready schemas. These are MIT-licensed — use them in any project.

bash
pnpm add @squaredr/fieldcraft-templates

Available templates

General

TemplateDescriptionFieldsSections
contactFormContact/inquiry formMulti-section with name, email, message2
newsletterSignupEmail list signupSingle-section with email and preferences1
eventRegistrationEvent signupAttendee details, dietary requirements, sessions3
leadGenerationLead captureCompany info, budget, timeline2
pollQuick opinion pollSingle question with options1
quizKnowledge/personality quizScored questions with result bands3+

Feedback

TemplateDescriptionFieldsSections
feedbackSurveyCustomer feedback collectionRating, NPS, open text2
npsSurveyNet Promoter Score surveyNPS scale with follow-up2
featureRequestFeature voting/requestsDescription, priority, impact2

Support

TemplateDescriptionFieldsSections
bugReportBug/issue reportingSteps to reproduce, environment, severity3

HR

TemplateDescriptionFieldsSections
jobApplicationEmployment applicationPersonal info, experience, references4
onboardingChecklistNew hire checklistTasks, document uploads, acknowledgements3
exitInterviewDeparture interviewSatisfaction ratings, reasons, feedback3
review360360-degree feedback reviewCompetency ratings, open feedback4
timeOffRequestPTO/vacation requestDates, type, coverage plan1
expenseReportExpense submissionLine items, receipts, approvals2

Usage

Each template exports a schema, metadata, and a combined template object:

import { contactForm } from '@squaredr/fieldcraft-templates'// The schema — pass directly to FormEngineRenderercontactForm.schema   // FormEngineSchema// MetadatacontactForm.meta     // { id, name, description, category, fieldCount, sectionCount, tags }// Or import individuallyimport { contactFormSchema, contactFormMeta } from '@squaredr/fieldcraft-templates'

Render a template

import { FormEngineRenderer } from '@squaredr/fieldcraft-react'import { contactForm } from '@squaredr/fieldcraft-templates'export default function ContactPage() {  return (    <FormEngineRenderer      schema={contactForm.schema}      onSubmit={async (response) => {        await fetch('/api/submit', { method: 'POST', body: JSON.stringify(response) })      }}    />  )}

List all templates

import { allTemplates } from '@squaredr/fieldcraft-templates'// allTemplates is Template[] — all 16 templatesallTemplates.forEach((t) => {  console.log(t.meta.name, t.meta.category, t.meta.fieldCount)})

Template categories

type TemplateCategory =  | 'general'  | 'feedback'  | 'marketing'  | 'support'  | 'hr'  | 'ecommerce'  | 'healthcare'

Customising templates

Templates are standard FormEngineSchema objects. Copy and modify them:

import { contactForm } from '@squaredr/fieldcraft-templates'const myContactForm = {  ...contactForm.schema,  id: 'my-contact-form',  title: 'Get in Touch',  branding: {    logoUrl: '/my-logo.png',    poweredBy: false,  },}

Next steps