Animated Bottom Tab with React Native CLI and Reanimated
Beto, April 9, 2023 · 24,724 views
Learn how to create an animated bottom tab navigator in React Native CLI using Reanimated and other popular libraries. It is designed for React Native developers who want to add smooth, native-feeling animations to their bottom tabs on both Android and iOS.
I demonstrate setting up a fresh React Native project, installing dependencies like React Navigation, Reanimated, D3-shape, and SVG, and configuring the project for Reanimated. Then I build the bottom tabs with custom animated SVG shapes that move as you switch tabs.
What's inside
- Creating a new React Native CLI project with TypeScript
- Installing and configuring dependencies for navigation and animation
- Setting up bottom tab navigation with React Navigation
- Creating simple screen components for tabs
- Adding helper constants and utility functions for screen dimensions and SVG paths
- Building a custom animated bottom tab component using Reanimated and SVG
- Integrating the animated tab bar into the app
- Running and testing the app on iOS and Android simulators
Creating a new React Native CLI project with TypeScript
I start by creating a new React Native project using the CLI command . This initializes a fresh project with TypeScript as the default language.
I open the project in Visual Studio Code and run the iOS simulator with . I clears the default template code and replaces it with a simple empty component to start fresh.
This setup ensures you have a clean base to build the animated bottom tab navigator from scratch.
Installing and configuring dependencies for navigation and animation
Next, I install several dependencies needed for navigation and animation:
- and related packages for navigation
- for animations
- for SVG rendering
- for generating SVG paths
- and for better native integration
- for tab icons
I also installs TypeScript types for D3-shape. After installing, I configure the to add the Reanimated plugin, which is required for Reanimated to work properly.
Finally, I run inside the iOS folder to link native dependencies and restarts the app to apply all changes.
Setting up bottom tab navigation with React Navigation
I create a folder and inside it a file to define the bottom tab navigator. I import from React Navigation and initializes the tab navigator.
I wrap the app in and defines four tab screens: Products, Favorites, Cart, and Provider. Each screen is a simple React component imported from a folder.
I disables the default header for each screen and exports the bottom tabs component. Then I import and renders this bottom tabs component inside .
This sets up a basic bottom tab navigation structure without animations yet.
Creating simple screen components for tabs
To keep the demo focused, I create simple placeholder screen components for each tab inside a folder. Each screen just renders a centered text label like "Products" or "Favorites".
This allows the navigation to work and the tabs to switch screens without extra UI complexity.
Adding helper constants and utility functions for screen dimensions and SVG paths
I create a folder with a file exporting the device screen width and height using React Native's API. This helps with layout calculations.
I also creates a folder with a file containing helper functions to generate SVG paths centered by index. These functions use D3-shape and React Native's API to create smooth curves for the animated tab indicator.
These utilities are essential for building the custom animated SVG tab bar.
Building a custom animated bottom tab component using Reanimated and SVG
The core of this tutorial is building a custom animated bottom tab bar. I create a folder and start implementing a tab bar that uses Reanimated shared values and animated SVG paths.
The animated SVG shape moves horizontally as the user switches tabs, creating a smooth sliding effect. The tab icons and colors are customizable.
This approach leverages Reanimated's native driver for smooth performance and D3-shape for complex path generation.
Integrating the animated tab bar into the app
After building the animated tab bar component, I integrates it into the bottom tab navigator by passing it as the prop.
This replaces the default tab bar with the custom animated one, enabling the smooth sliding animation when switching tabs.
I test the app on iOS and Android simulators to confirm the animation works natively on both platforms.
Running and testing the app on iOS and Android simulators
Throughout the tutorial, I run the app on the iPhone 14 Pro simulator using and mentions it also works on Android.
I show the animated bottom tab in action, demonstrating the smooth movement of the SVG indicator and icon color changes.
This confirms the setup and animation work well on real devices and simulators.
Resources

CourseReact Native course
Master React Native fundamentals and build production apps with lifetime access.

YouTubeAnimated Bottom Tab with React Native CLI and Reanimated
Watch the full video tutorial on building an animated bottom tab navigator.
Like this article? Get the rest of the library plus weekly React Native tips. Free.