utrigg-form-embed-vue

This package is created to simplify the process of uTrigg form embedding within SPA application

Usage no npm install needed!

<script type="module">
  import utriggFormEmbedVue from 'https://cdn.skypack.dev/utrigg-form-embed-vue';
</script>

README

This package is created to simplify the process of uTrigg form embedding within SPA application

Guide

  1. Install package via command npm install utrigg-form-embed-vue
  2. Import package into needed component with command import utriggFormEmbedVue from 'utrigg-form-embed-vue'
  3. Place imported package into the template
  4. Provide prop :code with embedding code from uTrigg platform if you are using "Full" version.
  5. Provide prop :short-code with embedding code from uTrigg platform and prop :alias with form alias from uTrigg platform if you are using "Short" version.
  6. For an accurate 'Own button style' option handling watch examples below

Basic Example for Full code embedding:

<template>
    <utriggFormEmbedVue :code='codeFromUtrigg' />
<template>

<script>
      import utriggFormEmbedVue from 'utrigg-form-embed-vue'
      export default {
        components: {
          utriggFormEmbedVue
        },
        data () {
          return {
            codeFromUtrigg: `*here goes code from uTrigg platform*`
          };
        },
        ...
</script>

Example for Full code embedding with 'Own button style' option:

<template>
    <utriggFormEmbedVue :code='codeFromUtrigg' :alias='alias'>
        <button>Your own button</button>
    </utriggFormEmbedVue>
<template>
...

Example for Short code embedding:

<template>
    <utriggFormEmbedVue :code='codeFromUtrigg' :alias='aliasFromUtrigg' />
<template>
...

Example for Short code embedding with 'Own button style' option

<template>
    <utriggFormEmbedVue :code='codeFromUtrigg' :alias='aliasFromUtrigg'>
        <button>Your own button</button>
    </utriggFormEmbedVue>
<template>
...