Coder Social home page Coder Social logo

xing1p / androidanimatednavigationbar Goto Github PK

View Code? Open in Web Editor NEW

This project forked from exyte/androidanimatednavigationbar

0.0 0.0 0.0 215 KB

AnimatedNavigationBar is a navigation bar with a number of preset animations written in Jetpack Compose

License: MIT License

Kotlin 100.00%

androidanimatednavigationbar's Introduction

header demo

Animated Navigation Bar

AnimatedNavigationBar is a navigation bar with a number of preset animations written in Jetpack Compose


We are a development agency building phenomenal apps.




Licence API Maven-Central

Usage

  1. Remember Int to store the current selection
var selectedIndex by remember { mutableStateOf(0) }
  1. Pass your buttons to the AnimatedNavigationBar
AnimatedNavigationBar(selectedIndex = selectedIndex) {
   Button1()
   Button2()
   Button3()
}

Required parameters

selectedIndex - binding to the current index
content - buttons to display in the tabbar

Additional parameters

barColor - Color of the navigation bar itself
ballColor - Ball indicator color
cornerRadius - The corner radius to all corners applied to the navigation bar
ballAnimation - Ball animation with the animation curve, default value Parabolic(tween(300))

  • Parabolic - Jump to the selected button following a parabolic arc
  • Teleport - Disappear and quickly re-appear above selected tab
  • Straight - Slide to the selected tab
    You can build your own animation, just implement the BallAnimation interface.

indentAnimation - Indent animation with the animation curve, default value is Height(tween(300))

  • Height - Disappear by decreasing in height and quickly re-appear by increasing in height above the selected tab
  • StraightIndent - Slide to the selected tab
    You can also build your own animation, just implement the IndentAnimation interface.

Built-in animatable tab buttons

This library has two built-in button types you can use out-of-the-box: DropletButton and WiggleButton, and a super custom ColorButton type in the Example project. Please feel free to use them in your projects or build your own buttons.

Download

Add the dependency in build.gradle file:

dependencies {
    implementation("com.exyte:animated-navigation-bar:1.0.0")
}

Acknowledgements

Many thanks to Yeasin Arafat for their beautiful original work that we recreated with JetpackCompose.

androidanimatednavigationbar's People

Contributors

alexyudenkov avatar nikita-afonasov avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.