JengaTheme

fun JengaTheme(darkTheme: Boolean = isSystemInDarkTheme(), colors: JengaColors = if (darkTheme) jengaDarkColors() else jengaLightColors(), typography: JengaTypography? = null, spacing: JengaSpacing = jengaSpacing(), shapes: JengaShapes = jengaShapes(), sizing: JengaSizing = jengaSizing(), elevation: JengaElevation = jengaElevation(), motion: JengaMotion = jengaMotion(), icons: JengaIconSet? = null, components: JengaComponentStyles = JengaComponentStyles(), content: @Composable () -> Unit)(source)

Provides the Jenga design system to content.

Wrap your app (or any subtree) once; everything below can then read tokens via JengaTheme and use Jenga* components. Every parameter has a sensible default, so the simplest usage is just JengaTheme { ... }.

Rebrand or white-label by supplying your own tokens, e.g. JengaTheme(colors = jengaLightColors().copy(brand = Color(0xFF6D28D9))) { ... }.

A Material 3 theme is provided internally (mapped from these tokens) so M3 primitives such as ripples and text selection stay on-brand, but it is an implementation detail and not part of Jenga's API.

Parameters

darkTheme

whether to use the dark scheme; follows the system by default.

colors

semantic colors; defaults to the built-in light/dark scheme based on darkTheme.

typography

the type scale.

spacing

the spacing scale.

shapes

the corner-shape set.

sizing

the sizing set (touch targets, icon/control sizes).

elevation

the elevation ladder.

motion

the motion tokens.

icons

the semantic icons components draw; defaults to Jenga's own set.

components

theme-wide component styles; see JengaComponentStyles.

content

the themed content.


fun JengaTheme(brand: JengaBrand, darkTheme: Boolean = isSystemInDarkTheme(), colors: JengaColors = if (darkTheme) brand.darkColors() else brand.lightColors(), typography: JengaTypography? = null, spacing: JengaSpacing = brand.spacing(), shapes: JengaShapes = brand.shapes(), sizing: JengaSizing = brand.sizing(), elevation: JengaElevation = jengaElevation(), motion: JengaMotion = jengaMotion(), icons: JengaIconSet? = brand.icons, components: JengaComponentStyles = JengaComponentStyles(), content: @Composable () -> Unit)(source)

Provides Jenga themed from a single brand: one seed color yields a coherent, accessible light and dark scheme plus type, shape and density:

JengaTheme(
brand = jengaBrand(
seed = Color(
color = 0xFF6D28D9,
),
),
content = { App() },
)

Everything is derived from the brand and can be overridden one argument at a time; each override defaults to the brand-derived value.

Parameters

brand

the brand definition; see JengaBrand and jengaBrand.

darkTheme

whether to use the dark scheme; follows the system by default.

colors

overrides the derived scheme (light or dark, per darkTheme).

typography

overrides the derived type scale; null derives it from the brand, injecting Jenga's bundled font for any family the brand left unset.

spacing

the spacing scale; derived from the brand's density.

shapes

the corner-shape set; derived from the brand's corner style.

sizing

the sizing set; derived from the brand's density.

elevation

the elevation ladder.

motion

the motion tokens.

icons

the semantic icon set; the brand's, or Jenga's own if unset.

components

theme-wide component styles; see JengaComponentStyles.

content

the themed content.


fun JengaTheme(scheme: JengaScheme, darkTheme: Boolean = isSystemInDarkTheme(), typography: JengaTypography? = null, spacing: JengaSpacing = jengaSpacing(), shapes: JengaShapes = jengaShapes(), sizing: JengaSizing = jengaSizing(), elevation: JengaElevation = jengaElevation(), motion: JengaMotion = jengaMotion(), icons: JengaIconSet? = null, components: JengaComponentStyles = JengaComponentStyles(), content: @Composable () -> Unit)(source)

Provides Jenga from a fully hand-authored scheme (a light + dark JengaColors pair). The scheme is selected for the current darkTheme; other token bundles keep their defaults or can be overridden.

JengaTheme(
scheme = JengaScheme(
light = myLight,
dark = myDark,
),
content = { App() },
)

Parameters

scheme

the light + dark color pair.

darkTheme

whether to use the dark scheme; follows the system by default.

typography

the type scale; null uses Jenga's default (bundled font).

spacing

the spacing scale.

shapes

the corner-shape set.

sizing

the sizing set.

elevation

the elevation ladder.

motion

the motion tokens.

icons

the semantic icon set; Jenga's own if unset.

components

theme-wide component styles; see JengaComponentStyles.

content

the themed content.