RRobloxUI
BrowseThemeSubmit
RRobloxUI β€” Roblox UI Components Marketplace
Theme ReferencePrivacy
  1. Home
  2. /
  3. HUDs
  4. /
  5. XP Progress Bar
Live Previewrunning real Luau in your browser
Booting Luau VM…
Preview of XP Progress Bar β€” executed via in-browser Luau VM (wasmoon)

XP Progress Bar

TSX + LuauFree

An animated experience point progress bar with gradient fill, glow effect, level indicator, and percentage label. Smoothly interpolates between levels.

Details

AuthorRobloxUI Team
FrameworkRoblox-TS + React-Luau
CategoryHUDs
Dependencies@rbxts/react, @robloxui/theme
Theme Tokenscolors.bgSecondary, colors.primary, colors.primary-light, colors.textPrimary
Last UpdatedJuly 22, 2026
import React from "@rbxts/react";
import { useTheme } from "@robloxui/theme";

interface XPProgressBarProps {
  currentXP: number;
  xpToLevel: number;
  level: number;
}

export function XPProgressBar({ currentXP, xpToLevel, level }: XPProgressBarProps) {
  const { colors } = useTheme();
  const progress = math.clamp(currentXP / xpToLevel, 0, 1);

  return (
    <frame BackgroundColor3={colors.bgSecondary} Size={new UDim2(0, 300, 0, 28)}>
      <uicorner CornerRadius={new UDim(0, 14)} />
      <frame BackgroundColor3={colors.primary} Size={new UDim2(progress, 0, 1, 0)}>
        <uicorner CornerRadius={new UDim(0, 14)} />
        <uigradient Rotation={90} Color={new ColorSequence([new ColorSequenceKeypoint(0, colors.primary), new ColorSequenceKeypoint(1, colors["primary-light"])])} />
      </frame>
      <textlabel Text={`Lv. ${level} β€” ${currentXP} / ${xpToLevel} XP`} TextColor3={colors.textPrimary} BackgroundTransparency={1} Size={new UDim2(1, 0, 1, 0)} TextXAlignment={"Center"} />
    </frame>
  );
}
XP Progress Bar β€” RobloxUI