View Slider

It is a Horizontal view slider which will snap the middle item, with the scale effect.

Installation
Add it in your root build.gradle or settings.gradle at the end of repositories:
repositories {
mavenCentral()
}
Add the dependency
dependencies {
implementation("io.github.rajdeepvaghela:viewslider:2.0.0")
}
Usage
ViewSlider(
items = listOf(
Item(Icons.Filled.AccountCircle, "Profile Info", Color(0xFFE57373)),
Item(Icons.Filled.ShoppingCart, "Cart", Color(0xFF81C784)),
Item(Icons.Filled.Favorite, , Color()),
Item(Icons.Filled.Settings, , Color())
),
scaleDownFactor = ,
itemWidth = dp,
selectedItemIndicator = {
Icon(
imageVector = Icons.Default.ArrowDropDown,
tint = it.selectedColor,
contentDescription =
)
},
selectedItemLabel = {
Text(
text = it.name,
color = it.selectedColor
)
},
onItemSelected = { index, item ->
},
modifier = Modifier.fillMaxWidth()
) {
Image(
imageVector = it.icon,
contentDescription = ,
colorFilter = ColorFilter.tint(it.selectedColor),
modifier = Modifier.size(dp)
)
}
License
Copyright 2024 Rajdeep Vaghela
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance the License.
You may obtain a copy of the License at
http:
Unless applicable law agreed to writing, software
distributed under the License distributed an BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express implied.
See the License the specific language governing permissions
limitations under the License.