1.0.1 • Published 2 years ago

@light-200/chatbox v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Chatbox

Chatbox helps you make a simple messenger app. Customize it to fit your website.

Usage

Install the package using npm

npm i @light-200/chatbox

Import in your javascript file

import "@light-200/chatbox";

The custom element is called

<chat-box> </chat-box>

Change default values using attributes

<chat-box chatbox-background="aliceblue"></chat-box>

event handlers

  • handleMsg({username,msg})

    for showing text message

  • event "send" and message will be in event.target.msg

    use this to process sent message

Custom properties

chatbox-width
chatbox-height
chatbox-radius
chatbox-background
chatbox-font-family
texts-gap
footer-height
footer-radius
footer-background
footer-font-color
footer-font-size
footer-element-gap
textSend-radius
textSend-background
textSend-padding
text-background

Contributing

create issues or work on existing