CupThreadTheme

Material 3 Theme wrapper that applies the console-configured SdkTheme palette to content.

Automatically resolves the active SdkAppearance via rememberSdkAppearance and injects it into LocalSdkAppearance for descendant composables. Translates the remote SdkTheme setting (such as SdkTheme.OCEAN, SdkTheme.SUNSET, or SdkTheme.MIDNIGHT) into an Android Material 3 androidx.compose.material3.ColorScheme that adapts to system dark mode preferences.

Use CupThreadTheme when embedding standalone SDK composables (like ChangelogOverlay or custom feedback views) in an existing Jetpack Compose hierarchy:

class FeedbackActivity : ComponentActivity() {
private val client = FeedbackClient(FeedbackClientConfig("https://api.cupthread.com", "app_live_xyz"))
private val userTokenStore by lazy { UserTokenStore.create(this) }

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
CupThreadTheme(client) {
FeedbackComposer(
client = client,
userToken = userTokenStore.token,
onSubmit = { finish() }
)
}
}
}
}

Parameters

client

Shared FeedbackClient instance used to fetch remote appearance and theme settings.

content

Composable content to be styled with the resolved theme.