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

@brainfish-ai/react-chat-widget

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@brainfish-ai/react-chat-widget

React library to display brainfish chat widget on your website

  • 0.0.6
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Install

npm install @brainfish-ai/chat-widget @brainfish-ai/react-chat-widget

Standard

import { Standard } from '@brainfish-ai/react-chat-widget'

const App = () => {
  return (
    <Standard
      chatAppId="lead-generation-copy-3luzm6b"
      style={{ width: '100%', height: '600px' }}
    />
  )
}

This code is creating a container with a 100% width (will match parent width) and 600px height.

Popup

import { Popup } from '@brainfish-ai/react-chat-widget'

const App = () => {
  return <Popup chatAppId="lead-generation-copy-3luzm6b" autoShowDelay={3000} />
}

This code will automatically trigger the popup window after 3 seconds.

Open or Close a popup

You can use these commands:

import { open } from '@brainfish-ai/react-chat-widget'

open()
import { close } from '@brainfish-ai/react-chat-widget'

close()
import { toggle } from '@brainfish-ai/react-chat-widget'

toggle()

Bubble

import { Bubble } from '@brainfish-ai/react-chat-widget'

const App = () => {
  return (
    <Bubble
      chatAppId="lead-generation-copy-3luzm6b"
      theme={{
        button: { backgroundColor: '#0042DA', iconColor: '#FFFFFF' },
        previewMessage: { backgroundColor: '#ffffff', textColor: 'black' },
      }}
    />
  )
}

This code will show the bubble and let a preview message appear after 5 seconds.

Open or close the chat window

You can use these commands:

import { open } from '@brainfish-ai/react-chat-widget'

open()
import { close } from '@brainfish-ai/react-chat-widget'

close()
import { toggle } from '@brainfish-ai/react-chat-widget'

toggle()

FAQs

Package last updated on 24 May 2023

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