luca992 / coil-composable

A simple library to load images and gifs into a Jetpack Compose Image composable using Coil.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A simple library to load images and gifs into a Jetpack Compose Image composable using Coil.

How to get

add jitpack repo:

repositories {
    maven { url "https://jitpack.io" }
}

*.kts
repositories {
    maven { setUrl("https://jitpack.io") }
}

add dependency:

implementation 'com.github.luca992:coil-composable:{version}'

*.kts:
implementation("com.github.luca992:coil-composable:{version}")

How to use

CoilImage("url")

or if you want more control

CoilImage("url") {
    // this LoadRequestBuilder
    placeholder(
        ResourcesCompat.getDrawable(
            context.resources,
            R.drawable.loading_indicator,
            null
        )
    )
}

About

A simple library to load images and gifs into a Jetpack Compose Image composable using Coil.

License:Apache License 2.0


Languages

Language:Kotlin 100.0%