Customizing React UI
Swap out MinChat React UI comnponents with your own.
MinChat provides the capability to substitute parts of the User Interface (UI) with your own by passing down render functions. This feature empowers you to modify, personalize, and conceal certain UI elements, thereby enabling you to customize the chat experience to suit your website's needs.
Functionality Customization
Hide File Attachment Button
the showAttachButton
property is used to show or hide the file attachment button on the left of the message input. The default value is true
.
Hide Send Button
The showSendButton
property is used to show or hide the send button on the right of the message input. The default value is true
.
Disable Message Input
The disableInput
property is used to disable the message input field and not allow anything to be typed or sent. The default value is false
.
UI Customization
Height
The height
property is used to determine the height of the MinChat UI in CSS. the default value is 100vh
Theme
The theme
property is used to set the color scheme of the MinChat User Interface (UI). It takes a CSS color code as its value.
Render Chat List
Property | Type | Description |
---|---|---|
| The current User connected to minchat. | |
|
| An array of the chats, you can call functions of the chats such as |
|
| This property displays a loading state while the chats are being retrieved. |
|
| The currently selected chat is considered the active chat. The messages displayed in the MessageList are from this active chat. you can call functions of the selectedChat such as |
|
| This function is used to retrieve the next page of users. The chats are paginated, with 25 chats per page. The paginate function is throttled to avoid abuse. |
|
| This function is utilized to choose a specific chat for displaying its messages. |
|
| The MinChat UI view is considered to be in mobile mode when this property is true. You can use this to customize your component if you require different views for desktop and mobile. |
Render Chat Item
Property | Type | Description |
---|---|---|
| You can call functions of the chat such as | |
|
| The MinChat UI view is considered to be in mobile mode when this property is true. You can use this to customize your component if you require different views for desktop and mobile. |
Render Empty Chats
Property | Type | Description |
---|---|---|
|
| The MinChat UI view is considered to be in mobile mode when this property is true. You can use this to customize your component if you require different views for desktop and mobile. |
Render Chat List Header
Property | Type | Description |
---|---|---|
|
| The MinChat UI view is considered to be in mobile mode when this property is true. You can use this to customize your component if you require different views for desktop and mobile. |
Render Loader
Property | Type | Description |
---|---|---|
|
| The MinChat UI view is considered to be in mobile mode when this property is true. You can use this to customize your component if you require different views for desktop and mobile. |
Render Message List
Property | Type | Description |
---|---|---|
| The current User connected to minchat. | |
|
| An array of messages in a chat. |
|
| This property displays a loading state while the messages are being retrieved. |
|
| This function is used to retrieve the next page of messages. The messages are paginated, with 25 messages per page. The paginate function is throttled to avoid abuse. |
|
| This refers to a user who is currently typing in the chat. It remains undefined when there is no user typing. |
|
| The MinChat UI view is considered to be in mobile mode when this property is true. You can use this to customize your component if you require different views for desktop and mobile. |
Render Empty Messages
Property | Type | Description |
---|---|---|
|
| The MinChat UI view is considered to be in mobile mode when this property is true. You can use this to customize your component if you require different views for desktop and mobile. |
Render Input
Property | Type | Description |
---|---|---|
|
| Function to send message. |
|
| This function is used to send a file. When invoked, it automatically opens a file picker. Once a user selects a file, the file is immediately sent in the chat. |
|
| *Required: contains props that need to be added onto the input element of your component.
|
|
| The MinChat UI view is considered to be in mobile mode when this property is true. You can use this to customize your component if you require different views for desktop and mobile. |
Render Message List Header
Property | Type | Description |
---|---|---|
|
| The title of the chat. |
|
| This function is used to clear the currently selected chat and its messages. (i.e It can be invoked on a back button click) |
|
| shows the date when the other participant of the conversation was last active. |
|
| The MinChat UI view is considered to be in mobile mode when this property is true. You can use this to customize your component if you require different views for desktop and mobile. |
Render Is Typing
Property | Type | Description |
---|---|---|
|
| The MinChat UI view is considered to be in mobile mode when this property is true. You can use this to customize your component if you require different views for desktop and mobile. |
| The user that is typing. |
Last updated