River Messaging App Web Service
Library for inserting River in your webpage
This is a package for integrating river into your webapp, check out River .
⭐️ Features
RTL Support
Jest unit testing
Daily dependabot dependency updates
📦 Installation
npm install river-service
💎 Usage
const opts = {
rtl: false ,
};
const userInfo = {
firstname: ' FIRST_NAME' ,
lastname: ' LAST_NAME' ,
workspace: ' cyrus.river.im' ,
phone: ' 23740077'
};
let riverService = window .RiverService .default ;
let srv = new riverService (opts);
srv .onload = () => {
srv .setUserInfo (userInfo).then ((res ) => {
console .log (res);
});
}
Options
Property
Default
Type
url
https://web.river.im
string
rtl
false
boolean
el
(appends new element)
HTMLElement
User info object
Property
Default
Type
firstname
''
string
lastname
''
string
workspace
'cyrus.river.im'
string
phone
0
number
✍️ Methods
setUserInfo(userInfo)
toggleVisible(boolean)
toggles visibility of badge
setRTL(boolean)
✅ Websites built with this lib
Nested - Nested - Team Commiunication Platform