Composable Component

ElevatedButton

Buttons help people initiate actions, from sending an email, to sharing a document, to liking a post.

ElevatedButton social preview

ElevatedButtonSample

@Preview
@Composable
fun ElevatedButtonSample() {
    ElevatedButton(onClick = { /* Do something! */ }) { Text("Elevated Button") }
}

ElevatedButtonWithAnimatedShapeSample

@OptIn(ExperimentalMaterial3ExpressiveApi::class)
@Preview
@Composable
fun ElevatedButtonWithAnimatedShapeSample() {
    ElevatedButton(onClick = {}, shapes = ButtonDefaults.shapes()) { Text("Elevated Button") }
}