Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@brainfish-ai/web-widget

Package Overview
Dependencies
Maintainers
0
Versions
139
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@brainfish-ai/web-widget

Brainfish Widgets Manager

  • 1.3.0-beta.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

Brainfish In-App Widget

This package provides a simple way to integrate a Brainfish in-app widget in your website or web application. It supports the standard style, and slide-in popup.

Installation

npm install @branfish-ai/web-widget

Directly in your HTML

<script type="module">
    import Brainfish from "https://cdn.jsdelivr.net/npm/@brainfish-ai/web-widget@latest/dist/web.js"
    Brainfish.Widgets.init({ widgetKey: "your-key" });
</script>


<button class="brainfish-trigger-button" onClick="Brainfish.HelpWidget.open('brainfish-trigger-button')">Help</button>

<!-- The widget will emit events when it opens and closes. You can listen to these events by adding the following code to your website: -->

<!-- For close event: (onBrainfishHelpWidgetClosed) -->

<script>
    window.addEventListener('onBrainfishHelpWidgetClosed', yourClosedHandlerFunction);
</script>

<!-- For opened event: (onBrainfishHelpWidgetOpened) -->

<script>
    window.addEventListener('onBrainfishHelpWidgetOpened', yourOpenedHandlerFunction);
</script>

<!-- Make sure you remember to remove these event listeners when the widget is no longer needed. -->

<script>
    window.removeEventListener('onBrainfishHelpWidgetClosed', yourClosedHandlerFunction);
    window.removeEventListener('onBrainfishHelpWidgetOpened', yourOpenedHandlerFunction);
</script>

Keywords

FAQs

Package last updated on 21 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc