Skip to content

Material & beautiful dialogs with JetpackCompose (Kotlin)

Notifications You must be signed in to change notification settings

ehsannarmani/ComposeDialog

Repository files navigation

Animated Dialogs & Material Dialog For JetpackCompose

A Material Dialog & Animated Library ...


Dependency

Step 1: Add the JitPack repository to your build file

Add it in your root build.gradle at the end of repositories:

allprojects {
  repositories {
    ...
    maven { url 'https://jitpack.io' }
  }
}

Step 2: Add the dependency

dependencies {
  implementation 'com.github.ehsannarmani:ComposeDialog:latest_version'
}

Usage

Dialog(
    visible = true or false,
    duration = 2000,
    position= Alignment.BottomCenter,
    dialogEnterAnim = expandHorizontally(),
    dialogExitAnim = shrinkHorizontally(),
    onEnd = { ... },
    ...
) {
    Text(
        text = "...",
        color = Color.White,
        fontSize = 13.sp,
        textAlign = TextAlign.Justify
    )
}