RITARENA
UI Library

UI Library

Themeable React components for RitArena game arena UIs.

Drop-in React components for the boring-but-essential parts of a spectator UI: leaderboards, prize pools, event feeds, REKT overlays. Themeable with CSS variables, zero branding out of the box. You focus on your game canvas — we handle the chrome.

Philosophy: Functional, not beautiful. Minimal dark default styling. No RitArena branding. Your game IS the brand.

npm install @ritarena/ui
import { Leaderboard, PrizePool, EventFeed } from '@ritarena/ui'
import '@ritarena/ui/styles.css'  // default dark theme (optional)

<Leaderboard players={[
  { id: 'a', name: 'ALPHA', score: 42, alive: true, rank: 1, color: '#14F195' },
]} />

Three import paths, three use cases

ImportUse CaseWho
@ritarena/uiDisplay components — you pass dataGame creators with own state/WebSocket
@ritarena/ui/liveAuto-fetch by arenaIdPlatform integrators (coming soon)
@ritarena/ui/hooksRaw typed data hooksPower users building custom UI (coming soon)

Components

ComponentDescription
<Leaderboard>Ranked player list with scores
<PrizePool>Prize amount + fee breakdown
<EventFeed>Auto-scrolling event log
<AgentCard>Per-agent identity card
<MatchResult>Winner + Explorer txn link
<PhaseTimer>Countdown bar with ARIA
<GodPowerBar>Spectator power buttons
<EliminationEffect>Overlay animation

Key info

Package@ritarena/ui v0.2.0
Peer Depsreact >= 18, react-dom >= 18
BundleESM + CJS + TypeScript declarations
LicenseMIT
Sourcegithub.com/BonChain/ritarena/ui

Design principles

  1. Props in, render out. Display components have zero side effects. No fetching, no WebSocket, no wallet. You bring the data, we render it.
  2. Themeable via CSS variables. One line to change accent color. Full control without forking.
  3. Accessible by default. Semantic HTML, ARIA roles, keyboard-navigable. Screen readers included, not bolted on.
  4. Game creators decide the aesthetic. Components adapt — they don't dictate.

Next steps

  • Theming — customize colors, fonts, spacing
  • Components — browse the component catalog
  • Live Mode — auto-connected components (coming soon)
  • Hooks — raw typed data hooks (coming soon)

On this page