Feedback on custom leaderboard UI

Hey everyone, recently I created a bit of leaderboard UI (which I translated into Roact) I feel like there is something off with it and I could use some feedback. I am not the best at UI design (as you may tell with the way the UI looks :sweat_smile: ) I am looking to improve at UI design for the project I’m working on (any tips or tutorials will be nice as well :wink: ). Enough talk, this is what the UI looks like:

Please critique it constructively (please) I don’t mind if you call my UI trash it is all apart of the learning progress :pray: Thanks in advance to whomever decides to take a look at my UI attempt sorry if it’s horrible (also in advance :sweat_smile: )

6 Likes

If your interested in how I did the UI I wouldn’t mind breaking it down as well.

it looks really cool! I didn’t know there was a pixel font in Roblox :O

Surprisingly, there is (Press Start P2 or 2P I forgot) it is the main font in the game I’m working on as you may or may not tell lol.

1 Like

Im curious how you like to lay everything out? Im working on a project right now using React Roblox (basically the same as Roact). What organizational structure are you using?

For the chips you can see I broke it down into 2 separate components “TeamChip” and “PlayerChip” and I just use Roact.createElement() in the main leaderboard handler to actually create the 2 chips. This is what the code looks like in both of them:

PlayerChip:

local Roact = require(game.ReplicatedStorage.Shared.Dependencies.roact)

local function PlayerChip(props)
	return Roact.createElement("Frame", {
		Size = UDim2.fromScale(0.99, 0.061),
		BackgroundColor3 = Color3.fromRGB(0, 0, 0),
		BackgroundTransparency = 0.3,
		LayoutOrder = props.LayoutOrder,
	}, {
		UIAspectRatioConstraint = Roact.createElement("UIAspectRatioConstraint", {
			AspectRatio = 11.76,
		}),
		UICorner = Roact.createElement("UICorner", {
			CornerRadius = UDim.new(0, 2),
		}),
		UIPadding = Roact.createElement("UIPadding", {
			PaddingLeft = UDim.new(0.04, 0),
		}),
		InformationOpen = Roact.createElement("TextButton", {
			Text = "",
			BackgroundTransparency = 1,
			Position = UDim2.fromScale(-0.043, 0),
			Size = UDim2.fromScale(1.043, 1),

			[Roact.Event.Activated] = function()
				if props.onActivated then
					props.onActivated()
				end
			end,
		}),
		PlayerName = Roact.createElement("TextLabel", {
			Position = UDim2.fromScale(0, 0),
			Size = UDim2.fromScale(0.67, 1),
			Text = props.PlayerName,
			TextScaled = true,
			TextColor3 = Color3.fromRGB(255, 255, 255),
			FontFace = Font.new("rbxasset://fonts/families/PressStart2P.json", Enum.FontWeight.Regular),
			BackgroundTransparency = 1,
			TextXAlignment = Enum.TextXAlignment.Left,
		}, {
			UIAspectRatioConstraint = Roact.createElement("UIAspectRatioConstraint", {
				AspectRatio = 7.57,
			}),
		}),
		Parameter1 = Roact.createElement("TextLabel", {
			Position = UDim2.fromScale(0.639, 0),
			Size = UDim2.fromScale(0.171, 1),
			Text = props.Level,
			TextScaled = true,
			TextColor3 = Color3.fromRGB(255, 255, 255),
			FontFace = Font.new("rbxasset://fonts/families/PressStart2P.json", Enum.FontWeight.Regular),
			BackgroundTransparency = 1,
		}, {
			UIAspectRatioConstraint = Roact.createElement("UIAspectRatioConstraint", {
				AspectRatio = 1.935,
			}),
			UITextSizeConstraint = Roact.createElement("UITextSizeConstraint", {
				MaxTextSize = 25,
				MinTextSize = 1,
			}),
		}),
		Parameter2 = Roact.createElement("TextLabel", {
			Position = UDim2.fromScale(0.826, 0),
			Size = UDim2.fromScale(0.171, 1),
			Text = props.XP,
			TextScaled = true,
			TextColor3 = Color3.fromRGB(255, 255, 255),
			FontFace = Font.new("rbxasset://fonts/families/PressStart2P.json", Enum.FontWeight.Regular),
			BackgroundTransparency = 1,
		}, {
			UIAspectRatioConstraint = Roact.createElement("UIAspectRatioConstraint", {
				AspectRatio = 1.935,
			}),
			UITextSizeConstraint = Roact.createElement("UITextSizeConstraint", {
				MaxTextSize = 25,
				MinTextSize = 1,
			}),
		}),
	})
end

return PlayerChip```

TeamChip:
```lua
local Roact = require(game.ReplicatedStorage.Shared.Dependencies.roact)

local function TeamSeperator(props)
	return Roact.createElement("Frame", {
		Size = UDim2.fromScale(0.99, 0.046),
		BackgroundTransparency = 0.3,
		BackgroundColor3 = props.BackgroundColor3,
		LayoutOrder = props.LayoutOrder,
		BorderSizePixel = 0,
	}, {
		UIAspectRatioConstraint = Roact.createElement("UIAspectRatioConstraint", {
			AspectRatio = 15.474,
		}),
		UIPadding = Roact.createElement("UIPadding", {
			PaddingLeft = UDim.new(0.04, 0),
		}),
		TeamName = Roact.createElement("TextLabel", {
			Position = UDim2.fromScale(0, 0),
			Size = UDim2.fromScale(0.32, 1),
			Text = props.TeamName,
			TextScaled = true,
			TextColor3 = Color3.fromRGB(255, 255, 255),
			FontFace = Font.new("rbxasset://fonts/families/PressStart2P.json", Enum.FontWeight.Regular),
			BackgroundTransparency = 1,
			TextXAlignment = Enum.TextXAlignment.Left,
		}, {
			UIAspectRatioConstraint = Roact.createElement("UIAspectRatioConstraint", {
				AspectRatio = 4.749,
			}),
		}),
	})
end

return TeamSeperator

Hope that helps :smile: