XP bar

XP bar is a neobrutalist React component from Cruise UI. A segmented game bar: level badge, XP / health / mana fill and the value. Install it with npx shadcn@latest add @cruiseui/xp-bar.

Install

Terminal

npx shadcn@latest add @cruiseui/xp-bar

First time? Installation shows the one-off components.json setup (the @cruiseui registry) and how to turn the theme on.

Example

Corners
Level 7

When to use it

When to use

Game HUDs and gamified apps: experience, health, mana, streaks.

When not to

Uploads or task progress (use Progress).

Props

CruiseXpBar

PropTypeDefaultDescription
kind?"xp" | "health" | "mana""xp"—
valuenumber——
maxnumber——
level?number—Shows "LV 7" on the left.
label?string—Accessible name; defaults to "Experience", "Health" or "Mana".
segments?number10Number of segments (ink dividers).
className?string——

Accessibility

  • role="progressbar" with aria-valuenow / max and a value text ("1,240 / 2,000 XP").
  • Low health also says "low", not only red.
  • The fill animates in 300ms; none under reduced motion.