0.1.33 • Published 6 months ago

@polyfact/chat v0.1.33

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

ChatUI Component Documentation

Introduction

The ChatUI component is a primary interface for users to interact with the chat feature. Developed using the Polyfire SDK, it provides developers with an extensive range of properties to customize its appearance and behavior. Below is a tabulated breakdown of each property to ensure maximum clarity.

Installation

To include the ChatUI component in your project, you can easily install it using either yarn or npm:

Using Yarn:

yarn add @polyfire/chat

Using npm:

npm install @polyfire/chat

Repository

For more detailed information, contributions, or issues, visit the repository: polyfire-chat.

PropertyTypeDescriptionDefault (if applicable)
classNameChatContentChatContentClassNamePropsCustomize the class names for different elements within the chat content.-
styleChatContentChatContentStylePropsApply custom styles to different parts of the chat content.-
classNameClearModalClearClassNamePropsCustomize the class name for the clear modal.-
styleClearModalClearStylePropsApply custom styles to the clear modal.-
TitleClearModalstringSet the title for the clear modal.-
memoryIdstringAssign a unique identifier to the chat for memory purposes.-
heightstringDefine the height of the ChatUI component.100vh
widthstringDefine the width of the ChatUI component.70%
chatChatThe primary prop to render the chat content.-
renderAIFirstMessage() => React.ReactNodeCustomize the initial message displayed by the AI.Default AI greeting
renderPencilIcon() => React.ReactNodeCustomize the pencil icon displayed within the chat.Default pencil icon
renderSendIcon() => React.ReactNodeCustomize the send icon displayed within the chat.Default send icon
renderClearIcon() => React.ReactNodeCustomize the clear icon displayed within the chat.Default clear icon
placeholderTextstringDefine placeholder text for the chat input field.-
classNameChatContentClassNamePropsCustomize the class names for the main ChatUI component.-
styleChatContentStylePropsApply custom styles to the ChatUI component.-
Color CustomizationstringCustomize the color schemes for different elements within the ChatUI.-
botNamestringSpecify the name of the bot in the chat.-
initialMessagestringDefine the first message that appears in the chat upon initialization.-

* Note: Color Customization includes properties such as chatBackgroundColor, chatTextColor, inputBackgroundColor, and more as previously detailed.

Example:

<ChatUI
  chat={chatInstance}
  height="500px"
  width="80%"
  placeholderText="Type your message here..."
  botName="ChatBot"
  initialMessage="Welcome to ChatUI!"
  styleChatContent={{
    wrapper: { background: '#f5f5f5' },
    input: { borderColor: '#ddd' },
  }}
/>

Features

  • Highly Customizable: With various properties at your disposal, tailor the ChatUI as per your application's requirements.

  • Lightweight: Optimized to ensure minimal impact on performance while delivering an engaging user experience.

Contributing

Feel free to contribute to the ChatUI component by forking the repository and submitting a pull request. For major changes, please open an issue first to discuss what you would like to change.

License

The ChatUI component is licensed under the MIT License. See the LICENSE file in the repository for more information.

Support

For any issues, questions, or recommendations, please visit the repository's issue section or contact the maintainers directly. We appreciate your feedback and aim to make ChatUI the go-to solution for chat interfaces in React applications.

0.1.33

6 months ago

0.1.32

6 months ago

0.1.30

6 months ago

0.1.29

7 months ago

0.1.28

7 months ago

0.1.26

8 months ago

0.1.25

8 months ago

0.1.24

8 months ago

0.1.23

8 months ago

0.1.22

8 months ago

0.1.21

8 months ago

0.1.20

8 months ago

0.1.19

9 months ago

0.1.18

9 months ago

0.1.17

9 months ago

0.1.16

9 months ago

0.1.15

9 months ago

0.1.14

9 months ago

0.1.13

9 months ago

0.1.12

9 months ago

0.1.11

9 months ago

0.1.10

9 months ago

0.1.9

9 months ago

0.1.8

9 months ago

0.1.7

9 months ago

0.1.6

9 months ago

0.1.5

9 months ago

1.0.3

9 months ago

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago