id | title |
---|---|
component_context |
ComponentContext |
import GHComponentLink from '../../_docusaurus-components/GHComponentLink';
The ComponentContext
is a one of the context providers exposed by the Channel
component and is
consumable by all the children of Channel
. This context provides UI component override options for maximum customization.
All UI overrides that target children of the Channel
component should be placed as Channel
component props in order to be injected into the ComponentContext
.
The ComponentContext
also exposes the hook useComponentContext
.
Pull values from context with our custom hook:
const { Attachment, Avatar, Message } = useComponentContext();
Custom UI component to display attachment in an individual message.
Type | Default |
---|---|
component |
Custom UI component to display a attachment previews in MessageInput
.
Type | Default |
---|---|
component |
Custom UI component to override the default suggestion header component.
Type | Default |
---|---|
component |
Custom UI component to override the default suggestion Item component.
Type | Default |
---|---|
component |
Custom UI component to override the default List component that displays suggestions.
Type | Default |
---|---|
component |
Custom UI component to display a user's avatar.
Type | Default |
---|---|
component |
Custom UI component to display image resp. a fallback in case of load error, in <img/>
element. The default resp. custom (from ComponentContext
) BaseImage
component is rendered by:
- - single image attachment in message list
- - group of image attachments in message list
- - image uploads preview in message input (composer)
The BaseImage
component accepts the same props as <img/>
element.
The default BaseImage
component tries to load and display an image and if the load fails, then an SVG image fallback is applied to the <img/>
element as a CSS mask targeting attached str-chat__base-image--load-failed
class.
Type | Default |
---|---|
component |
Custom UI component to display the slow mode cooldown timer.
Type | Default |
---|---|
component |
Custom UI component to render set of buttons to be displayed in the .
Type | Default |
---|---|
component |
Custom UI component for date separators.
Type | Default |
---|---|
component |
Custom UI component to override default edit message input.
Type | Default |
---|---|
component |
Custom UI component for emoji button in input.
Type | Default |
---|---|
component |
Custom UI component to be displayed when the MessageList
is empty.
Type | Default |
---|---|
component |
Custom UI component for file upload icon.
Type | Default |
---|---|
component |
Custom UI component to render a Giphy preview in the VirtualizedMessageList
.
Type | Default |
---|---|
component |
Custom UI component to render at the top of the MessageList
.
Type | Default |
---|---|
component | none |
Custom UI component handling how the message input is rendered.
Type | Default |
---|---|
component |
Custom component to render link previews in MessageInput
.
Type | Default |
---|---|
component |
Custom UI component to be shown if the channel query fails.
Type | Default |
---|---|
component |
Custom UI component to render while the MessageList
is loading new messages.
Type | Default |
---|---|
component |
Custom UI component to display a message in the standard MessageList
.
Type | Default |
---|---|
component |
Custom UI component for a deleted message.
Type | Default |
---|---|
component |
Custom UI component that displays message and connection status notifications in the MessageList
.
Type | Default |
---|---|
component |
Custom UI component to display a notification when scrolled up the list and new messages arrive.
Type | Default |
---|---|
component |
Custom UI component for message options popup.
Type | Default |
---|---|
component |
Custom UI component to display message replies.
Type | Default |
---|---|
component |
Custom UI component to display message delivery status.
Type | Default |
---|---|
component |
Custom UI component to display system messages.
Type | Default |
---|---|
component |
Custom UI component to display a timestamp on a message. This does not include a timestamp for edited messages.
Type | Default |
---|---|
component |
See also Timestamp
.
Custom UI component for the content of the modal dialog for messages that got bounced by the moderation rules.
Type | Default |
---|---|
component |
Custom UI component for viewing message's image attachments.
Type | Default |
---|---|
component |
Custom UI component to override default pinned message indicator.
Type | Default |
---|---|
component |
Custom UI component to override quoted message UI on a sent message.
Type | Default |
---|---|
component |
Custom UI component to override the message input's quoted message preview.
Type | Default |
---|---|
component |
Custom UI component to display the reaction selector.
Type | Default |
---|---|
component |
Custom UI component to display the list of reactions on a message.
Type | Default |
---|---|
component |
Custom UI component for send button.
Type | Default |
---|---|
component |
Custom UI component to be displayed at the beginning of a thread. By default, it is the thread parent message. It is composed of Message context provider component and ThreadStart component. The latter can be customized by passing custom component to Channel
props. The ThreadHead
component defaults to and accepts the same props as MessageSimple.
Type | Default |
---|---|
component |
Custom UI component to display the header of a Thread
.
Type | Default |
---|---|
component |
Custom UI component to replace the MessageInput
of a Thread
. For the applications using theme version 1, the default is MessageInputSmall
. Applications using theme version 2 will use MessageInputFlat
by default.
Type | Default |
---|---|
component | / |
Custom UI component to display the start of a threaded MessageList
.
Type | Default |
---|---|
component |
Custom UI component to display a date used in timestamps. It's used internally by the default MessageTimestamp
, and to display a timestamp for edited messages.
Type | Default |
---|---|
component |
Optional context provider that lets you override the default autocomplete triggers.
Type | Default |
---|---|
component |
Custom UI component for the typing indicator.
Type | Default |
---|---|
component |
Custom UI component that indicates a user is viewing unread messages. It disappears once the user scrolls to UnreadMessagesSeparator
.
Type | Default |
---|---|
component |
Custom UI component inserted before the first message marked unread.
Type | Default |
---|---|
component |
Custom UI component to display a message in the VirtualizedMessageList
.
Type | Default |
---|---|
component |