An open API service indexing awesome lists of open source software.

https://github.com/elitewise/react-native-ranking-leaderboard

Customizable and modern leaderboard component for React Native apps
https://github.com/elitewise/react-native-ranking-leaderboard

react-native react-native-component react-native-library react-native-package

Last synced: 3 days ago
JSON representation

Customizable and modern leaderboard component for React Native apps

Awesome Lists containing this project

README

        

# ๐Ÿ† react-native-ranking-leaderboard

**Customizable and modern leaderboard component for React Native apps.**

Iโ€™ve always been obsessed with rankings in games โ€” So I decided to turn that obsession into the best leaderboard library.

## Features

- ๐Ÿฅ‡ **Podium** for top 3 users
- ๐Ÿ“‹ **Scrollable list**
- ๐Ÿ‘ค Tap a user to open their **profile**
- ๐Ÿ” **Search bar**
- ๐Ÿ“† **Weekly / Monthly rankings**
- ๐Ÿ“ˆ **Rank change indicators** โ†‘ โ†“
- ๐ŸŽจ Fully customizable styles via props

## Preview



Demo


default


dark

## Installation

```bash
yarn add react-native-ranking-leaderboard
# or
npm install react-native-ranking-leaderboard
```

## How to use it?

```ts
// Data must contain at least 'name' and 'points' fields
// 'sorting' field is only used for weekly or monthly rankings
const data = [
{
name: 'Alice', points: 1200, picture: 'https://example.com/alice.jpg',
sorting: [
{ points: 100, date: new Date(2025, 4, 1) },
{ points: 50, date: new Date(2025, 4, 2) },
],
},
{
name: 'Bob', points: 1100, picture: 'https://example.com/bob.jpg',
sorting: [
{ points: 80, date: new Date(2025, 4, 1) },
{ points: 60, date: new Date(2025, 4, 3) },
],
},
{
name: 'Charlie', points: 1000, picture: 'https://example.com/charlie.jpg',
sorting: [
{ points: 70, date: new Date(2025, 4, 1) },
],
},
{ name: 'Daisy', points: 950, picture: 'https://example.com/daisy.jpg' },
{ name: 'Ethan', points: 900 },
];
```

```tsx

```

## Advanced Props

```tsx
// Adding your custom profile component

type CustomProfileProps = {
user: LeaderboardEntry | null;
onClose: () => void;
};

const CustomProfile = ({ user, onClose }: CustomProfileProps) => {
if (!user) return null;

return (





Add anything you want! ๐Ÿงก





);
}

}
/>
```

```tsx
// Customize Rank Difference

import { ArrowDownRight, ArrowUpRight, Minus } from 'lucide-react-native';

const RankDifferenceIcon = (difference: number) => {
if (difference < 0) return ;
if (difference > 0) return ;
return ;
};

```

More features will come soon!

Made with passion by [EliteWise](https://github.com/EliteWise) ๐Ÿงก