Surface

fun Surface(modifier: Modifier = Modifier, shape: Shape = SurfaceDefaults.Shape, color: Color = MiuixTheme.colorScheme.surface, contentColor: Color = MiuixTheme.colorScheme.onSurface, border: BorderStroke? = null, shadowElevation: Dp = SurfaceDefaults.ShadowElevation, content: @Composable () -> Unit)

A Surface component with Miuix style.

Parameters

modifier

The modifier to be applied to the Surface.

shape

The shape of the Surface.

color

The color of the Surface.

contentColor

The content color of the Surface.

border

The border of the Surface.

shadowElevation

The shadow elevation of the Surface.

content

The Composable content of the Surface.


fun Surface(onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, shape: Shape = SurfaceDefaults.Shape, color: Color = MiuixTheme.colorScheme.surface, contentColor: Color = MiuixTheme.colorScheme.onSurface, border: BorderStroke? = null, shadowElevation: Dp = SurfaceDefaults.ShadowElevation, interactionSource: MutableInteractionSource? = null, indication: Indication? = LocalIndication.current, content: @Composable () -> Unit)

A Surface component with Miuix style.

Parameters

onClick

The callback when the Surface is clicked.

modifier

The modifier to be applied to the Surface.

enabled

Whether the Surface is enabled.

shape

The shape of the Surface.

color

The color of the Surface.

contentColor

The content color of the Surface.

border

The border of the Surface.

shadowElevation

The shadow elevation of the Surface.

interactionSource

The MutableInteractionSource to be used for the Surface.

indication

The Indication to be used for the Surface.

content

The Composable content of the Surface.