MCPInstall

roblox-ui

Responsive cross-platform UI - ScreenGui and safe areas (ScreenInsets), Scale vs Offset, UIListLayout flex/UIFlexItem, constraints, StyleSheets/tokens/themes, RichText, gamepad/touch navigation, UIDragDetector, CanvasGroup, tweens, BillboardGui/SurfaceGui, React-lua/Fusion/Vide. Use when building HUDs, menus, shops, inventories, or fixing UI that breaks on mobile, console, or other screen sizes.

Installs
482
Last 24h
+25
Trending rank
#4962
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/el4cteo/roblox-skills --skill roblox-ui
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads roblox-ui automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Roblox UI

Foundations

  • Put UI in StarterGui as ScreenGuis (copied to each player's PlayerGui), or create it from a client controller. UI code is client-only; the server never touches PlayerGui in normal designs.
  • ScreenGui defaults to set: ResetOnSpawn = false (keep UI across deaths), ZIndexBehavior = Sibling, IgnoreGuiInset per design, ScreenInsets = CoreUISafeInsets for interactive UI (clears notches and the Roblox top bar); DeviceSafeInsets/None only for full-bleed backgrounds.
  • Size and position with Scale (UDim2.fromScale) plus constraints; use Offset only for fixed details (padding, strokes, icons). Pure-Offset UI breaks on phones and 4K screens.
  • AnchorPoint = Vector2.new(0.5, 0.5) + Position = UDim2.fromScale(0.5, 0.5) centers an element.
  • UIAspectRatioConstraint keeps shapes square/consistent; UISizeConstraint caps sizes; UITextSizeConstraint with TextScaled bounds text size (prefer fixed TextSize + AutomaticSize where possible — TextScaled produces inconsistent sizes).
  • AutomaticSize lets frames grow with content (lists, tooltips, chat bubbles).
  • Test every screen in the Device Simulator (phone portrait/landscape, tablet, console 10-foot, 4K).

Layout

NeedUse
Rows/columns that adaptUIListLayout (FillDirection, Padding, HorizontalFlex/VerticalFlex, Wraps)
One item grows to fill spaceUIFlexItem child with FlexMode = Fill (or Grow/Shrink/Custom)
Grids (inventory)UIGridLayout inside a ScrollingFrame with AutomaticCanvasSize
Carousels/pagesUIPageLayout
Rounded corners, borders, paddingUICorner, UIStroke, UIPadding
Gradients, shadowsUIGradient, UIShadow
Scale a whole groupUIScale
--!strict
local Players = game:GetService("Players")

local playerGui = Players.LocalPlayer:WaitForChild("PlayerGui")

local screenGui = Instance.new("ScreenGui")
screenGui.Name = "Hud"
screenGui.ResetOnSpawn = false
screenGui.ScreenInsets = Enum.ScreenInsets.CoreUISafeInsets

local bar = Instance.new("Frame")
bar.Name = "Toolbar"
bar.AnchorPoint = Vector2.new(0.5, 1)
bar.Position = UDim2.new(0.5, 0, 1, -16)
bar.Size = UDim2.fromScale(0.6, 0.1)
bar.BackgroundTransparency = 0.3
bar.Parent = screenGui

local list = Instance.new("UIListLayout")
list.FillDirection = Enum.FillDirection.Horizontal
list.HorizontalFlex = Enum.UIFlexAlignment.Fill -- slots share the width equally
list.Padding = UDim.new(0, 8)
list.Parent = bar

Instance.new("UICorner").Parent = bar
local padding = Instance.new("UIPadding")
padding.PaddingLeft, padding.PaddingRight = UDim.new(0, 8), UDim.new(0, 8)
padding.Parent = bar

for slot = 1, 5 do
	local button = Instance.new("TextButton")
	button.Name = `Slot{slot}`
	button.Text = tostring(slot)
	button.Size = UDim2.fromScale(0, 1)
	button.Parent = bar
	Instance.new("UIAspectRatioConstraint").Parent = button
end

screenGui.Parent = playerGui -- parent last: one layout pass, no flicker

Styling: StyleSheets (CSS-like)

Roblox's engine-level styling replaces copy-pasted property values:

  • StyleSheet with StyleRules (Selector like "TextButton", ".Primary" (tag), "#Close" (name), "TextButton:Hover" (state), "::UICorner" (modifier pseudo-instance)) and rule:SetProperties({...}).
  • Tokens are attributes on a token sheet ($Primary, $Radius); themes are sheets deriving tokens (StyleDerive); swap themes by retargeting the StyleDerive.
  • A StyleLink under a ScreenGui applies one sheet to that tree. Style queries (@Name) switch styles by screen size, input type, or accessibility settings.
  • Edit visually in Studio's Style Editor. Details and a code example: references/styling-and-frameworks.md.

Cross-platform input in UI

  • Read UserInputService.PreferredInput (KeyboardAndMouse, Touch, Gamepad) and listen to UserInputService:GetPropertyChangedSignal("PreferredInput") to swap button prompts and layouts. Don't infer platform from TouchEnabled/KeyboardEnabled alone.
  • Use GuiButton.Activated (works for mouse, touch, and gamepad) instead of MouseButton1Click.
  • Gamepad/console: every interactive element Selectable, set GuiService.SelectedObject when a menu opens, group with SelectionGroup/NextSelection* for predictable D-pad navigation, support ButtonB to close. Minimum touch target ≈ 44×44 px; readable text ≥ 14 px on phones.
  • Bind actions through the Input Action System (InputBinding.UIButton makes an on-screen button trigger an action) — see roblox-input.

Text

  • RichText = true enables <b>, <i>, <font color="#FF0">, <stroke>, etc. Escape user text.
  • Any text from one player shown to another must be filtered with TextService:FilterStringAsync on the server (roblox-text-chat). That includes pet names, signs, guild names, trade notes.
  • Use FontFace = Font.new("rbxasset://fonts/families/GothamSSm.json", Enum.FontWeight.Bold) for weights.
  • Localize with LocalizationTables and auto-translation; avoid baking text into images.

Animation and feel

  • Tween on the client: TweenService:Create(frame, TweenInfo.new(0.2, Enum.EasingStyle.Quad), { Position = ... }):Play().
  • Animate UIScale.Scale for pop effects rather than Size (keeps layout stable).
  • CanvasGroup fades a whole subtree (GroupTransparency) but renders to a texture: use it for fading panels, not for large always-visible UI (memory/quality cost).
  • ClipsDescendants now clips rotated children and Path2D too (default since Sep 24, 2026; StarterGui.ClipsDescendantsSupportsRotation opt-out is removed in November 2026). To keep a rotated child unclipped, make it a sibling with a higher ZIndex. A rotated parent still clips only inside a CanvasGroup.
  • Drag-and-drop: UIDragDetector (the deprecated GuiObject.Draggable no longer works for new work).

World-space UI

  • BillboardGui (faces camera: names, health bars) — set MaxDistance, AlwaysOnTop sparingly, use Size in Scale for distance scaling; SurfaceGui for screens/signs on parts. Prefer Adornee + keep them in PlayerGui for per-player content. They stop rendering when their part streams out.
  • ProximityPrompt gives cross-platform interaction UI for free (validate on the server!).

Frameworks

For more than a few screens, a declarative framework keeps state and UI in sync:

  • React (jsdotlua/react + react-roblox) — components + hooks, familiar to web devs, scales to big apps.
  • Fusion — reactive state objects and declarative instance creation.
  • Vide — small, fast reactive library. Match whatever the project already uses. Keep game state in controllers; UI only renders it and emits user intents.

Performance

  • Avoid updating text/properties every frame when values haven't changed.
  • Hide closed menus with Visible = false (or Enabled = false on the ScreenGui) instead of destroying/recreating them repeatedly; build large lists lazily or virtualize them.
  • Too many UIGradient/CanvasGroup/UIStroke on dynamic UI costs frame time; check the MicroProfiler.

Related skills

roblox-input (actions, gamepad), roblox-text-chat (filtering), roblox-monetization (shops), roblox-luau, roblox-performance.

FAQ

What does the roblox-ui skill do?

Responsive cross-platform UI - ScreenGui and safe areas (ScreenInsets), Scale vs Offset, UIListLayout flex/UIFlexItem, constraints, StyleSheets/tokens/themes, RichText, gamepad/touch navigation, UIDragDetector, CanvasGroup, tweens, BillboardGui/SurfaceGui, React-lua/Fusion/Vide. Use when building HUDs, menus, shops, inventories, or fixing UI that breaks on mobile, console, or other screen sizes.

How do I install roblox-ui?

Run npx skills add https://github.com/el4cteo/roblox-skills --skill roblox-ui in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/roblox-ui/ (personal) or .claude/skills/roblox-ui/ (project).

Which AI agents can use roblox-ui?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is roblox-ui safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains roblox-ui?

It is published by el4cteo in el4cteo/roblox-skills. It has 482 recorded installs.

More from el4cteo/roblox-skills

View all →

roblox-world-building

el4cteo/roblox-skills

Building worlds with code - parts, models and pivots, materials, Lighting (LightingStyle, Atmosphere, post-processing), day/night, Terrain API, in-game CSG and destruction (GeometryService Subtract/Union/Fragment), ProceduralModel, EditableMesh/EditableImage, particles/beams/trails/highlights. Use when creating maps, environments, lighting, destructible objects, procedural levels, or visual effects.

Backend & APIs487 installs

roblox-testing

el4cteo/roblox-skills

Open the skill to read its SKILL.md instructions.

Testing & QA469 installs

roblox-luau

el4cteo/roblox-skills

Open the skill to read its SKILL.md instructions.

466 installs

roblox-performance

el4cteo/roblox-skills

Open the skill to read its SKILL.md instructions.

roblox-game-systems

el4cteo/roblox-skills

Open the skill to read its SKILL.md instructions.

Media & Creative460 installs

roblox-security

el4cteo/roblox-skills

Open the skill to read its SKILL.md instructions.

Security459 installs

Popular frontend & design skills

View category →

setup-matt-pocock-skills

mattpocock/skills

Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.

Frontend & Design1.1M installs

frontend-design

anthropics/skills

Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.

OfficialFrontend & Design1M installs

hyperframes-animation

heygen-com/hyperframes

All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.

prototype

mattpocock/skills

Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.

Frontend & Design999.2K installs

hyperframes-core

heygen-com/hyperframes

The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.

Frontend & Design930.5K installs

vercel-react-best-practices

vercel-labs/agent-skills

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

OfficialFrontend & Design843.1K installs