# Button
A [Button](https://developer.android.com/reference/kotlin/androidx/ui/material/package-summary#button) has a onClick-Function. You can add a Text-Composable or any other Composables as child elements of the Button.
```kotlin
@Composable
fun ButtonExample() {
Button(onClick = { /* Do something! */ }, colors = ButtonDefaults.textButtonColors(
backgroundColor = Color.Red
)) {
Text("Button")
}
}
```
# OutlinedButton
```kotlin
@Composable
fun OutlinedButtonExample() {
OutlinedButton(onClick = { /* Do something! */ }) {
Text("I'm an Outlined Button")
}
}
```
# TextButton
```kotlin
@Composable
fun TextButtonExample() {
TextButton(onClick = { /* Do something! */ }) {
Text("I'm a Text Button")
}
}
```
### See also:
* [Official Docs](https://developer.android.com/reference/kotlin/androidx/compose/material/package-summary#Button(kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.compose.material.ButtonElevation,androidx.compose.ui.graphics.Shape,androidx.compose.foundation.BorderStroke,androidx.compose.material.ButtonColors,androidx.compose.foundation.layout.PaddingValues,kotlin.Function1))
* [Full Example Code]({{ site.samplefolder }}/material/button/ButtonExample.kt)