Alerter-Compose

Alert library facilitates creating customizable alerts with styles like Standard, Split, and Snackbar, supporting features like automatic dismissal, vibration, and background color customization.

Android JVMJVMKotlin/Native
GitHub stars6
Authorsakardas16
Open issues2
LicenseApache License 2.0
Creation dateover 1 year ago

Last activityover 1 year ago
Latest release1.0.5 (over 1 year ago)

Alerter Compose

Alert library for Compose Multiplatform(Android, IOS, Desktop)

Installation

Compose Multiplatform

Add this line to shared build.gradle

sourceSets {
  commonMain.dependencies {
    implementation("io.github.akardas16:alertercompose:1.0.5")
  }
}

Showcases

Standard Split Snackbar

Usage

Basic Usage

 var showAlert by remember { mutableStateOf(false) }

Alerter(isVisible = showAlert, alertStyle = AlertStyle.Standard,
            onChanged = { showAlert = it }, 
            backgroundColor = Color.White
        ) {
    //Your Custom View
}

  • See available parameters
@Composable
fun Alerter(isVisible: Boolean,  // Show/Hide alerter
          onChanged:(visibility:Boolean) -> Unit,
          backgroundColor: Color,  //Define your background color
          alertStyle: AlertStyle = AlertStyle.Standard, //Change alerter style (Standard, Split, Snackbar)
          enableDismissWhenAlertClick:Boolean = true,   // Dismiss alert when click on alert
          enableDismissAutomatically:Boolean = true,   // Dismiss alert automotically with spesified duration
          duration:Long = 5000, // Alert duration if enableDismissAutomatically is true
          enableVibration:Boolean = true,  // enable/disable vibration when alert visible
          content: @Composable () -> Unit) {
Android JVMJVMKotlin/Native
GitHub stars6
Authorsakardas16
Open issues2
LicenseApache License 2.0
Creation dateover 1 year ago

Last activityover 1 year ago
Latest release1.0.5 (over 1 year ago)

Alerter Compose

Alert library for Compose Multiplatform(Android, IOS, Desktop)

Installation

Compose Multiplatform

Add this line to shared build.gradle

sourceSets {
  commonMain.dependencies {
    implementation("io.github.akardas16:alertercompose:1.0.5")
  }
}

Showcases

Standard Split Snackbar

Usage

Basic Usage

 var showAlert by remember { mutableStateOf(false) }

Alerter(isVisible = showAlert, alertStyle = AlertStyle.Standard,
            onChanged = { showAlert = it }, 
            backgroundColor = Color.White
        ) {
    //Your Custom View
}

  • See available parameters
@Composable
fun Alerter(isVisible: Boolean,  // Show/Hide alerter
          onChanged:(visibility:Boolean) -> Unit,
          backgroundColor: Color,  //Define your background color
          alertStyle: AlertStyle = AlertStyle.Standard, //Change alerter style (Standard, Split, Snackbar)
          enableDismissWhenAlertClick:Boolean = true,   // Dismiss alert when click on alert
          enableDismissAutomatically:Boolean = true,   // Dismiss alert automotically with spesified duration
          duration:Long = 5000, // Alert duration if enableDismissAutomatically is true
          enableVibration:Boolean = true,  // enable/disable vibration when alert visible
          content: @Composable () -> Unit) {
Survey iconComplete survey to improve klibs.io ↗
Let’s go