MuxForms on Nuxt 3 adds embed.js with useHead on pages/contact.vue, wraps the form div in ClientOnly, and calls MuxForms.mount in onMounted. Allow your Vercel/Netlify Nuxt URL.
Docs
Nuxt SSR can still use MuxForms in the browser—load the script on the contact route and mount after hydration.
| API | Usage |
|---|---|
| useHead | script src embed.js |
| ClientOnly | Avoid SSR mismatch on form div |
| onMounted | MuxForms.mount |
| server/api | Optional proxy with ingest secret |
<script setup lang="ts">
useHead({
script: [{ src: "https://www.muxforms.com/embed.js", defer: true }],
});
const el = ref<HTMLElement | null>(null);
onMounted(() => {
if (el.value) window.MuxForms?.mount(el.value);
});
</script>
<template>
<ClientOnly>
<div ref="el" data-form-id="FORM_UUID" />
</ClientOnly>
</template>Allow production origin once per deployment target.
Upgrade to Pro