public object MaterialTheme
Contains functions to access the current theme values provided at the call site's position in the hierarchy.
Properties
colorScheme
public val colorScheme: ColorScheme
Retrieves the current ColorScheme at the call site's position in the hierarchy.
typography
public val typography: Typography
Retrieves the current Typography at the call site's position in the hierarchy.
shapes
public val shapes: Shapes
Retrieves the current Shapes at the call site's position in the hierarchy.
motionScheme
public val motionScheme: MotionScheme
Retrieves the current MotionScheme at the call site's position in the hierarchy.
LocalMaterialTheme
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
@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
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
override fun equals(other: Any?): Boolean
hashCode
override fun hashCode(): Int
toString
override fun toString(): String