SparkTheme

fun SparkTheme(colors: SparkColors = SparkTheme.colors, shapes: SparkShapes = SparkTheme.shapes, typography: SparkTypography = SparkTheme.typography, sparkFeatureFlag: SparkFeatureFlag = SparkFeatureFlag(), fontFamily: SparkFontFamily = sparkFontFamily( useSparkTokensHighlighter = sparkFeatureFlag.useSparkTokensHighlighter, ), exceptionHandler: SparkExceptionHandler = if (LocalInspectionMode.current) { NoOpSparkExceptionHandler } else { DefaultSparkExceptionHandler }, content: @Composable () -> Unit)

Spark Theming refers to the customization of your Spark Design app to better reflect your product’s brand.

Spark components such as ButtonFilled and Checkbox use values provided here when retrieving default values.

All values may be set by providing this component with the colors, typography and shapes attributes. Use this to configure the overall theme of elements within this SparkTheme.

Any values that are not set will inherit the current value from the theme, falling back to the defaults if there is no parent SparkTheme.

Parameters

colors

A complete definition of the Spark Color theme for this hierarchy.

typography

A set of text styles to be used as this hierarchy's typography system.

shapes

A set of corner shapes to be used as this hierarchy's shape system.

fontFamily

the font family to be applied on typography.

sparkFeatureFlag

flags that activate debugging features from Spark or features hidden to consumers.

exceptionHandler

An instance of SparkExceptionHandler for handling logs within Spark components. Defaults to DefaultSparkExceptionHandler.