Button is a component used for exposing actions to a user.
@Sampled
@Composable
fun ButtonSample() {
Button(onClick = {}) { Text("Send") }
}
@Sampled
@Composable
fun ButtonWithLeadingIconSample() {
Button(onClick = {}, leadingIcon = { Icon(FavoriteIcon, "Localized description") }) {
Text("Send")
}
}
@Sampled
@Composable
fun LargeButtonSample() {
Button(onClick = {}, buttonSize = ButtonSize.Large) { Text("Send") }
}
@Sampled
@Composable
fun CustomFocusedColorButtonSample() {
Button(
onClick = {},
focusedColor = ButtonDefaults.focusedColor(Color(0xFF34E0A1)),
) {
Text("Button with custom colors")
}
}