Jump to content
Ethora's Community
  • 0

Using npm package ethora-chat-component to quickly scaffold your app


TarasFilatov

Question

In this 3 minute video we explain how to quickly get your first Ethora powered web app running.

This supports React and vanilla Javascript.

How to use Ethora Chat Component NPM package

  1. npm create vite@latest
  2. select name of project, select type (react/js)
  3. cd project-name
  4. npm i
  5. npm i @ethora/chat-component
  6. go to file src/App.tsx and replace it with this code:

 

import { Chat } from "projecet-2-ccomp";
import "./App.css";

function App() {
 return (
   <Chat />
 );
}

export default App;

Video demo 

 

 

(optional) Implementing custom CSS styles

Use the below example to add custom styles in your app:

<Chat
    config={{
      disableHeader: true,
      disableMedia: true,
      colors: { primary: "#4287f5", secondary: "#42f5e9" },
    }}
    MainComponentStyles={{
      width: "100%",
      height: "500px",
      borderRadius: "16px",
      border: "1px solid #42f5e9",
    }}
  />

 

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...