TrailingImageCard

Functions summary

Unit
@Composable
TrailingImageCard(
    image: @Composable () -> Unit,
    modifier: Modifier,
    title: (@Composable () -> Unit)?,
    subtitle: (@Composable () -> Unit)?,
    shape: Shape,
    color: Color,
    contentColor: Color,
    contentPadding: PaddingValues,
    interactionSource: MutableInteractionSource?,
    content: @Composable () -> Unit
)

TrailingImageCard is a component used to group related information into a single digestible unit, featuring a trailing image.

Unit
@Composable
TrailingImageCard(
    onClick: () -> Unit,
    image: @Composable () -> Unit,
    modifier: Modifier,
    title: (@Composable () -> Unit)?,
    subtitle: (@Composable () -> Unit)?,
    shape: Shape,
    color: Color,
    contentColor: Color,
    contentPadding: PaddingValues,
    interactionSource: MutableInteractionSource?,
    content: @Composable () -> Unit
)

TrailingImageCard is a component used to group related information into a single digestible unit, featuring a trailing image.

Functions

TrailingImageCard

@Composable
fun TrailingImageCard(
    image: @Composable () -> Unit,
    modifier: Modifier = Modifier,
    title: (@Composable () -> Unit)? = null,
    subtitle: (@Composable () -> Unit)? = null,
    shape: Shape = TrailingImageCardDefaults.shape,
    color: Color = TrailingImageCardDefaults.color,
    contentColor: Color = TrailingImageCardDefaults.contentColor(color),
    contentPadding: PaddingValues = TrailingImageCardDefaults.contentPadding,
    interactionSource: MutableInteractionSource? = null,
    content: @Composable () -> Unit
): Unit

TrailingImageCard is a component used to group related information into a single digestible unit, featuring a trailing image. A trailing image card contains text content, and may also have any combination of title and subtitle. If specified, title is placed on top of the subtitle, which is placed on top of the content. A trailing image card fills the maximum width available by default.

This TrailingImageCard is focusable - see the other TrailingImageCard overload for a clickable TrailingImageCard.

Parameters
image: @Composable () -> Unit

the image to be placed after the text content. This image is allocated 30% of the card width.

modifier: Modifier = Modifier

the Modifier to be applied to this card

title: (@Composable () -> Unit)? = null

optional title to be placed above subtitle and content

subtitle: (@Composable () -> Unit)? = null

optional subtitle to be placed above content, below title

shape: Shape = TrailingImageCardDefaults.shape

the Shape used to clip this card, and also used to draw the background and border

color: Color = TrailingImageCardDefaults.color

background color of this card

contentColor: Color = TrailingImageCardDefaults.contentColor(color)

content color used by components inside content, title, and subtitle

contentPadding: PaddingValues = TrailingImageCardDefaults.contentPadding

the spacing values to apply internally between the container and the content. Note that there is additional padding applied around the content / text / image inside a card, this only affects the outermost content padding.

interactionSource: MutableInteractionSource? = null

an optional hoisted MutableInteractionSource for observing and emitting Interactions for this card. You can use this to change the card's appearance or preview the card in different states. Note that if null is provided, interactions will still happen internally.

content: @Composable () -> Unit

the main content / body text to display inside this card. This is recommended to be limited to 10 lines of text.

TrailingImageCard

@Composable
fun TrailingImageCard(
    onClick: () -> Unit,
    image: @Composable () -> Unit,
    modifier: Modifier = Modifier,
    title: (@Composable () -> Unit)? = null,
    subtitle: (@Composable () -> Unit)? = null,
    shape: Shape = TrailingImageCardDefaults.shape,
    color: Color = TrailingImageCardDefaults.color,
    contentColor: Color = TrailingImageCardDefaults.contentColor(color),
    contentPadding: PaddingValues = TrailingImageCardDefaults.contentPadding,
    interactionSource: MutableInteractionSource? = null,
    content: @Composable () -> Unit
): Unit

TrailingImageCard is a component used to group related information into a single digestible unit, featuring a trailing image. A trailing image card contains text content, and may also have any combination of title and subtitle. If specified, title is placed on top of the subtitle, which is placed on top of the content. A trailing image card fills the maximum width available by default.

This TrailingImageCard is focusable and clickable - see the other TrailingImageCard overload for a TrailingImageCard that is only focusable.

Parameters
onClick: () -> Unit

called when this card item is clicked

image: @Composable () -> Unit

the image to be placed after the text content. This image is allocated 30% of the card width.

modifier: Modifier = Modifier

the Modifier to be applied to this card

title: (@Composable () -> Unit)? = null

optional title to be placed above subtitle and content

subtitle: (@Composable () -> Unit)? = null

optional subtitle to be placed above content, below title

shape: Shape = TrailingImageCardDefaults.shape

the Shape used to clip this card, and also used to draw the background and border

color: Color = TrailingImageCardDefaults.color

background color of this card

contentColor: Color = TrailingImageCardDefaults.contentColor(color)

content color used by components inside content, title, and subtitle

contentPadding: PaddingValues = TrailingImageCardDefaults.contentPadding

the spacing values to apply internally between the container and the content. Note that there is additional padding applied around the content / text / image inside a card, this only affects the outermost content padding.

interactionSource: MutableInteractionSource? = null

an optional hoisted MutableInteractionSource for observing and emitting Interactions for this card. You can use this to change the card's appearance or preview the card in different states. Note that if null is provided, interactions will still happen internally.

content: @Composable () -> Unit

the main content / body text to display inside this card. This is recommended to be limited to 10 lines of text.