0.1.6 • Published 3 years ago

convertkit-vue v0.1.6

Weekly downloads
38
License
MIT
Repository
github
Last release
3 years ago

Setup

For Vue 3:

yarn add convertkit-vue@next

For Vue 2:

yarn add convertkit-vue

Demos

Vue 3

Vue 2

Usage

<template>
  <ConvertKitForm formId={1234567} />
</template>

<script>
import ConvertKitForm from 'convertkit-vue'

export default {
  name: "My Vue App",
  components: { ConvertKitForm }
}
</script>

To get your form id, go to the form you have created on convertkit and choose the HTML embed option.

form embed screenshot

Here you'll pick out your form id from the form action in the embed code:

Passing custom configuration options

<template>
  <ConvertKitForm v-bind="config" />
</template>
<script>
import ConvertKitForm from 'convertkit-vue'

export default {
  name: "My Vue App",
  components: { ConvertKitForm },
  data() {
    return {
      config: {
        formId: 1234567,
        template: 'mills',
        emailPlaceholder: 'Enter an email address',
        submitText: 'Sign up'
      }
    }
  }
}
</script>

Configuration Options

PropertyTypeDefaultDescription
formatStringinlineinline, modal, slidein, sticky
templateStringminimalTemplates in the app + minimal
submitTextStringSubscribeText shown in submit button
headingTextStringVaries per templateText shown in heading
disclaimerTextStringVaries per templateText shown in disclaimer area
emailPlaceholderStringYour emailPlaceholder for email input
namePlaceholderStringYour first namePlaceholder for first name input
nameLabelStringFirst nameCustom name label
emailLabelStringEmailCustom email label
showLabelsBooleanfalseShows labels with form inputs or only rely on aria-label
hideNameBooleanfalseHides the name input field
newTabBooleanfalseDetermines if form should be processed in new tab or current
stackBooleantrueDetermines if inputs are stacked or placed inline
hideWarningsBooleanfalseHide warnings that are shown due to misconfiguration
backgroundImageStringdefault on templateUse a different background image for your form
backgroundOpacityNumber0.8Opacity here is the inverse of what is on the app which really measures transparency
Templates

The minimal template has no preconfigured styling, leaving you options to style as desired. To get a preconfigured style, use one of the app templates (clare, mills, rainier, powell etc) as seen on the app.

Content

To change the subheader (sometimes referred to as content) you may just add children inside the <ConvertkitForm> component like below:

<ConvertKitForm>
  <p>Subscribe to get our latest content by email.</p>
</ConvertKitForm>

Contributing

To publish a package:

./publish X.X.X "Message about version"

where X.X.X is the version number.

0.0.20

3 years ago

0.0.17

3 years ago

0.0.18

3 years ago

0.0.19

3 years ago

0.1.0

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.0.15

3 years ago

0.0.16

3 years ago

0.0.13

3 years ago

0.0.14

3 years ago

0.0.12

3 years ago

0.0.11

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

0.0.5

3 years ago

1.0.2

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

1.0.0

3 years ago

0.0.1

3 years ago

0.0.2

3 years ago

0.0.0

3 years ago