react-plaid-link
React hooks and components for integrating with the Plaid Link drop module
Install
With npm
:
npm install react-plaid-link --save
With yarn
yarn add -S react-plaid-link
Documentation
Please refer to the official Plaid Link docs for a more holistic understanding of the various Link options.
Examples
Head to the react-plaid-link
storybook to try it out for yourself, or
checkout:
Using React hooks
This is the new and preferred approach for integrating with Plaid Link in React.
import React useCallback from 'react';import usePlaidLink from 'react-plaid-link'; const App = const onSuccess = ; const config = clientName: 'Your app name' env: 'sandbox' product: 'auth' 'transactions' publicKey: '<YOUR_PLAID_PUBLIC_KEY>' onSuccess // ... ; const open ready error = ; return <MyButton = => Connect a bank account </MyButton> ;;;
Using a React component
import React from 'react';import PlaidLink from 'react-plaid-link'; const App = { const onSuccess = token metadata // send token to server ; return <PlaidLink ="Your app name" ="sandbox" = ="<YOUR_PLAID_PUBLIC_KEY>" = > Connect a bank account </PlaidLink> ;};;
All available Link configuration options
Please refer to the official Plaid Link docs for a more holistic understanding of the various Link options.
// src/types/index.ts
Typescript support
Typescript definitions for react-plaid-link
are built into the npm packge.