replacingView

A library in which view draws the component named name, which keeps its props, such as to restyle the chat library's buttons. view gets the component's props, and the library's own view of it, ComponentRenderProps.DefaultView, to wrap or restyle. It is the same library when it has no such component, or when the component is data its parent reads.

val library = openuiChatLibrary.replacingView("Button") { props ->
Box(Modifier.border(1.dp, Color.Red)) { props.DefaultView() }
}
OpenUIRenderer(library = library)

Parameters

name

The component's name, such as "Button".

view

Draws the component.