You will find here AddChildren definition and its attributes details

What is it?

The AddChildren class is responsible for adding - at the beginning or in the end - or changing all views that inherit from Widget and who accept children.

The addChildren structure is:

componentIdStringDefines the widget’s id, in which you want to add the views.
valueList<ServerDrivenComponent> or BindingDefines the list of children you want to add.
modeModeDefines the placement of where the children will be inserted in the list or if the contents of the list will be replaced. By default the set mode is APPEND.


It is an ENUM, which values are:

APPENDAdds the view in the end of the children’s list.
PREPENDAdds the view on the beginning of the children’s list.
REPLACEReplaces all children of the widget.

How to use it?

    children = listOf(
        Button("AddChildren", onPress = listOf(
                componentId = "containerId",
                value = listOf(
                    Text("New text added")
				mode = Mode.APPEND
).apply { id = "containerId" }