State of Compose 2023 results are in! Click here to learn more

← Back to Tv Material

WideCardLayout

Component
in
Tv Material
. Since 1.0.0-alpha07

Overview

Code Examples

Video

WideCardLayout is an opinionated TV Material Card layout with an image and text content to show information about a subject.

It provides a horizontal layout with an image card slot at the start, followed by the title, subtitle and description at the end.

@param imageCard defines the Composable to be used for the image card. See CardLayoutDefaults.ImageCard to create an image card. The interactionSource param provided in the lambda function should to be forwarded and used with the image card composable. @param title defines the Composable title placed below the image card in the CardLayout. @param modifier the Modifier to be applied to this CardLayout. @param subtitle defines the Composable supporting text placed below the title in CardLayout. @param description defines the Composable description placed below the subtitle in CardLayout. @param contentColor CardLayoutColors defines the content color used in the CardLayout for different interaction states. See CardLayoutDefaults.contentColor. @param interactionSource the MutableInteractionSource representing the stream of Interactions for this CardLayout. You can create and pass in your own remembered instance to observe Interactions and customize the appearance / behavior of this card layout in different states. This interaction source param would also be forwarded to be used with the imageCard composable.

Overloads

WideCardLayout

@ExperimentalTvMaterial3Api
@Composable
fun WideCardLayout(
    imageCard: @Composable (interactionSource: MutableInteractionSource) -> Unit,
    title: @Composable () -> Unit,
    modifier: Modifier = Modifier,
    subtitle: @Composable () -> Unit = {},
    description: @Composable () -> Unit = {},
    contentColor: CardLayoutColors = CardLayoutDefaults.contentColor(),
    interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }
)

Parameters

NameDescription
imageCarddefines the Composable to be used for the image card. See CardLayoutDefaults.ImageCard to create an image card. The interactionSource param provided in the lambda function should to be forwarded and used with the image card composable.
titledefines the Composable title placed below the image card in the CardLayout.
modifierthe Modifier to be applied to this CardLayout.
subtitledefines the Composable supporting text placed below the title in CardLayout.
descriptiondefines the Composable description placed below the subtitle in CardLayout.
contentColorCardLayoutColors defines the content color used in the CardLayout for different interaction states. See CardLayoutDefaults.contentColor.
interactionSourcethe MutableInteractionSource representing the stream of Interactions for this CardLayout. You can create and pass in your own remembered instance to observe Interactions and customize the appearance / behavior of this card layout in different states. This interaction source param would also be forwarded to be used with the imageCard composable