Package-level declarations

Types

Link copied to clipboard
fun interface ElevationOverlay

An ElevationOverlay is an overlay applied to the background color of Surface components, used to emphasize elevation in dark theme, where shadows are not as visible. An ElevationOverlay does not replace the shadows drawn by a Surface, but is used as an additional representation of elevation.

Properties

Link copied to clipboard

CompositionLocal containing the ElevationOverlay used by Surface components. Provide null to turn off ElevationOverlays for the children within this CompositionLocal..

Functions

Link copied to clipboard
fun Surface(modifier: Modifier = Modifier, shape: Shape = SparkTheme.shapes.none, color: Color = SparkTheme.colors.surface, contentColor: Color = contentColorFor(color), elevation: Dp = 0.dp, border: BorderStroke? = null, content: @Composable () -> Unit)
fun Surface(onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, shape: Shape = SparkTheme.shapes.none, color: Color = SparkTheme.colors.surface, contentColor: Color = contentColorFor(color), elevation: Dp = 0.dp, border: BorderStroke? = null, interactionSource: MutableInteractionSource? = null, content: @Composable () -> Unit)
fun Surface(selected: Boolean, onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, shape: Shape = SparkTheme.shapes.none, color: Color = SparkTheme.colors.surface, contentColor: Color = contentColorFor(color), elevation: Dp = 0.dp, border: BorderStroke? = null, interactionSource: MutableInteractionSource? = null, content: @Composable () -> Unit)
fun Surface(checked: Boolean, onCheckedChange: (Boolean) -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, shape: Shape = SparkTheme.shapes.none, color: Color = SparkTheme.colors.surface, contentColor: Color = contentColorFor(color), elevation: Dp = 0.dp, border: BorderStroke? = null, interactionSource: MutableInteractionSource? = null, content: @Composable () -> Unit)

Material surface is the central metaphor in material design. Each surface exists at a given elevation, which influences how that piece of surface visually relates to other surfaces and how that surface is modified by tonal variance.