Skip to content

Latest commit

 

History

History
29 lines (24 loc) · 998 Bytes

README.md

File metadata and controls

29 lines (24 loc) · 998 Bytes

Library to create ratingbar in compose

Maven Central

Getting Started

Add the dependency in your build.gradle

dependencies { implementation 'io.github.pseudoankit:rating-bar:<version 🔝>' }

Usage

    var ratingIconIndex by remember { mutableStateOf(0) }
    RatingBar(
        config = RatingBarConfig(
            iconConfig = RatingBarIconConfig(
                ratingIcon = android.R.drawable.btn_star_big_off,
                activeColor = Color.Yellow,
                inactiveColor = Color.Gray
            ),
            activeIconIndex = ratingIcon
        ),
    ) { activeRatingIndex -> 
        ratingIconIndex = activeRatingIndex
    }