0.4.0 • Published 4 months ago

react-maplist v0.4.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

MapList Component Documentation

Welcome to the MapList documentation! This document will guide you through installing, using, and customizing MapList, a performant list component with animations and lazy loading.


📦 Installation

You can install MapList via npm or yarn:

npm install react-maplist

or

yarn add react-maplist

🚀 Usage

To use MapList in your project, import it and pass your data:

import MapList from 'react-maplist';

const data = ["Item 1", "Item 2", "Item 3", "Item 4"];

<MapList 
  data={data} 
  renderItem={(item) => <div>{item}</div>} 
/>;

🎛️ Props

PropTypeDescription
dataArrayThe list of items to render.
renderItemFunctionFunction to render each item.
keyExtractorFunctionExtracts a unique key for each item.
horizontalBooleanDisplays items in a horizontal list.
showsScrollIndicatorBooleanShows or hides the scrollbar.
itemSpacingNumberSpacing between items.
numColumnsNumberNumber of columns (grid layout).
numRowsNumberNumber of rows (grid layout).
onEndReachedFunctionCallback when reaching the end of the list.

🎨 Customization

You can customize the styles of the MapList component using Tailwind CSS or any custom styles:

<MapList 
  data={data} 
  renderItem={(item) => (
    <div className="p-4 bg-gray-200 rounded-lg shadow-md">{item}</div>
  )} 
/>;

🌟 Support

For questions or contributions, visit the GitHub repository or open an issue.

Happy coding! 🚀

0.4.0

4 months ago

0.3.0

4 months ago

0.2.0

4 months ago

0.1.0

4 months ago

1.0.2

4 months ago

1.0.1

4 months ago

1.0.0

4 months ago