UIKit React Native v3
UIKit React Native
UIKit
React Native
Home
/
UIKit
/
React Native

Typing indicator

Typing indicator is a feature that allows users to know visually if another user in the channel is typing a message. The indicator UI appears in the Header component of the GroupChannelModule. The indicator remains visible until the user sends the message or deletes the text completely. If the user stops typing for more than 10 seconds, the indicator will also disappear.

Note : In order to use the typing indicator feature, you must first create a group channel and start using the chat service. To learn how to allow users to chat in a channel, refer to the chat in a group channel page.


How to use

Once a group channel is created, the typing indicator feature is turned on by default through the enableTypingIndicator prop of GroupChannelFragment or GroupChannelModule.Provider.


Customize the UI for typing indicator

The UI for typing indicator can be customized through the string resource, which is a set of strings used to compose the screen. The StringSet interface contains UIKit string values.

Text strings for typing status can vary depending on the number of members typing in a channel:

  • If one member is typing: ${string} is typing...
  • If two members are simultaneously typing: ${string} and ${string} are typing...
  • If more than two members are simultaneously typing: Several people are typing...

String resource

The following table shows a customizable property of StringSet.

CategoryPropertyDescription

LABELS

TYPING_INDICATOR_TYPINGS

Specifies a text indicating that a channel member is typing in the message input.

interface StringSet {
    LABELS: {
        TYPING_INDICATOR_TYPINGS: (users: Sendbird.User[]) => string | undefined;
    };
}