Skip to content

Latest commit

 

History

History
83 lines (76 loc) · 3.13 KB

README.md

File metadata and controls

83 lines (76 loc) · 3.13 KB

What is this library?

A small UI library built with Jetpack compose that contains the NeoPOP design style(3D) components.

Components

NeoPopButton Primary NeoPop3DPressableContent NeoPopBottomSheetContainer
NeoPopButton NeoPop3DPressableContent NeoPopBottomSheetContainer
NeoPopButtonRotatedX
NeoPopButtonRotatedX
NeoPopButtonRotatedXShadowed
NeoPopButtonRotatedX

How to Install?

  1. Open your Project's settings.grale file.
  2. Add the following...
dependencyResolutionManagement {
    ...
    repositories {
        google()
        mavenCentral()
        maven {
            url = uri("https://jitpack.io") // Add this
        }
    }
}
  1. Go to build.gradle of app module
  2. Add the following dependency:
dependencies {
    ...
    implementation("com.github.Sagar0-0:neopop-compose:1.0.0")// Add this with latest version
}
  1. Enjoy using NeoPOP components

Example Usage:

Row {
                NeoPopButton(
                    modifier = Modifier.weight(1f),
                    onClick = {},
                    content = {
                        Text(
                            modifier = Modifier.padding(10.dp).fillMaxWidth(),
                            text = "Pay Now",
                            textAlign = TextAlign.Center,
                            style = CustomTheme.typography.bodySemibold.copy(color = CustomTheme.colors.textWhite)
                        )
                    }
                )
                NeoPopButton(
                    onClick = {},
                    content = {
                        Row(
                            modifier = Modifier.padding(10.dp),
                            verticalAlignment = Alignment.CenterVertically,
                        ) {
                            Icon(
                                modifier = Modifier.size(10.dp),
                                painter = painterResource(id = R.drawable.type_premium_offer),
                                contentDescription = null,
                                tint = Color.Unspecified
                            )
                            Text(
                                text = "Pay later",
                                style = CustomTheme.typography.bodySemibold.copy(color = CustomTheme.colors.textWhite),
                                overflow = TextOverflow.Ellipsis
                            )
                        }
                    }
                )
            }

Output:

image