ViewComponents

interface ViewComponents

A container for all customizable Composable components in the Messaging for In-App UI.

Implement this interface to override the default rendering of chat feed entries, the top app bar, the conversation-closed banner, or markdown text content. Assign your implementation to UIClient.viewComponents before the UI is displayed.

Each method receives a content lambda that renders the SDK's default composable for that slot. You can:

  • Call content() to keep the default rendering.

  • Ignore content() and render your own composable to fully replace the default.

  • Wrap content() with additional composables to augment the default.

  • Return without rendering anything to hide the component entirely.

See also

Samples

uiClient.viewComponents = object : ViewComponents {
    @Composable
    override fun ChatFeedEntry(
        entry: ChatFeedEntry,
        content: @Composable () -> Unit
    ) {
        content()
    }
}

Inheritors

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open fun ChatFeedEntry(entry: ChatFeedEntry, content: @Composable () -> Unit)

Renders a single entry in the chat feed.

Link copied to clipboard
open fun ChatTopAppBar(content: @Composable () -> Unit)

Renders the top app bar displayed at the top of each messaging screen.

Link copied to clipboard
open fun ConversationClosed(content: @Composable () -> Unit)

Renders the banner displayed when the conversation has been closed by the agent or system.

Link copied to clipboard
@ApiStatus.Experimental
open fun MarkdownContent(text: String, content: @Composable () -> Unit)

Renders text content that may contain markdown formatting.