@formhaus/vue
@formhaus/vue
Renders a JSON form definition in Vue 3: multi-step, conditional and branching forms on top of @formhaus/core. Native HTML inputs by default. Part of Formhaus.
Install
npm install @formhaus/core @formhaus/vue
Requires Vue 3.3 or later and Node 22.12 or later.
Usage
<script setup lang="ts">
import { FormRenderer } from '@formhaus/vue';
import definition from './contact-form.json';
async function handleSubmit(values: Record<string, unknown>) {
await fetch('/api/contact', {
method: 'POST',
body: JSON.stringify(values),
});
}
</script>
<template>
<FormRenderer :definition="definition" @submit="handleSubmit" />
</template>
Features
- Built-in field types, sections, repeatable groups and conditional visibility. See fields.
- Multi-step forms with lifecycle hooks, radio
autoAdvance, async step validation and branching routes. - Custom components through the
componentsprop, plusHeadlessFormRendererto keep the built-in fields out of your bundle. Integrations: Vuetify. - Dynamic select options with
optionsFromandoptionsProviders. See fields. - Form events through
@formEvent, for analytics. - Translations:
useLocalizedForm()from@formhaus/vue/i18n. - Server-side validation of the same definition with
@formhaus/core/server. - Formhaus Cloud:
FormhausFormfrom@formhaus/vue/cloudrenders a published form and submits to the hosted endpoint, with file uploads and the bot check. - Theming:
import '@formhaus/core/style.css', then override the--fh-*custom properties. - Nuxt support.
Formhaus Cloud
<script setup lang="ts">
import { FormhausForm } from '@formhaus/vue/cloud';
</script>
<template>
<FormhausForm id="form_id" />
</template>
Docs
License
MIT
Related Packages
@retailcrm/vue-formulario
Vue Formulario is a library, inspired by Vue Formulate , that handles the core l...
86,689
3
@bimetal/forms-vue-components
Default Vue 3 form builder + renderer — edits the schema (add/reorder/edit field...
2,180
Version History
| Version | Released | License |
|---|---|---|
| 1.2.2 | MIT | |
| 1.2.1 | MIT | |
| 1.2.0 | MIT | |
| 1.1.1 | MIT | |
| 1.1.0 | MIT | |
| 1.0.1 | MIT | |
| 1.0.0 | MIT | |
| 0.22.0 | MIT | |
| 0.21.2 | MIT | |
| 0.21.1 | MIT | |
| 0.21.0 | MIT | |
| 0.20.2 | MIT | |
| 0.20.1 | MIT | |
| 0.20.0 | MIT | |
| 0.19.1 | MIT | |
| 0.19.0 | MIT | |
| 0.18.0 | MIT | |
| 0.17.0 | MIT | |
| 0.16.0 | MIT | |
| 0.15.0 | MIT | |
| 0.14.2 | MIT | |
| 0.14.1 | MIT | |
| 0.14.0 | MIT | |
| 0.13.2 | MIT | |
| 0.13.1 | MIT | |
| 0.13.0 | MIT | |
| 0.12.0 | MIT | |
| 0.11.3 | MIT | |
| 0.11.2 | MIT | |
| 0.11.1 | MIT |
Showing the latest 30 of 48. See every release on npm
Pre-releases (1)
| Version | Released | License |
|---|---|---|
| 1.0.0-rc.0 | MIT |