1.0.5 • Published 1 year ago

ribbit-connect v1.0.5

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

ribbit-connect

JavaScript library for integrating RIBBIT CONNECT into your webpage

Use a JavaScript framework? Here are a few more implementation methods we provide: 1. React 2. Angular (coming soon) 3. React Native (coming soon)

Install

Include the RIBBIT CONNECT script on your website.

<script src="https://portal.ribbit.ai/CONNECT.js"></script>

With npm:

npm install --save ribbit-connect

With yarn:

yarn add ribbit-connect

Documentation

Please refer to the official RIBBIT CONNECT docs for more information.

Usage

//import  {  RIBBITConnect  }  from  "ribbit-connect"; // comment out only if you used npm or yarn to install

const CONNECT = new RIBBITConnect({
    target: 'ribbit-container', // id of any element within the </body> which you want CONNECT to initialize within
    token: this.token  // see documentation on how to get a token
})

CONNECT.open()

CONNECT.onExit(eventData => {
    CONNECT.close()
})

//CONNECT.onComplete(eventData => {
//    do something with eventData
//    console.log(eventData)
//})

Methods

NameDescription
onMessageGeneric message handler that fires for every one of the events below function(eventName, eventData) => void
onLaunchfunction(eventData) => void
onExitfunction(eventData) => void
onCompletefunction(eventData) => void
onBankLoginSelectedfunction(eventData) => void
onManualEnrollmentSelectedfunction(eventData) => void
onNoAccountsFoundfunction(eventData) => void
onBankNotFoundfunction(eventData) => void
onBankLoginfunction(eventData) => void
onLinkOpenfunction(eventData) => void

All Init Parameters

NameTypeDefaultDescription
tokenstringToken recieved from /CONNECT/session/ endpoint
openbooleanfalseWhether or not CONNECT should be open or not
languagestringenOptional language to be displayed to the user (Translation must be added within CONNECT settings. More coming soon.)
classNamestringOptional class to be added to the CONNECT container
inlinebooleanfalseWhether or not CONNECT should display inline (default is popup)
fullscreenbooleanfalseWhether or not CONNECT should display in full-screen mode (for native/mobile app implementation)
settingsobjectAdditional settings (see below)

Settings

NameTypeDefaultDescription
curtainColorstringColor of the popup background curtain. Examples: #FFF and rgba(0,0,0,0.5)
curtainAllowClosebooleantrueWhether or not the user clicking on the popup background curtain should close the CONNECT popup
closeButtonbooleanfalseWhether a close button should display in the top right corner of the widget. (on click fires the onExit method)
1.0.5

1 year ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago