androidx.compose.material3
OutlinedButton
Composable function
One of the button types. It works like Button. Only the parameters that differ are described here.
A button with only an outline. Use it for secondary actions, like "Cancel" next to "Save".

OutlinedButton(onClick = {}) { Text("Cancel") }
Basic
Takes one shape.
@Composable
fun OutlinedButton(
onClick: () -> Unit,
modifier: Modifier = Modifier,
enabled: Boolean = true,
shape: Shape = ButtonDefaults.outlinedShape,
colors: ButtonColors = ButtonDefaults.outlinedButtonColors(),
elevation: ButtonElevation? = null,
border: BorderStroke? = ButtonDefaults.outlinedButtonBorder(enabled),
contentPadding: PaddingValues = ButtonDefaults.ContentPadding,
interactionSource: MutableInteractionSource? = null,
content: @Composable RowScope.() -> Unit,
)
Defaults that differ from Button:
shape=ButtonDefaults.outlinedShapecolors=ButtonDefaults.outlinedButtonColors()elevation=nullborder=ButtonDefaults.outlinedButtonBorder(enabled)
Same as in Button: onClick, modifier, enabled, shape, colors, elevation, border, contentPadding, interactionSource, content.
ExpressiveSince 1.10
Takes shapes: one shape at rest and one while pressed. The button morphs between them.
@Composable
fun OutlinedButton(
onClick: () -> Unit,
shapes: ButtonShapes,
modifier: Modifier = Modifier,
enabled: Boolean = true,
colors: ButtonColors = ButtonDefaults.outlinedButtonColors(),
elevation: ButtonElevation? = null,
border: BorderStroke? = ButtonDefaults.outlinedButtonBorder(enabled),
contentPadding: PaddingValues = ButtonDefaults.contentPaddingFor(ButtonDefaults.MinHeight),
interactionSource: MutableInteractionSource? = null,
content: @Composable RowScope.() -> Unit,
)
Defaults that differ from Button:
colors=ButtonDefaults.outlinedButtonColors()elevation=nullborder=ButtonDefaults.outlinedButtonBorder(enabled)contentPadding=ButtonDefaults.contentPaddingFor(ButtonDefaults.MinHeight)
Same as in Button: onClick, shapes, modifier, enabled, colors, elevation, border, contentPadding, interactionSource, content.
Button types
ButtonFilledTonalButtonElevatedButtonOutlinedButtonTextButton
See also
ButtonDefaults: default values and helper functions forOutlinedButton.