MessageInput

fun MessageInput(messageComposerState: MessageComposerState, modifier: Modifier = Modifier, onValueChange: (String) -> Unit = {}, onAttachmentRemoved: (Attachment) -> Unit = {}, onCancelAction: () -> Unit = {}, onLinkPreviewClick: (LinkPreview) -> Unit? = null, onCancelLinkPreviewClick: () -> Unit? = null, onSendClick: (String, List<Attachment>) -> Unit = { _, _ -> }, onAlsoSendToChannelChange: (Boolean) -> Unit = {}, recordingActions: AudioRecordingActions = AudioRecordingActions.None, onActiveCommandDismiss: () -> Unit = {})

Input field for the Messages/Conversation screen. Allows label customization, as well as handlers when the input changes.

Parameters

messageComposerState

The state of the input.

modifier

Modifier for styling.

onValueChange

Handler when the value changes.

onAttachmentRemoved

Handler when the user removes a selected attachment.

onCancelAction

Handler when the cancel action is clicked.

onLinkPreviewClick

Handler when a link preview is clicked.

onCancelLinkPreviewClick

Handler when the cancel link preview button is clicked.

onSendClick

Handler when the send button is clicked.

onAlsoSendToChannelChange

Handler when the "Also send to channel" checkbox is changed.

recordingActions

The AudioRecordingActions to be applied to the input.

onActiveCommandDismiss

Called when the user taps the dismiss button on the command chip.