← Back to Wear Material 3
OutlinedCard
Component
in
Wear Material 3
. Since 1.0.0-alpha05Overview
Examples
Community Notes
Video
Outlined Wear Material 3 Card that offers a single slot to take any content.
Outlined Card components that take specific content such as icons, images, titles, subtitles and labels. Outlined Cards have a visual boundary around the container. This can emphasise the content of this card.
The Card is Rectangle shaped with rounded corners by default.
Cards can be enabled or disabled. A disabled card will not respond to click events.
Example of an OutlinedCard:
Overloads
OutlinedCard
@Composable
fun OutlinedCard(
onClick: () -> Unit,
modifier: Modifier = Modifier,
enabled: Boolean = true,
shape: Shape = MaterialTheme.shapes.large,
colors: CardColors = CardDefaults.outlinedCardColors(),
border: BorderStroke = CardDefaults.outlinedCardBorder(),
contentPadding: PaddingValues = CardDefaults.ContentPadding,
interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
content: @Composable ColumnScope.() -> Unit,
)
Parameters
Name | Description |
---|---|
onClick | Will be called when the user clicks the card |
modifier | Modifier to be applied to the card |
enabled | Controls the enabled state of the card. When false, this card will not be clickable and there will be no ripple effect on click. Wear cards do not have any specific elevation or alpha differences when not enabled - they are simply not clickable. |
shape | Defines the card's shape. It is strongly recommended to use the default as this shape is a key characteristic of the Wear Material Theme |
colors | CardColors that will be used to resolve the colors used for this card in different states. See CardDefaults.cardColors. |
border | A BorderStroke object which is used for the outline drawing. |
contentPadding | The spacing values to apply internally between the container and the content |
interactionSource | The MutableInteractionSource representing the stream of Interactions for this card. You can create and pass in your own remembered MutableInteractionSource if you want to observe Interactions and customize the appearance / behavior of this card in different Interactions. |
content | The main slot for a content of this car |
Previous Component← OutlinedButton
Next ComponentOutlinedIconButton →