text

open fun text(content: String): ComponentBuilder

Appends a text component with the specified string content.

Return

this component builder for chaining

Parameters

content

the string content to append


open fun text(content: String, consumer: Styler.() -> Unit): ComponentBuilder

Appends a text component with the specified string content and applies additional configuration. This method combines appending text with a nested component builder scope, allowing you to build complex component hierarchies in a fluent way.

Return

this component builder for chaining

Parameters

content

the string content to append

consumer

the consumer lambda that operates on a component builder to configure the appended text