Skip to main content
Auth0 Universal Components for Android use a design token model. Visual properties such as colors, typography, spacing, corner radii, and component sizes are each expressed as a token that you can override without changes to your layouts. Universal Components ship with a default Auth0 theme. You can provide your own theme to match your brand.

How theming works

Universal Components for Android use a Jetpack Compose theme that mirrors Material 3’s MaterialTheme pattern. You can wrap SDK content using Auth0Theme { ... } to provide tokens, or pass themeConfiguration directly to AuthenticatorSettingsComponent. You can read tokens inside any composable using Auth0Theme.colors, Auth0Theme.typography, Auth0Theme.shapes, Auth0Theme.dimensions, and Auth0Theme.sizes.

Zero configuration

If you do not configure a theme, Universal Components for Android render the Auth0 default theme. The following example displays the AuthenticatorSettingsComponent without any customization:
No additional setup is required to load the Auth0 default theme. Universal Components apply it automatically when no custom theme is provided.

Override a subset of tokens

You can override specific tokens while Universal Components for Android render every other token using the Auth0 default theme. The following example overrides the tokens Auth0Color.light().copy(...), Auth0Color.dark(), or Auth0Typography.default().copy(...):

Force dark mode

To force dark mode, you can wrap the component in Auth0Theme(darkTheme = true) or pass the dark color scheme explicitly:

Configure a full brand theme

Provide your own branding theme that combines colors, typography, and shapes into a single Auth0ThemeConfiguration configuration:

Read theme tokens in your own composables

Access theme tokens inside an Auth0Theme { ... } composable using the accessor object:

Switch themes at runtime

You can keep the theme configuration in state to swap between light and dark (or brand variants) without recreating the screen:

Token reference

To customize colors use Auth0Color.light() and Auth0Color.dark() factories as starting points and .copy(...) to override specific tokens.
To customize typography use the compose token TextStyle. You can override it with Auth0Typography.default().copy(...).
Spacing defaults to a 4 dp grid. Access spacing tokens with Auth0Theme.dimensions.*.
Access component dimensions with Auth0Theme.sizes.*.

Learn more

Install the Android SDK

Platform prerequisites and installation for Android.

Build a Self-Service Account Security Interface

Initialize the SDK and wire the token provider to your Auth0 tenant.