Composable Component

TextButton

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

TextButton social preview

TextButtonSample

@Preview
@Composable
fun TextButtonSample() {
    TextButton(onClick = { /* Do something! */ }) { Text("Text Button") }
}

TextButtonWithAnimatedShapeSample

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