Skip to main content
Primer Checkout Android SDK is currently in beta (v3.0.0-beta.4). The API is subject to change before the stable release.
Root theme container holding all design token groups. Pass to PrimerCheckoutSheet or PrimerCheckoutHost via the theme parameter.

Definition

Properties

Methods

colorTokens

Returns darkColorTokens when darkTheme is true, lightColorTokens otherwise. Defaults to the system theme.

Material 3 Integration

PrimerTheme automatically maps color tokens to a Material 3 ColorScheme. Material components used within the checkout tree (such as ModalBottomSheet) inherit your Primer tokens without additional configuration. Both PrimerCheckoutSheet and PrimerCheckoutHost wrap content in a MaterialTheme that applies this mapping internally.

Color mapping

Overriding a Primer token automatically updates every M3 role that references it. No separate M3 configuration is needed.

LocalPrimerTheme

Compose CompositionLocal providing the current PrimerTheme. Set automatically by PrimerCheckoutSheet and PrimerCheckoutHost. Access with LocalPrimerTheme.current inside the checkout composable tree.