tsukikage
v0.1.4
Published
π A sleek, customizable React ranking component library
Maintainers
Readme
π tsukikage
ζε½± β moonlight in Japanese. A sleek, fully customizable React ranking component library.
β¨ What is tsukikage?
tsukikage is a React component library for building beautiful, flexible ranking lists. Drop it into your project, pass your data, and get a fully styled, animated leaderboard β with total control over how it looks and behaves.
Whether you're building a game leaderboard, a points-based system, a productivity tracker, or any competitive UI, tsukikage gives you the tools to make it shine. π
π Getting Started
π§ This library is currently in active development. The API may change before the first stable release.
Installation (coming soon)
npm install tsukikageUsage
import { Ranking } from 'tsukikage'
const entries = [
{ id: 1, label: "Hector", score: 9840 },
{ id: 2, label: "Alex Poatan", score: 7200 },
{ id: 3, label: "Jon Jones", score: 6800 },
]
function App() {
return (
<Ranking
entries={entries}
title="Leaderboard"
scoreType={1}
highlightFn={(entry) => entry.score > 9000}
/>
)
}π§© Components
<Ranking />
The main component. Accepts a list of entries and renders a sorted, styled ranking list.
| Prop | Type | Default | Description |
|---------------|-----------------------------------------------|---------|-----------------------------------------------------------------|
| entries | RankingEntry[] | β | Required. Array of items to rank. |
| title | string | β | Optional heading displayed above the list. |
| scoreType | 1 \| 2 \| 3 | 1 | Controls the score unit label: pts, xp, or coins. |
| highlightFn | (entry, index) => boolean | β | Function that determines which entries get a highlight effect. |
RankingEntry type
interface RankingEntry {
id: string | number // Unique identifier
label: string // Display name
score: number // Numeric score (used for sorting)
avatar?: string // Optional image URL
}π¨ Visual Features
- π₯π₯π₯ Medal badges for the top 3 positions
- β¨ Highlight animations β shine effect, scale, and glow for featured entries
- πΌοΈ Avatar support β image or auto-generated initials fallback
- π·οΈ Score labels β pts / xp / coins (more coming soon)
- π Smooth hover interactions β lift, scale, shadow transitions
- ποΈ CSS-only animations β no JavaScript animation dependencies
π£οΈ Roadmap
Here's what's planned for tsukikage:
- [ ] π Multiple visual themes (dark, neon, minimal, glass, etc.)
- [ ] π¦ More highlight types (pulse, border glow, badge, crown)
- [ ] π’ Custom score formatters
- [ ] π·οΈ Custom score unit labels (beyond
pts,xp,coins) - [ ] π Animated re-ranking (score changes with smooth transitions)
- [ ] π± Mobile-first responsive variants
- [ ] βΏ Full accessibility (ARIA roles, keyboard navigation)
- [ ] π npm package release
- [ ] π Storybook documentation site
ποΈ Project Structure
src/
βββ components/
β βββ Ranking.tsx # Main ranking component
β βββ RankingItem.tsx # Individual row component
βββ css/
β βββ Ranking.module.css # Scoped styles with animations
βββ types/
β βββ ranking.types.ts # TypeScript interfaces & types
βββ utils/
β βββ ranking.utils.ts # Sorting helpers & medal logic
βββ main.tsx # App entry pointπ οΈ Development
This project uses Vite + React 19 + TypeScript.
# Install dependencies
npm install
# Start dev server
npm run dev
# Build
npm run build
# Lint
npm run lintπ€ Contributing
Contributions, ideas, and feedback are very welcome! This is an early-stage project and the API is still being shaped. Feel free to open an issue or submit a PR.
π License
MIT Β© tsukikage contributors
