Skip to content

AnimatedList

A performant animated list component built on top of FlashList with enter/exit animations powered by Reanimated 3.

import { AnimatedList } from '@truongdq01/ui';
import { AnimatedList } from '@truongdq01/ui';
const data = [
{ id: '1', title: 'Item One' },
{ id: '2', title: 'Item Two' },
{ id: '3', title: 'Item Three' },
];
export function MyList() {
return (
<AnimatedList
data={data}
keyExtractor={(item) => item.id}
renderItem={({ item }) => <ListItem title={item.title} />}
enterAnimation="fadeSlideUp"
exitAnimation="fadeOut"
/>
);
}
PropTypeDefaultDescription
dataT[]requiredArray of items to render
renderItem(info: { item: T }) => ReactNoderequiredRender function for each item
keyExtractor(item: T) => stringrequiredKey extractor function
enterAnimation"fadeSlideUp" | "fadeSlideDown" | "fadeIn" | "scaleIn""fadeSlideUp"Enter animation preset
exitAnimation"fadeOut" | "scaleOut" | "slideLeft""fadeOut"Exit animation preset
staggerDelaynumber50Delay between each item animation in ms
estimatedItemSizenumber64Estimated item height for FlashList
  • Requires react-native-reanimated >= 3.0
  • Built on FlashList for optimal scroll performance
  • Animations run on the UI thread (no JS bridge)