← All modules

Theme

BuiltSingleton

Provides access to the active theme's design tokens (colors, typography, radius, elevation, spacing, border, opacity)

Module typetheme
Default expression IDtheme
Refresh ratestatic

Properties

Reference any of these from a template via{theme:propertyName}.

NameDescriptionExampleFormat arg
colors.primaryPrimary brand color#6200EA—
colors.onPrimaryColor for content on primary#FFFFFF—
colors.secondarySecondary brand color#03DAC5—
colors.onSecondaryColor for content on secondary#000000—
colors.backgroundApp background color#121212—
colors.surfaceSurface/card background color#1E1E1E—
colors.onSurfacePrimary text color on surface#FFFFFF—
colors.errorError/alert color#CF6679—
colors.tertiaryTertiary accent color#EDE7F6—
colors.outlineOutline/border color#938F99—
colors.surfaceVariantSurface variant color#49454F—
typography.bodyLarge.fontSizeBody large font size16sp—
typography.bodyLarge.fontWeightBody large font weight400—
typography.headlineMedium.fontSizeHeadline medium font size28sp—
typography.displayLarge.fontSizeDisplay large font size57sp—
radius.smallSmall corner radius8dp—
radius.mediumMedium corner radius12dp—
radius.largeLarge corner radius16dp—
elevation.level1Elevation level 11dp—
elevation.level2Elevation level 23dp—
spacing.smallSmall spacing8dp—
spacing.mediumMedium spacing16dp—
spacing.largeLarge spacing24dp—
border.thinThin border width1dp—
border.mediumMedium border width2dp—
opacity.highHigh opacity0.87—
opacity.mediumMedium opacity0.60—
opacity.disabledDisabled opacity0.38—