Dynamic Tab Indicator with Reanimated ๐
Wednesday, March 22, 2023
Scan to try on your device
Need the app?
reanimated
demos
dynamic-tab-indicator
An ongoing collection of React Native animations crafted with Reanimated, Gesture Handler, and Skia.
TypeScript
3.2k
296
A tab indicator component that adjusts its size and position based on tab content.
What's This About?
This component creates a tab bar that:
Adjusts indicator width to tab content
Animates between tab selections
Supports custom data input
Handles dynamic content sizes
Technical Implementation
The component uses:
Reanimated for smooth transitions
Dynamic width calculations
Tab content measurements
Custom data mapping
Usage
type TabData = {
id: string;
title: string;
// other data properties
};
// Basic usage
const data: TabData[] = [
{ id: '1', title: 'Tab 1' },
{ id: '2', title: 'Tab 2' },
// ...more tabs
];
<DynamicTabIndicator data={data} />;
Unlock the beauty of React Native animations
Learn Reanimated, Gesture Handler & Skia with Reanimate.dev
Feedback on Dynamic Tab Indicator
Ideas, bugs, or anything that felt off: I read every message. For anything else, write to hello@reactiive.io.
Send feedback