You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Framework-agnostic form engine with its own compact JSON-based definition format.
10
-
Define a form once — fields, validation, conditions, steps — in a single file. Render it in React, Vue, Figma, or any framework via the core engine. No JSON Schema spec, no separate UI schema, no boilerplate.
9
+
Framework-agnostic form engine with a compact JSON definition format.
10
+
Define a form once (fields, validation, conditions, steps) in a single file. Render it in React, Vue, Figma, or anything via the core engine. No JSON Schema spec, no separate UI schema, no boilerplate.
11
11
12
12
## Packages
13
13
@@ -17,9 +17,9 @@ Define a form once — fields, validation, conditions, steps — in a single fil
17
17
|`@formhaus/react`| React adapter with native HTML defaults and custom component support |`npm i @formhaus/react`|
18
18
|`@formhaus/vue`| Vue 3 adapter with native HTML defaults and custom component support |`npm i @formhaus/vue`|
19
19
20
-
There is also a Figma plugin (`@formhaus/figma`) that generates form mockups from form definitions. Available via `manifest.json` for now.
20
+
`@formhaus/figma`generates form mockups on the Figma canvas from a form definition. Not on Figma Community yet, install as a local plugin via `packages/figma/manifest.json`.
21
21
22
-
Svelte, Solid, or anything else: use `@formhaus/core` directly. See the [playground](https://formhaus.dev/playground) for an example.
22
+
Svelte, Solid, or anything else: use `@formhaus/core` directly. The [playground](https://formhaus.dev/playground.html) has a Svelte example.
Or use `@formhaus/core` directly with any framework. See the [Svelte example in the playground](/playground).
37
+
Or use `@formhaus/core` directly with any framework. See the [Svelte example](https://formhaus.dev/playground.html).
38
38
39
39
## Quick Start
40
40
41
41
### Define a form
42
42
43
-
You can write the JSON by hand or use the [Claude skill](.claude/skills/formhaus-create-form/SKILL.md)to generate it from a text description.
43
+
Write the JSON by hand, or use the [`/formhaus-create-form`](https://formhaus.dev/guide/formhaus-create-form.html) Claude Code skill to generate it from a text description, a CSV table, or a screenshot of an existing form.
44
44
45
45
```json
46
46
{
@@ -191,7 +191,7 @@ Each field component receives the full `FormField` descriptor, the current value
191
191
192
192
## Figma Plugin
193
193
194
-
`@formhaus/figma`is a Figma plugin that takes a formhaus form definition and generates a styled form mockup directly on the canvas. Useful for rapid prototyping and design handoff.
194
+
`@formhaus/figma`generates styled form mockups on the Figma canvas from a form definition. Map your design system components to field types via a `componentMap` that the [`/formhaus-figma-connect`](https://formhaus.dev/guide/formhaus-figma-connect.html) Claude Code skill can generate for you by scanning your Figma file. Not on Figma Community yet, install as a local plugin via `packages/figma/manifest.json`.
Framework-agnostic form engine. Types, validation, visibility, multi-step navigation, async step validation. Zero runtime dependencies, ESM-only.
4
+
5
+
Part of [Formhaus](https://github.com/ignsm/formhaus). For React, use `@formhaus/react`. For Vue, use `@formhaus/vue`.
6
+
7
+
## Install
8
+
9
+
```bash
10
+
npm install @formhaus/core
11
+
```
12
+
13
+
Requires Node ≥18.
14
+
15
+
## Generating a definition
16
+
17
+
Write the JSON by hand, or use the [`/formhaus-create-form`](https://formhaus.dev/guide/formhaus-create-form.html) Claude Code skill to generate it from a text description, a CSV table, or a screenshot of an existing form.
Figma plugin that generates styled form mockups on the canvas from a [Formhaus](https://github.com/ignsm/formhaus) form definition. Maps your design system components to field types via a `componentMap`.
4
+
5
+
Not published to the Figma Community yet. Install as a local plugin.
6
+
7
+
## Install (local plugin)
8
+
9
+
1. Clone the repo: `git clone https://github.com/ignsm/formhaus.git`
3. In Figma desktop: **Plugins → Development → Import plugin from manifest...**
12
+
4. Pick `packages/figma/manifest.json`
13
+
14
+
## Usage
15
+
16
+
1. Open a Figma file
17
+
2.**Plugins → Development → Formhaus**
18
+
3. Paste a Formhaus form definition JSON into the plugin UI
19
+
4. Click **Generate**
20
+
21
+
The plugin creates a frame per step with all fields rendered as instances of your mapped design system components. Buttons, step counters, and layout are set up automatically.
22
+
23
+
## Component map
24
+
25
+
The plugin ships with a default component map. To make it use your own design system, you need a JSON that maps each form field type (`text`, `select`, `checkbox`, etc.) to a Figma component key in your library.
26
+
27
+
Writing that map by hand means digging through the Figma API for component keys. Instead, use the **[`/formhaus-figma-connect`](https://formhaus.dev/guide/formhaus-figma-connect.html) Claude skill**: it scans your Figma design system via MCP, auto-detects form components, shows screenshots for confirmation, and generates the full `componentMap` JSON. Copy the output, open the plugin's **Component Map** tab, paste, save. The plugin remembers the map across runs.
28
+
29
+
If you don't use Claude Code, the full `ComponentMap` TypeScript interface lives in [`packages/figma/src/constants.ts`](https://github.com/ignsm/formhaus/blob/main/packages/figma/src/constants.ts). Paste a JSON that conforms to it.
React adapter for [Formhaus](https://github.com/ignsm/formhaus). Renders forms from a JSON definition with native HTML inputs by default. Drop in your own components via a `components` prop.
4
+
5
+
## Install
6
+
7
+
```bash
8
+
npm install @formhaus/core @formhaus/react
9
+
```
10
+
11
+
Requires React ≥18 and Node ≥18.
12
+
13
+
## Generating a definition
14
+
15
+
Write the form JSON by hand, or use the [`/formhaus-create-form`](https://formhaus.dev/guide/formhaus-create-form.html) Claude Code skill to generate it from a text description, a CSV table, or a screenshot of an existing form.
Vue 3 adapter for [Formhaus](https://github.com/ignsm/formhaus). Renders forms from a JSON definition with native HTML inputs by default. Drop in your own components via a `components` prop.
4
+
5
+
## Install
6
+
7
+
```bash
8
+
npm install @formhaus/core @formhaus/vue
9
+
```
10
+
11
+
Requires Vue ≥3.3 and Node ≥18.
12
+
13
+
## Generating a definition
14
+
15
+
Write the form JSON by hand, or use the [`/formhaus-create-form`](https://formhaus.dev/guide/formhaus-create-form.html) Claude Code skill to generate it from a text description, a CSV table, or a screenshot of an existing form.
16
+
17
+
## Usage
18
+
19
+
```vue
20
+
<script setup lang="ts">
21
+
import { FormRenderer } from '@formhaus/vue';
22
+
import definition from './contact-form.json';
23
+
24
+
async function handleSubmit(values: Record<string, unknown>) {
0 commit comments