Ui Text
A string that has not been resolved yet — either a literal the host supplied, or a resource the library will resolve against the current configuration.
Every user-facing string in the library flows through this type. That keeps the components free of hardcoded English while still letting a host override any title, subtitle or message with a plain String at the call site:
CountrySelector(
label = UiText.of("Nationality"), // literal
placeholder = UiText.resource(Res.string.pick_market), // host Compose resource
)Content copied to clipboard
Resources are Compose Multiplatform resources, so the same call works from common code on every platform. On Android, UiText.resource(R.string.pick_market) with a classic @StringRes id is also accepted (see the Android source set), for hosts whose strings live in res/values.