OudsElevatedCard

fun OudsElevatedCard(modifier: Modifier = Modifier, background: Boolean = OudsCardDefaults.Background, enabled: Boolean = true, skeleton: OudsSkeleton? = LocalSkeleton.current, content: @Composable OudsCardScope.() -> Unit = { })

This is a convenience function for OudsCard with OudsCardStyle.Elevated. Elevated cards create separation through a shadow, giving the container a raised appearance.

Parameters

modifier

The Modifier to be applied to this card.

background

Controls the display of the predefined color background. Defaults to true.

enabled

Controls the enabled state of the card. When false, the OUDS components inside will be in disabled state.

skeleton

A placeholder state of the component used when the content is not yet available (while loading). The component shows the correct visual structure but with placeholder elements (grey or shimmering blocks) instead of actual content. Can be set directly or inherited from OudsSkeletonProvider. See OudsSkeleton class documentation for all approaches.

content

The content of the card.

See also

Samples

OudsElevatedCard(
    background = true
) {
    Column(
        modifier = Modifier.padding(OudsTheme.spaces.fixed.medium),
        verticalArrangement = Arrangement.spacedBy(OudsTheme.spaces.fixed.medium)
    ) {
        OudsHeadingText(text = "Community Workshop")
        OudsBodyText(text = "Join us for an interactive learning session about design systems and best practices.")
        Row(
            modifier = Modifier.padding(top = OudsTheme.spaces.fixed.small),
            horizontalArrangement = Arrangement.spacedBy(OudsTheme.spaces.fixed.small)
        ) {
            OudsTag(label = "Free event", status = OudsTagStatus.Info(), size = OudsTagSize.Small)
            OudsTag(label = "Beginner-friendly", status = OudsTagStatus.Positive(), size = OudsTagSize.Small)
        }
        OudsLabelText(
            text = "Saturday, March 15 at 2:00 PM",
            size = OudsLabelTextSize.Small,
            color = OudsTheme.colorScheme.content.muted
        )
    }
}

fun OudsElevatedCard(onClick: () -> Unit, modifier: Modifier = Modifier, background: Boolean = OudsCardDefaults.Background, enabled: Boolean = true, skeleton: OudsSkeleton? = LocalSkeleton.current, interactionSource: MutableInteractionSource? = null, content: @Composable OudsCardScope.() -> Unit = { })

This is a convenience function for OudsCard with OudsCardStyle.Elevated. Elevated cards create separation through a shadow, giving the container a raised appearance.

Parameters

onClick

The action to perform when this card is clicked.

modifier

The Modifier to be applied to this card.

background

Controls the display of the predefined color background. Defaults to true.

enabled

Controls the enabled state of the card. When false, the OUDS components inside will be in disabled state.

skeleton

A placeholder state of the component used when the content is not yet available (while loading). The component shows the correct visual structure but with placeholder elements (grey or shimmering blocks) instead of actual content. Can be set directly or inherited from OudsSkeletonProvider. See OudsSkeleton class documentation for all approaches.

interactionSource

An optional hoisted MutableInteractionSource for observing and emitting Interactions for this card. Note that if null is provided, interactions will still happen internally.

content

The content of the card.

See also

Samples

OudsElevatedCard(
    onClick = { /* Complete profile */ },
) {
    Column(
        modifier = Modifier.padding(OudsTheme.spaces.fixed.medium),
        verticalArrangement = Arrangement.spacedBy(OudsTheme.spaces.fixed.medium)
    ) {
        OudsHeadingText(text = "Complete Your Profile")
        OudsBodyText(text = "Add your personal information to personalize your experience and unlock additional features.")
        OudsLabelText(
            text = "Profile: 60% complete",
            size = OudsLabelTextSize.Medium,
            weight = OudsTextWeight.Strong
        )
    }
}