Home

Awesome

Banner

:speech_balloon: SSCompose-CustomInfoBar :speech_balloon:

<div align="center">

Platform-badge Jetpack Compose-badge API-badge Kotlin Version Release-badge

</div> <!-- Description -->

Welcome to our SSCompose-CustomInfoBar Library! :tada: Tired of generic snackbars? This Jetpack Compose library offers a powerful and customizable way to display informative messages within your app.

:zap: Features

NOTE:

:framed_picture: Preview

Full Preview
<video src="https://github.com/SimformSolutionsPvtLtd/SSCompose-CustomInfoBar/assets/125441434/303282b1-91c2-4094-b030-923403be1e85" />
Default DemoError ThemedWarning Themed
<img src="/gifs/default.gif" height="500px" /><img src="/gifs/error.gif" height="500px" /><img src="/gifs/warning.gif" height="500px" />
Success ThemedAnnotated StringsGradient Background
<img src="/gifs/success.gif" height="500px" /><img src="/gifs/annotated.gif" height="500px" /><img src="/gifs/gradient.gif" height="500px" />
SVG BackgroundPNG BackgroundAction Button
<img src="/gifs/svg.gif" height="500px" /><img src="/gifs/png.gif" height="500px" /><img src="/gifs/action.gif" height="500px" />

:books: How it works:

  1. Add the dependency in your app's build.gradle file

    dependencies {
        implementation("com.github.SimformSolutionsPvtLtd:SSCompose-CustomInfoBar:1.0")
    }
    
  2. Add the JitPack repository

    For latest Android Studio, in settings.gradle file inside dependencyResolutionManagement block

    dependencyResolutionManagement {
        repositories {
            ...
            maven { url = uri("https://jitpack.io") }
        }
    }
    
  3. Create ComposeInfoHost with default parameters to host ComposeInfoBar (NOTE: Here we are not passing an custom ComposeInfoBar so it will use a default implementation. To show custom ComposeInfoBar check out SSComposeInfoHost-Customisation-Guide)

    val composeInfoHostState by remember {
        mutableStateOf(SSComposeInfoHostState())
    }
    
    SSComposeInfoHost(
        modifier = Modifier
            .fillMaxSize(),
        composeHostState = composeInfoHostState
    ) {
        MainComposable()
    }
    
  4. Show composeInfoBar anywhere in your project

    val coroutineScope = rememberCoroutineScope()
    
    var duration by remember {
        mutableStateOf(SSComposeInfoDuration.Short)
    }        
    
    coroutineScope.launch { 
        composeInfoHostState.show(
            infoBarData = SSComposeInfoBarData(title, description),
            duration = duration
        )
    }
    
  5. For full customisation of SSComposeInfoBar checkout SSComposeInfoBar-Customisation-Guide

:heart: Find this samples useful?

Support it by joining stargazers :star: for this repository.

:handshake: How to Contribute?

Whether you're helping us fix bugs, improve the docs, or a feature request, we'd love to have you! : muscle:
Check out our Contributing Guide for ideas on contributing.

:lady_beetle: Bugs and Feedback

For bugs, feature requests, and discussion use GitHub Issues.

:rocket: Other Mobile Libraries

Check out our other libraries Awesome-Mobile-Libraries.

:balance_scale: License

Distributed under the MIT license. See LICENSE for details.

<!-- Reference links --> <!-- Badges -->