@saastro/forms
Dynamic form system for React. Type-safe, JSON-configurable, with 20+ field types and full shadcn/ui integration.
🛡️
Type-Safe Forms
Built with TypeScript, Zod, and React Hook Form for compile-time and runtime validation.
📝
20+ Field Types
Text, select, slider, date picker, checkbox groups, button cards, and more.
⚙️
JSON Configuration
Define forms with JSON or use the fluent FormBuilder API for full type safety.
🔌
Dependency Injection
Bring your own UI components. Works with shadcn/ui, Radix, or custom components.
📊
Multi-Step Forms
Built-in support for wizards, progress indicators, and step validation.
🔀
Conditional Logic
Show, hide, or disable fields based on form values with declarative conditions.
Quick Example
FormBuilder API
const config = FormBuilder.create('contact')
.addField('name', (f) =>
f.type('text')
.label('Name')
.required()
)
.addField('email', (f) =>
f.type('email')
.label('Email')
.required()
.email()
)
.addStep('main', ['name', 'email'])
.build(); Usage
import { Form, ComponentProvider } from '@saastro/forms';
import { registry } from './form-components';
<ComponentProvider components={registry}>
<Form
config={config}
onSubmit={(data) => console.log(data)}
/>
</ComponentProvider>