Skip to main content
Version: 12.10.0

floatingcounterview

README.md

Feature Card

The Feature Card is a reusable view that represents different features. The feature Card behaves like all other cards. There are two different versions of the feature card

Versions of Feature Card

  • Large Card: The label can have multiple lines without a limit. The description text will be truncated after 3 lines.
  • Small Card: No label in small cards. The description text has no limit.

Features:

  • Allows to pass custom Image UI composable, replacing the placeholder bubble
  • Support for improved user experience

How to use Feature Card of your choice (Large/Small)

  1. Add the necessary imports:

    import your.package.name.OCFeatureCard

  2. Create Feature Card composable of your choice by choosing your desired cardtype

       OCFeatureCard(
    label = previewData.label,
    description = previewData.description,
    isLocked = previewData.isLocked,
    cardType = OCFeatureCardSmall,
    )

How to use Feature Card with any feature Image

  1. Add the necessary imports:

    import your.package.name.OCFeatureCard

  2. Create custom feature image composable

       Image(
    painter = painterResource(id = R.drawable.ic_feature),
    contentDescription = "",
    contentScale = ContentScale.None,
    modifier = Modifier.size(OCTheme.dimensions.sixtyEightDPSpacing),
    )

  3. Create Feature Card composable of your choice and pass the create Image composable

       OCFeatureCard(
    label = previewData.label,
    description = previewData.description,
    isLocked = previewData.isLocked,
    cardType = OCFeatureCardSmall,
    imgPlaceholder = {
    Image(
    painter = painterResource(id = R.drawable.ic_feature),
    contentDescription = "",
    contentScale = ContentScale.None,
    modifier = Modifier.size(OCTheme.dimensions.sixtyEightDPSpacing),
    )
    }
    )