Skip to main content
End of Support for @suprsend/web-inbox. Migrate to @suprsend/web-components
We have upgraded authentication of inbox from HMAC to JWT as it is more secure. Please migrate to newer SDK if you are on old one.
There are 2 ways in which you can implement inbox functionality:
  • Drop-in components: Pre-built UI with many customizable options which require minimal effort to build.
  • Headless implementation: For more advanced use cases where you want to build UI/UX from scratch.
This guide help you integrate drop-in components in your non-react frameworks (angular, vuejs, vanillajs etc). If you want to build your own UI (headless) instead of using drop-in components please refer docs.

Integration

Integrate using script tag

This integration is used in Vanillajs, Django, Laravel, ruby etc where npm is not used.

Integrate as npm package

This integration is used in framework based applications like angular, vuejs etc.
NOTE: If you are using suprsend-feed, specify height for the container for infinite scroll to work properly.

Removing instance

Components will be removed automatically if you navigate away from the page (on unmounting). If you want to remove them manually, you can use below methods.

Updating configuration dynamically

Accessing other instance methods

SDK internally calls new SuprSend() when you call initSuprSend() then you can access instance using window.suprsend.client. This instance has methods like preferences, webpush, event and user updates.

Config options

To customise SuprSend components you can pass config object.
For further component specific customisations please refer to the docs.