Start native apps faster with the Composables CLI ->
Object

MaterialTheme

Contains functions to access the current theme values provided at the call site's position in the hierarchy.

Source set: Common
public object MaterialTheme

Contains functions to access the current theme values provided at the call site's position in the hierarchy.

Properties

colorScheme

Source set: Common
public val colorScheme: ColorScheme

Retrieves the current ColorScheme at the call site's position in the hierarchy.

typography

Source set: Common
public val typography: Typography

Retrieves the current Typography at the call site's position in the hierarchy.

shapes

Source set: Common
public val shapes: Shapes

Retrieves the current Shapes at the call site's position in the hierarchy.

motionScheme

Source set: Common
public val motionScheme: MotionScheme

Retrieves the current MotionScheme at the call site's position in the hierarchy.

LocalMaterialTheme

Source set: Common
public val LocalMaterialTheme: CompositionLocal<Values>

CompositionLocal providing MaterialTheme subsystems throughout the hierarchy. You can use properties in the companion object to access specific subsystems, for example colorScheme. To provide a new value for this, use MaterialTheme. This API is exposed to allow retrieving values from inside CompositionLocalConsumerModifierNode implementations - in most cases you should use colorScheme and other properties directly.

LocalMotionScheme

Source set: Common
@Deprecated(
        level = DeprecationLevel.WARNING,
        message = "Use [LocalMaterialTheme.current.motionScheme] instead",
    )
    public val LocalMotionScheme: CompositionLocal<MotionScheme>

A read-only CompositionLocal that provides the current MotionScheme to Material 3 components.

The motion scheme is typically supplied by MaterialTheme.motionScheme and can be overridden for specific UI subtrees by wrapping it with another MaterialTheme.

This API is exposed to allow retrieving motion values from inside CompositionLocalConsumerModifierNode implementations, but in most cases it's recommended to read the motion values from MaterialTheme.motionScheme.

Members

Values

Source set: Common
public class Values(
        public val colorScheme: ColorScheme = lightColorScheme(),
        public val typography: Typography = Typography(),
        public val shapes: Shapes = Shapes(),
        public val motionScheme: MotionScheme = standard(),
    )

Material 3 contains different theme subsystems to allow visual customization across a UI hierarchy.

Components use properties provided here when retrieving default values.

Functions

equals

Source set: Common
override fun equals(other: Any?): Boolean

hashCode

Source set: Common
override fun hashCode(): Int

toString

Source set: Common
override fun toString(): String