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: October 13, 2021
Back to top