Shared types
Holds information about your TalkJS app.
Custom data set for this app.
This can be configured from your TalkJS dashboard.
The default locale.
This can be configured from your TalkJS dashboard.
Your app's unique TalkJS ID. You can find it on the Settings page of the TalkJS dashboard.
The name of your app.
A collection of props that's shared by every themed component used in the Chatbox UI.
Holds information about your TalkJS app.
The current state of the chat search
Public interface of the chatbox instance.
The conversation displayed in the chatbox.
The ID of the conversation displayed in the chatbox.
Prefer this field instead of common.conversation.id (which always has the same value), as this enables an optimization that prevents needless re-renders.
The user that mounted this chatbox.
Describes the capabilities of the current device.
The message that was most recently scrolled into view as a result of calling one of the following methods: ChatboxController.focusMessage, ChatboxController.jumpToPreviousHighlight or ChatboxController.jumpToNextHighlight
The underlying TalkJS session object that handles sending and receiving chat data.
A translation object which holds localized strings for internationalization purposes.
The theme object that the chatbox is currently using.
Tells you which participants are currently typing.
Arbitrary custom data passed down to the theme.
The data that you pass to ChatboxProps.themeCustom will show up here so that you can use it from within theme components.
A collection of props that's shared by every themed component used in the ConversationList UI.
Holds information about your TalkJS app.
Public interface of the conversation list instance.
The user that mounted this chatbox.
Describes the capabilities of the current device.
The underlying TalkJS session object that handles sending and receiving chat data.
A translation object which holds localized strings for internationalization purposes.
The theme object that the conversation list is currently using.
Arbitrary custom data passed down to the theme.
The data that you pass to ConversationListProps.themeCustom will show up here so that you can use it from within theme components.
Describes the capabilities of the current device.
True if the user agents reports the current device as a mobile/tablet.
True if the browser supports IndexedDB, which the emoji picker depends on.
Lets you query and control the message editor.
Available inside the MessageField theme component. Connects with the internals of the Editor system component.
| attachFile | Open the "attach file" dialog |
| recordVoiceMessage | Start recording a voice message |
| send | Send the message and clear the editor |
| shareLocation | Open the "share location" dialog |
| toggleEmojiPicker | Open or close the emoji picker |
True if the maximum message length has been exceeded.
Sending should be disabled when true
The number of characters in the editor.
Note that this is an estimation, and it may slightly exceed the actual number of characters in the editor.
True if the editor is empty.
Whether the emoji picker should be shown. Toggle with toggleEmojiPicker.
editorController.attachFile()
Open the "attach file" dialog
Returns
editorController.recordVoiceMessage()
Start recording a voice message
Returns
editorController.send()
Send the message and clear the editor
Returns
editorController.shareLocation()
Open the "share location" dialog
Returns
editorController.toggleEmojiPicker()
Open or close the emoji picker
Returns
A set of permissions the current user has for a given message.
The values of these permissions come from the user's role.
True if the user has the ability to add an emoji reaction to the given message.
True if the user has the ability to delete the given message.
True if the user has the ability to edit the given message.
True if the user has the permission to leave a given conversation.
True if the user has the permission to mark the given conversation as unread.
True if mentions are enabled.
True if the user has the ability to reply to the given message.
True if the user can use search and other related features.
True if voice messages are enabled.
True if file sharing is enabled.
True if location sharing is enabled.
True if online status indicators are enabled.
True if typing indicators are enabled.
The current status of the message.
This type can have one of these values:
- "sending" - Message is still being sent to the server. a loading spinner is typically shown in chat UIs.
- "sent" - Message has arrived on the server. Typically represented using a single checkmark in chat UIs.
- "everyoneRead" - Everyone in the conversation has read this message. Typically represented using two checkmarks in chat UIs.
- "virtual" - a virtual message made with the
A theme can be used to customize the appearance & behavior of your TalkJS Chatbox and/or ConversationList.
The implementation of TalkJS's default theme is open-source and available on Github.
Translation object
A set of permissions for the current user.
The values of these permissions come from the user's role.
True if the user has the permission to leave a given conversation.
True if the user has the permission to mark the given conversation as unread.
True if mentions are enabled.
True if the user can use search and other related features.
True if voice messages are enabled.
True if file sharing is enabled.
True if location sharing is enabled.
True if online status indicators are enabled.
True if typing indicators are enabled.
Controller for voice recording. Contains methods and fields related to the voice message currently being recorded.
Use EditorController.recordVoiceMessage to begin recording a voice message.
| cancel | Cancels the recording or preview process. |
| send | Sends a message containing the just uploaded voice recording. |
| stop | Stops the voice recording and changes the state to "previewing". This also starts the process of uploading the audio file. |
The amount of seconds since the user began recording.
Whether "recording" or "previewing".
When not recording at all, the voiceController field is undefined.
TalkJS will immediately upload the voice message while it's being previewed. This field lets you know how that's coming along.
Defined after stop() has been called. Pass to the src prop of AudioPlayer to preview the recording.
voiceRecorderController.cancel()
Cancels the recording or preview process.
Returns
voiceRecorderController.send()
Sends a message containing the just uploaded voice recording.
Returns
voiceRecorderController.stop()
Stops the voice recording and changes the state to "previewing". This also starts the process of uploading the audio file.