●Platforms · Vue
Vue
A Vue 3 component around the Issued JavaScript SDK.
01
Install
terminal
npm install @issued/vue02
Minimal embed
SupportForm.vue
<template>
<IssuedForm
:project-id="projectId"
:fields="fields"
@success="onSuccess"
/>
</template>
<script setup lang="ts">
import { IssuedForm } from '@issued/vue';
const projectId = 'your-project-id';
const fields = {
subject: { visible: true, required: true },
description: { visible: true, required: true },
email: { visible: true, required: false }
};
const onSuccess = (res: { ticketId: string }) => {
console.log('Submitted:', res.ticketId);
};
</script>03
Hidden metadata
<script setup lang="ts">
import { IssuedForm } from '@issued/vue';
import { useAuth } from '@/composables/auth';
const { user } = useAuth();
const fields = {
subject: { visible: true, required: true },
description: { visible: true, required: true },
email: { visible: false, value: user.value.email },
userId: { visible: false, value: user.value.id }
};
</script>04
Styling & callbacks
Bind theme and callbacks props just like in React — see the styling guide and callbacks reference.
05
Gotchas
- ▸Works with Vue 3 (composition API). Nuxt users should wrap the component in
<ClientOnly>. - ▸The
fieldsobject should be stable — define it outside setup or wrap it inshallowRefso changes don't force a remount.