Tab bar Lottie animation
Add to favorites
Create a beautiful animation for Tab Bar using Lottie
Play video

Design and Prototype an App with Play
To complete the home screen, we will create a tab bar. The tab bar is a fundamental UI element of any app. It allows users to navigate through your app. To make it even more compelling, we will animate the buttons using Lottie Animation.
Container
Let’s start by by creating the body of our tab bar.
- Add a Stack H and set the Alignment to Top and the Distribution to Space Around
- Keep the Width to 100% and set the Height to 88PT
- Add a padding top of 4
- Pin To Bottom Left and toggle the Pin To Page
- For the BG Color, add a new Color Gradient #31395B - #21263D, opacity 70%
- Set the Corner Radius of both top edges to 24
- In Effects, add a BG Blur Dark
- Add Drop Shadow: Outer, Offset X 0, Offset Y 10PT, Blur 20 and color black, opacity 30%
Tab Item
Next, we will design the tab button
- Add a Stack V, set the Alignment to Center
- Set the Width and the Height to 48PT
In the Tab Item, add an image element.
- In Settings, set the image to location from the assets
- Set the Width and the Height to 48PT and Pin To Center Center
Lottie
On top of the icon, we will add a Lottie element. In Settings, select the Lottie and go to LottieFiles. There’s you can use a sample one or you can upload your own. I will put the Lottie links in the description below.
Location: https://assets2.lottiefiles.com/packages/lf20_mJrV9KGTAm.json
- Set the Loop to None and the Reset on Complete off
- Set the Width and Height to 48PT. Pin To Center Center
In the preview, you can see that the icon and the animation aren’t the same size. In Appearance, I will scale to 120% and set the Offset Y to 1.
Then, make the Tab Item into a component and duplicate it 3 times. Let’s change the icons and the animations.
Trip: https://assets3.lottiefiles.com/packages/lf20_5oiT0rTiSq.json
Fav: https://assets10.lottiefiles.com/packages/lf20_dn2jci4YQz.json
Message: https://assets5.lottiefiles.com/packages/lf20_2awSejntX7.json
States
Now that it is a component, we have access to states. The goal is to tap on the button and hide the icon while playing the lottie animation. Go in the Tab item component screen, add a custom state and name it: Tapped.
In that state, select the icon and we will set the 3D Transform Rotation Y to 90 and set the opacity to 0. In Default and Tapped, disable Autoplay.
Interactions
For the interactions, we will first make the Tab bar into a component. Then, go to the component’s screen and select the first Lottie. Here in total, we will add 8 different actions. To make things easier to understand, let’s rename the Tab Item and Lottie by adding a number next to it.
First action is to play the lottie animation, add a tap trigger and select Lottie Controls, Target self, Playback is Play, Frame 0 - 150, Loop to None and disable Reset on Complete.
Then, add another Lottie Controls, but this time, set the Target to the second Lottie. Playback to Play, Frame 0 - 0, Loop to None and disable Reset on Complete. Repeat the same steps for the third and fourth Lottie.
For the fifth action, add a Set State, Target Tab Item, Start State to Current State and End State to Tapped. The Duration is 0.5s and Easing to Ease In & Out.
Then, add another Set State, but this time, set the Target to the second Tab Item. Start State to Current State and End State to Default. The Duration is 0.5s and Easing to Ease In & Out. Repeat the same steps for the third and fourth Tab Item.
Basically, this interaction plays the lottie and set the state to tapped while resetting the 3 others.
Copy actions
By tapping on the more icon, you can select Copy Actions and paste it on the 3 other Lotties. Using the same logic, apply the right Lottie Controls and Set State.
Preview
In the preview, we want the first Lottie to play on load so toggle the Autoplay of the first Lottie. Also, set the Tab Item to Tapped.
Templates and source code
Download source files
Download the videos and assets to refer and learn offline without interuption.
Design template
Source code for all sections
Video files, ePub and subtitles
Assets
Videos
Subtitles
1
Intro to Play
Build a completely functional prototype without writing a single line of code from your phone
4:29
2
Layout and Components
Learn how to make and re-use custom elements
20:23
3
States and Interactions
Make your app more engaging with state-based animations
6:52
4
Custom Search Bar and Segmented Control
Use Textfield to make a custom component
8:03
5
Custom Segmented Controls
Alternative UI to radio buttons and dropdown menus
10:35
6
Tab bar Lottie animation
Create a beautiful animation for Tab Bar using Lottie
17:44
7
Sidebar menu animation
Implement a smooth and exciting menu transition
38:07
8
Map and Drawer animation
Use native elements to create a beautiful map screen
16:32
9
Navigation and Detail screen
Transition to another screen
56:38
10
Native Date Picker
Design a beautiful interactive calendar
9:14
Meet the instructor
We all try to be consistent with our way of teaching step-by-step, providing source files and prioritizing design in our courses.
Willie Yam
Front-end/UI developer at Design+Code
I do UI coding. HTML/CSS/JS/SWIFTUI dev.
10 courses - 37 hours

Design and Prototype an App with Play
Build a completely functional prototype without writing a single line of code from your phone
3 hrs

Create a 3D site with game controls in Spline
Build an interactive 3D scene implemented on a ReactJS site using Figma and Spline
2 hrs

Build a Movie Booking App in SwiftUI
Learn how to create an iOS app based on a beautiful UI design from Figma with interesting animations and interactions, create a custom tab bar and use navigation views to build a whole flow
1 hrs

Build Quick Apps with SwiftUI
Apply your Swift and SwiftUI knowledge by building real, quick and various applications from scratch
11 hrs

CSS Handbook
A comprehensive series of tutorials that encompass styled-components, CSS, and all layout and UI developments
1 hrs

Advanced React Hooks
Learn how to build a website with Typescript, Hooks, Contentful and Gatsby Cloud
5 hrs

Unity for Designers
If you want to make a game and don't know where to start, you are in the right place. I will teach you how to use Unity, code in C# and share essential tips and tricks to make your first game.
5 hrs

Create a Javascript Game
Learn how to create a web game using Phaser 3, a popular javascript game engine. Draw a map using an editor, implement the player, make the player move, apply physics, collisions, and implement the enemies.
2 hrs

Build an ARKit 2 App
Introduction to ARKit and learn how to make your own playground. You will be able to add models or even your own designs into the app and play with them
4 hrs

Create a SpriteKit Game
Overview of SpriteKit a powerful 2D sprite-based framework for games development from Apple and learn how to create your very own platform
3 hrs