Elevation, shape & color
Different tonal elevations, shapes, and container colors.
Surface(tonalElevation = 4.dp, shape = RoundedCornerShape(12.dp)) {
Text("Elevated", Modifier.padding(16.dp))
}
Surface(
shape = RoundedCornerShape(12.dp),
color = MaterialTheme.colorScheme.primaryContainer
) {
Text("Primary container", Modifier.padding(16.dp))
}
Surface(
shape = RoundedCornerShape(12.dp),
color = MaterialTheme.colorScheme.secondaryContainer
) {
Text("Secondary container", Modifier.padding(16.dp))
}