AiElementsTheme

@Composable
fun AiElementsTheme(darkTheme: Boolean = isSystemInDarkTheme(), dynamicColor: Boolean = true, palette: AiPalette = AiPalette.VIOLET, contrast: AiContrast = AiContrast.STANDARD, fontFamily: FontFamily? = null, codeFontFamily: FontFamily = FontFamily.Monospace, colorScheme: ColorScheme? = null, typography: Typography? = null, shapes: Shapes = ExpressiveShapes, openLinksInCustomTabs: Boolean = true, content: @Composable () -> Unit)(source)

Material 3 Expressive theme for AI Elements: expressive motion (spring based), rounder shapes, and dynamic color on Android 12+; otherwise (or with dynamicColor off) one of the generated AiPalette schemes.

Parameters

palette

used when dynamic color is off or unavailable.

contrast

Material 3 contrast level of the palette scheme.

fontFamily

applied to every Material type style (null keeps the platform font). Glyphs it lacks (e.g. CJK in a Latin font) fall back to the system fonts.

codeFontFamily

code blocks, inline code and tool arguments.

colorScheme

your brand's colors; overrides dynamicColor and palette.

typography

your type scale; overrides fontFamily.

shapes

your shapes; the Material 3 Expressive set by default.

openLinksInCustomTabs

web links in elements (citations, sources, Markdown, A2UI, MCP Apps) open in a Custom Tab with the theme's colours (CustomTabsUriHandler); false keeps the platform's LocalUriHandler (the default browser), or provide your own inside the theme.