MessagingInAppUI

open fun MessagingInAppUI(onExit: () -> Unit)

A Composable that renders the full messaging UI for this client instance.

Embed this directly in your Compose navigation graph for full control over the hosting context. The composable manages its own internal navigation (pre-chat form, chat feed, transcript download, etc.) and calls onExit when the user navigates back from the root screen.

This composable can also be presented in a ModalBottomSheet for a modal experience:

Parameters

onExit

Called when the user exits the messaging UI. Typically used to pop the navigation stack or finish the hosting activity.

Samples

uiClient.MessagingInAppUI(onExit = {
    // Navigate back or finish the activity
})
val coroutineScope = rememberCoroutineScope()
val sheetState = rememberModalBottomSheetState(skipPartiallyExpanded = true)

val dismissSheet: () -> Unit = {
    coroutineScope.launch { sheetState.hide() }
}

ModalBottomSheet(
    onDismissRequest = { /* Update state to close */ },
    sheetState = sheetState
) {
    Box(Modifier.fillMaxHeight(0.9f)) {
        uiClient.MessagingInAppUI {
            dismissSheet()
        }
    }
}