Skip to content
🤔 Documentation issue? Report or edit

Surface

Example

@Composable
    fun SurfaceDemo() {
        Surface(
            modifier = Modifier.padding(8.dp),
            border = BorderStroke(2.dp, Color.Red),
            contentColor = Color.Blue,
            elevation = 8.dp,
            shape = CircleShape
        ) {
            Text("Hello World", modifier = Modifier.padding(8.dp))
        }
    }

See also:


Last update: July 27, 2022