Animated FlatList component that supports entering, exiting and reordering animations.

Overview

react-native-flatlist-animated

Animated FlatList component that supports entering, exiting and reordering animations.

Installation

npm i react-native-flatlist-animated

Demo

Supports zoom, fade and slide animations for enterance and exit.

zoom slide

Key Advantages

  • No animation on layout properties (better performance)
  • Handles unmounting and mounting animations
  • Handles list re-ordering
  • Native driver is used in all animations
  • Supports React Native FlatList props
  • JavaScript only implementation
  • Fully typed

Usage

import { Text, View } from "react-native";
import AnimatedFlatList from "react-native-flatlist-animated";

const listData = [
  { key: "item1", value: "ITEM-1" },
  { key: "item2", value: "ITEM-2" },
];

() => (
  <AnimatedFlatList
    data={listData}
    style={{ width: "100%" }}
    itemContainerHeight={50}
    renderItem={({ item, _index }) => (
      <View style={{ width: "100%", height: "100%" }}>
        <Text>{item.value}</Text>
      </View>
    )}
  />
);

Properties

Property Description Default
itemContainerHeight Required. Height of a single list item. -
entering Optional. Animation selection for entering phase. zoomIn
exiting Optional. Animation selection for exiting phase. zoomOut
transition Optional. Animation selection for layout transitions. spring
reordering Optional. Animation selection for items that are moved up in the list. translateOnly
timingConfig Optional. Animation configuration for transitions. Requires transition="timing". Default timing config in Animated API. Note that below props will be overwritten: toValue: 1, duration: depends, delay: depends, useNativeDriver: true
springConfig Optional. Animation configuration for transitions. Requires transition="spring". Default spring config in Animated API. Note that below props will be overwritten: toValue: 1, delay: depends, useNativeDriver: true
enterDuration Optional. Duration of entering animation in milliseconds. 250
exitDuration Optional. Duration of exiting animation in milliseconds. 250
horizontalSlideRange Optional. The initial or final position to be used in sliding type animations. screen width

Examples

Check full example in the Example folder.

  • Click on the items to remove them from the list.
  • Press Add Item to add random entry from the map.
  • Press Delete Item to remove a random entry from the list.
  • Press Reorder Item to pick a random entry and change its position randomly.

Note: The assets used in the example app represent imaginary characters but influenced by real friendship. I have used Aseprite for pixel art.

You might also like...

To eleventy and beyond! The all-in-one tool for templates where you want them, component frameworks where you need them πŸš€

To eleventy and beyond! The all-in-one tool for templates where you want them, component frameworks where you need them πŸš€

Slinkity 🚧 This project is heavily under construction! 🚧 As excited as you may be, we don't recommend this early alpha for production use. Still, gi

Dec 27, 2022

A headless React component that lets you control how visible and overflown items are rendered πŸ‘€

A headless React component that lets you control how visible and overflown items are rendered πŸ‘€

react-overflow-list A hooks based implementation of the OverflowList component from Blueprint JS. Installation yarn add react-overflow-list Basic Usa

May 31, 2022

TV Show App is an application that allows to searh tv shows based on user input. Each tv show is displayed in a Bulma Card component and when clicked, heads you to the official tv show site

TV SHOW APP TV Show App is an application that allows to search tv shows based on user input. Each tv show is displayed in a Bulma* Card component and

Dec 19, 2021

React tooltip is a React.JS Component that brings usefull UX and UI information in selected elements of your website.

React Tooltip βœ… React tooltip is a React.JS Component that brings usefull UX and UI information in elements of your website. Installation ⌨️ React Too

Dec 22, 2021

Accessible, unstyled, open-sourced, and fully functional react component library for building design systems

DORAI UI Accessible, unstyled, open-sourced and fully functional react component library for building design systems Documentation site coming soon St

Dec 30, 2022

A simple and responsive quizlet-like flashcard component with a few additional options

A simple and responsive quizlet-like flashcard component with a few additional options

Welcome to react-quizlet-flashcard πŸ‘‹ A simple and responsive quizlet-like flashcard component with a few additional options. Front and back card acce

Dec 17, 2022

React Native's Global Alert Component that can be fully customized and without the need of a state.

React Native's Global Alert Component that can be fully customized and without the need of a state.

🚩 React Native Easy Alert React Native Easy Alert Component. Watch on youtube Easy Alert example app. React Native's Global Alert Component that can

Feb 21, 2022

πŸ““ The UI component explorer. Develop, document, & test React, Vue, Angular, Web Components, Ember, Svelte & more!

πŸ““ The UI component explorer. Develop, document, & test React, Vue, Angular, Web Components, Ember, Svelte & more!

Build bulletproof UI components faster Storybook is a development environment for UI components. It allows you to browse a component library, view the

Jan 4, 2023

The Select Component for React.js

React-Select The Select control for React. Initially built for use in KeystoneJS. See react-select.com for live demos and comprehensive docs. React Se

Jan 3, 2023
Owner
null
A set of higher-order components to turn any list into an animated, accessible and touch-friendly sortable list✌️

A set of higher-order components to turn any list into an animated, accessible and touch-friendly sortable list Examples available here: http://claude

ClaudΓ©ric Demers 10.3k Jan 2, 2023
:black_medium_small_square:React Move | Beautiful, data-driven animations for React

React-Move Beautiful, data-driven animations for React. Just 3.5kb (gzipped)! Documentation and Examples Features Animate HTML, SVG & React-Native Fin

Steve Hall 6.5k Jan 1, 2023
The best JavaScript Data Table for building Enterprise Applications. Supports React / Angular / Vue / Plain JavaScript.

Module SonarCloud Status ag-grid-community ag-grid-enterprise AG Grid AG Grid is a fully-featured and highly customizable JavaScript data grid. It del

AG Grid 9.5k Dec 30, 2022
A labeler component that Lays out text and overlays textual decorations like labels, predictions, and relations based on given data and handles user interactions on tokens.

react-text-annotator react-text-annotator is a labeler component that: Lays out text and overlays textual decorations like labels, predictions, and re

Microsoft 25 Dec 11, 2022
Material-UI is a simple and customizable component library to build faster, beautiful, and more accessible React applications. Follow your own design system, or start with Material Design.

Material-UI Quickly build beautiful React apps. Material-UI is a simple and customizable component library to build faster, beautiful, and more access

Material-UI 83.6k Dec 30, 2022
This hook allows you to isolate and manage the state within the component, reducing rendering operations and keeping the source code concise.

React Hook Component State This hook allows you to isolate and manage the state within the component, reducing rendering operations and keeping the so

Yongwoo Jung 2 May 15, 2022
This simple and small react component can check your repository stars and change theme on light/dark

Repository metrics for react This beauty and easy (4KB) react component can help you add metrics to your repositories also you can change component th

Koma Human 2 Jun 25, 2022
A react component available on npm to easily link to your project on github and is made using React, TypeScript and styled-components.

fork-me-corner fork-me-corner is a react component available on npm to easily link to your project on github and is made using React, TypeScript and s

Victor Dantas 9 Jun 30, 2022
A small component based app library composing user interfaces and apps.

See https://vibejs.com for ongoing documentation and info. VibeJS A small component based JavaScript library to build user interfaces and apps. If you

Bret 20 Nov 16, 2022
Source code for my tutorial on how to build customizable table component with React Table and Tailwind CSS.

React Table + Tailwind CSS = ❀️ Source code for my tutorial on how to build customizable table component with React Table and Tailwind CSS. Both parts

Samuel Liedtke 147 Jan 7, 2023