Skip to main content
Primer Checkout Android SDK is currently in beta (v3.0.0-beta.8). 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

PrimerAppearanceMode

Methods

isDarkAppearance

Returns true when the checkout is dark right now, given appearanceMode and the system setting.

colorTokens

Returns darkColorTokens when darkTheme is true, lightColorTokens otherwise. Defaults to the appearance resolved from appearanceMode.

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. The primerColorGray*, primerColorRed*, primerColorBlue*, and primerColorGreen* palette tokens are internal; override the semantic tokens instead.

LocalPrimerTheme

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