Theme
Built Singleton
Provides access to the active theme's design tokens (colors, typography, radius, elevation, spacing, border, opacity)
| Module type | theme |
|---|---|
| Default expression ID | theme |
| Refresh rate | static |
Properties
Reference any of these from a template via
{theme:propertyName}.
| Name | Description | Example | Format arg |
|---|---|---|---|
colors.primary | Primary brand color | #6200EA | — |
colors.onPrimary | Color for content on primary | #FFFFFF | — |
colors.secondary | Secondary brand color | #03DAC5 | — |
colors.onSecondary | Color for content on secondary | #000000 | — |
colors.background | App background color | #121212 | — |
colors.surface | Surface/card background color | #1E1E1E | — |
colors.onSurface | Primary text color on surface | #FFFFFF | — |
colors.error | Error/alert color | #CF6679 | — |
colors.tertiary | Tertiary accent color | #EDE7F6 | — |
colors.outline | Outline/border color | #938F99 | — |
colors.surfaceVariant | Surface variant color | #49454F | — |
typography.bodyLarge.fontSize | Body large font size | 16sp | — |
typography.bodyLarge.fontWeight | Body large font weight | 400 | — |
typography.headlineMedium.fontSize | Headline medium font size | 28sp | — |
typography.displayLarge.fontSize | Display large font size | 57sp | — |
radius.small | Small corner radius | 8dp | — |
radius.medium | Medium corner radius | 12dp | — |
radius.large | Large corner radius | 16dp | — |
elevation.level1 | Elevation level 1 | 1dp | — |
elevation.level2 | Elevation level 2 | 3dp | — |
spacing.small | Small spacing | 8dp | — |
spacing.medium | Medium spacing | 16dp | — |
spacing.large | Large spacing | 24dp | — |
border.thin | Thin border width | 1dp | — |
border.medium | Medium border width | 2dp | — |
opacity.high | High opacity | 0.87 | — |
opacity.medium | Medium opacity | 0.60 | — |
opacity.disabled | Disabled opacity | 0.38 | — |