Skip to content

ibraheemzulfiqar/ComposeCommon

Repository files navigation

ComposeCommon


Kotlin Jitpack

A collection of reusable Jetpack Compose components and extensions for internal use.

Implementation

To include ComposeCommon in your project, add the JitPack repository to your build file:

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

Add the Dependency

Include All Modules

If you want to include all components provided by ComposeCommon, use the following dependency:

implementation("com.github.ibraheemzulfiqar:ComposeCommon:v0.6.0") // Replace with the latest version

Include Specific Modules

If you only need specific functionality, you can include individual modules:

// Pattern module
implementation("com.github.ibraheemzulfiqar.ComposeCommon:pattern:v0.6.0")

// Rating Bar module
implementation("com.github.ibraheemzulfiqar.ComposeCommon:ratingbar:v0.6.0")

// Voyager Extensions module
implementation("com.github.ibraheemzulfiqar.ComposeCommon:voyager-extensions:v0.6.0")

Jitpack

Examples

  1. Rating Bar
  2. Pattern Lock
  3. Voyager Extensions

Ratingbar

    var rating by remember { mutableFloatStateOf(0f) }
    val starOutline = painterResource(R.drawable.ic_star_outline)
    val starOutlineLast = painterResource(R.drawable.ic_star_outline_last)
    val star = painterResource(R.drawable.ic_star)

    RatingBar(
        value = rating,
        onValueChange = { rating = it },
        painterFilled = { star },
        painterEmpty = { index ->
            if (index == 5) starOutlineLast else starOutline
        },
        onRatingChanged = {
            rating = it
        },
        spaceBetween = 12.dp,
        numOfStars = 5,
        tint = Color.Yellow,
        hideInactiveStars = false,
        stepSize = StepSize.ONE, // StepSize.HALF
        isIndicator = false,
        size = 32.dp,
    )

PatternLock

// sample code

Voyager Extensions

// sample code

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages