Vue component for Plaid Link
npm install @jcss/vue-plaid-linkVue component for integrating with Plaid Link
This is an unofficial Vue fork based on the official React version react-plaid-link.
Vue 3.2+
With npm:
```
npm install --save @jcss/vue-plaid-link
With yarn
``
yarn add @jcss/vue-plaid-link
With pnpm
``
pnpm i @jcss/vue-plaid-link
See the examples folder for various complete source code examples.
This is the preferred approach for integrating with Plaid Link in Vue.
Note: token can be null initially and then set once you fetch or generatelink_token
a asynchronously.
ℹ️ See a full source code examples of using composables:
- examples/simple.vue: minimal example of using composables
- examples/composable.vue: example using composable with all
available callbacks
- examples/oauth.vue: example handling OAuth with composable
`vue
`
ℹ️ See src/types/index.ts for exported types.
Please refer to the official Plaid Link
docs for a more holistic understanding of
the various Link options and the
link_token.
#### usePlaidLink arguments
| key | type |
| --------------------- | ----------------------------------------------------------------------------------------- |
| token | string \| null |receivedRedirectUri
| | string \| undefined |onSuccess
| | (public_token: string, metadata: PlaidLinkOnSuccessMetadata) => void |onExit
| | (error: PlaidLinkError \| null, metadata: PlaidLinkOnExitMetadata) => void |onEvent
| | (eventName: PlaidLinkStableEvent \| string, metadata: PlaidLinkOnEventMetadata) => void |onLoad
| | () => void |
#### usePlaidLink return value
| key | type |
| ------- | --------------------------------------------------------------- |
| open | () => void |ready
| | boolean |error
| | ErrorEvent \| null |exit
| | (options?: { force: boolean }, callback?: () => void) => void |
If you cannot use Vue composables for some reason, you can use the PlaidLink component.
ℹ️ See full source code example at examples/component.vue
`vue
:on-success="onSuccess"
:on-event="onEvent"
>
Connect a wallet
``