HatangChatLauncher

fun HatangChatLauncher(modifier: Modifier = Modifier, onClick: () -> Unit? = null, showBadge: Boolean = true, engine: ChatEngine? = null, icon: @Composable () -> Unit? = null)

A floating chat button with an unread badge. Place it over your content (for example Modifier.align(Alignment.BottomEnd).padding(16.dp) in a Box, or as a Scaffold FAB). Tapping calls onClick, or HatangChat.open.

It uses the site's brand colour and the icon or image and label set for the launcher in the dashboard (a label makes it an extended button such as "Hỗ trợ"), and hides itself while the team is away when the site asks for that (hide_when_offline). Renders nothing before HatangChat.configure.

Parameters

icon

custom icon, replacing the site's icon and label.