SkapaTheme2

fun SkapaTheme2(darkTheme: Boolean = false, fontFamily: FontFamily = NotoIkeaLatin, typeScale: SkapaTypeScale = SkapaTypeScale.Auto, baseFontSize: TextUnit = 14.sp, content: @Composable () -> Unit)

Skapa Theming

This theme is an extension of the Jetpack Compose MaterialTheme using Material 3.

Skapa components such as Button and Switch use values provided here when retrieving default values.

It defines colours as specified in the Skapa System colours spec, typeface and typography defined in the Skapa Typography spec.

Dark Theme is disabled by default. It can be enabled by setting the parameter to true or providing isSystemInDarkTheme() to use the same UI mode as the system.

Parameters

darkTheme

A control to enable and disable dark mode. Note: If you want to ONLY use light mode this needs to be set AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO) in your main AppCompatActivity as well.

fontFamily

The font family used to render components and text styles. Default value is NotoIkeaLatin if another font language is needed add it to the project using the font package in your build.gradle file implementation("net.ikea.skapa:fonts:$fontLanguage") check the available options on "Using the Library" section in the main page

typeScale

A mode to determine the type scale for the Skapa typography system. The default mode is SkapaTypeScale.SmallScreen.

baseFontSize

The base font size used to calculate the text styles. Default value is 14.sp. Increasing this value will increase the text size across the board.

content

The content to be wrapped in the SkapaTheme.