Skip to content

Commit d655ed1

Browse files
Update README.md
1 parent 62616f8 commit d655ed1

File tree

1 file changed

+58
-1
lines changed

1 file changed

+58
-1
lines changed

README.md

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ Declare the dependencies in the module-level `build.gradle` file 🍀 [![](https
3333
dependencies {
3434
implementation 'com.github.PratikFagadiya:AnimatedSmoothBottomNavigation-JetpackCompose:<LATEST_VERSION>'
3535
}
36-
```
36+
```
37+
<br />
38+
3739
### How to use 🚀
3840

3941
Create list of bottom navigation Item with `SmoothAnimationBottomBarScreens`
@@ -53,10 +55,65 @@ val bottomNavigationItems = listOf(
5355
R.drawable.baseline_feed_24
5456
)
5557
)
58+
59+
val navController = rememberNavController()
60+
val currentIndex = rememberSaveable {
61+
mutableIntStateOf(0)
62+
}
63+
64+
Scaffold(bottomBar = {
65+
SmoothAnimationBottomBar(navController,
66+
bottomNavigationItems,
67+
initialIndex = currentIndex,
68+
bottomBarProperties = BottomBarProperties(),
69+
onSelectItem = {
70+
Log.i("SELECTED_ITEM", "onCreate: Selected Item ${it.name}")
71+
})
72+
}) { innerPadding ->
73+
Modifier.padding(innerPadding)
74+
ScreenNavigationConfiguration(navController, currentIndex)
75+
}
76+
5677
```
5778

5879
You can check [MainActivity.kt](https://github.com/PratikFagadiya/AnimatedSmoothBottomNavigation-JetpackCompose/tree/master/app/src/main/java/com/pratikfagadiya/animatedbottomnavigation/MainActivity.kt) directory for demo. ⭐
5980
<br />
81+
<br />
82+
83+
## Customisation 🎨
84+
85+
With our customizable library, you have the power to customizable library based on your requirement
86+
you can see how you can customize various properties of the BottomBarProperties object to fit your UI design preferences.
87+
88+
Feel free to adjust the `colors`, `sizes`, `font` and other parameters to match your specific requirements.
89+
90+
```kotlin
91+
92+
Scaffold(bottomBar = {
93+
SmoothAnimationBottomBar(navController,
94+
bottomNavigationItems,
95+
initialIndex = currentIndex,
96+
bottomBarProperties = BottomBarProperties(
97+
backgroundColor = Color.Blue, // Change the background color
98+
indicatorColor = Color.White.copy(alpha = 0.2F), // Change the indicator color with Alpha
99+
iconTintColor = Color.BlueTint, // Change the icon tint color
100+
iconTintActiveColor = Color.White, // Change the active icon tint color
101+
textActiveColor = Color.White, // Change the active text color
102+
cornerRadius = 18.dp, // Increase the corner radius
103+
fontFamily = JostFont, // Change the font family
104+
fontWeight = FontWeight.Medium, // Change the font weight
105+
fontSize = 16.sp // Increase or Decrease the font size
106+
),
107+
onSelectItem = {
108+
Log.i("SMOOTH_ANIMATION_BAR", "onCreate: Selected Item ${it.name}")
109+
})
110+
}) { innerPadding ->
111+
Modifier.padding(innerPadding)
112+
ScreenNavigationConfiguration(navController, currentIndex)
113+
}
114+
115+
```
116+
<br />
60117

61118
## Acknowledgments
62119

0 commit comments

Comments
 (0)