vue-plaid-link

A vue plugin for Plaid Link
17,145 31
Install
npm install vue-plaid-link
Latest Version:0.6.1
Vue:2
License:MIT
Last Updated:Mar 1, 2023
Links: GitHub  ·  npm
Maintainer: pushchris

vue-plaid-link

A simple Vue component for easy integration with the Plaid Link drop-in module

Install

npm install vue-plaid-link --save

Example Usage

<template>
  <section>
    <plaid-link
      env="sandbox"
      publicKey="{PLAID_PUBLIC_KEY}"
      clientName="Test App"
      product="transactions"
      v-bind="{ onSuccess }"
    >
      Open Plaid Link
    </plaid-link>
  </section>
</template>

<script>
import PlaidLink from "vue-plaid-link";

export default {
  components: { PlaidLink },
  methods: {
    onSuccess(token) {
      console.log(token);
    },
  },
};
</script>

Alternatively if you would like to pass in your own view instead of the default button, utilize the button slot.

<template>
  <section>
    <plaid-link
      env="sandbox"
      publicKey="{PLAID_PUBLIC_KEY}"
      clientName="Test App"
      product="transactions"
      v-bind="{ onSuccess }"
    >
      <template slot="button" slot-scope="props">
        <a @click="props.onClick">Custom Open Element</a>
      </template>
    </plaid-link>
  </section>
</template>

All Props

Please refer to the official Plaid Link docs for descriptions on the various Link options.

<plaid-link
    clientName="Your app name"
    env="sandbox"
    institution={null}
    publicKey={PLAID_PUBLIC_KEY}
    product={['transactions']}
    language={'en','fr','es'},
    countryCodes={['US','CA','GB']},
    isWebView={null},
    token={'public-token-123...'}
    webhook="https://webhooks.test.com"
    onLoad={this.handleOnLoad}
    onEvent={this.handleOnEvent}
    onExit={this.handleOnExit}
    onLoad={this.handleOnLoad}
    onSuccess={this.handleOnSuccess}
    token={this.token}>
    Title Of Button
</plain-link>

Note: Use of Token Link

When using a link token instead of a public key, make sure to wait to render the button until you have the token.

<div class="accounts-actions" v-if="linkToken">
    <plaid-link
        v-bind="{
            env,
            webhook,
            clientName,
            onSuccess,
            token: linkToken
        }"
    >
        + Add Another Card
    </plaid-link>
</div>
<div class="accounts-actions" v-else>
    <ui-button loading="true" disabled="true">
        + Add Another Card
    </ui-button>
</div>

Related Packages

link-prevue

Vue component for generate a link preview

31,386 248
@phila/phila-ui-link

Link component with suppport for Vue Router

7,069
vue-about-me

A Vue component for displaying About Me Info.

4,310 4
vue-autolink

Auto-link url and images in Vue components

1,566

Version History

Version Released Vue License
0.6.1 ^2.5.9 MIT
0.6.0 ^2.5.9 MIT
0.5.0 ^2.5.9 MIT
0.4.0 ^2.5.9 MIT
0.3.0 ^2.5.9 MIT
Pre-releases (2)
Version Released Vue License
0.6.2-beta.1 ^2.5.9 MIT
0.6.2-beta.0 ^2.5.9 MIT