roblox-ui
Responsive cross-platform UI - ScreenGui and safe areas (ScreenInsets), Scale vs Offset, UIListLayout flex/UIFlexItem, constraints, StyleSheets/tokens/themes…
от EL4CTEO★ 169 звёзд на GitHub
Установить roblox-ui в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Roblox UI
Foundations
- Put UI in
StarterGuiasScreenGuis (copied to each player'sPlayerGui), or create it from a client controller. UI code is client-only; the server never touchesPlayerGuiin normal designs. ScreenGuidefaults to set:ResetOnSpawn = false(keep UI across deaths),ZIndexBehavior = Sibling,IgnoreGuiInsetper design,ScreenInsets = CoreUISafeInsetsfor interactive UI (clears notches and the Roblox top bar);DeviceSafeInsets/Noneonly 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.UIAspectRatioConstraintkeeps shapes square/consistent;UISizeConstraintcaps sizes;UITextSizeConstraintwithTextScaledbounds text size (prefer fixedTextSize+AutomaticSizewhere possible —TextScaledproduces inconsistent sizes).AutomaticSizelets frames grow with content (lists, tooltips, chat bubbles).- Test every screen in the Device Simulator (phone portrait/landscape, tablet, console 10-foot, 4K).
Layout
| Need | Use |
|---|---|
| Rows/columns that adapt | UIListLayout (FillDirection, Padding, HorizontalFlex/VerticalFlex, Wraps) |
| One item grows to fill space | UIFlexItem child with FlexMode = Fill (or Grow/Shrink/Custom) |
| Grids (inventory) | UIGridLayout inside a ScrollingFrame with AutomaticCanvasSize |
| Carousels/pages | UIPageLayout |
| Rounded corners, borders, padding | UICorner, UIStroke, UIPadding |
| Gradients, shadows | UIGradient (Type = Linear/Radial/Conical/Elliptical), UIShadow |
| Scale a whole group | UIScale |
| UI particles (sparkles, coin bursts) | ParticleEmitter2D under any GuiObject (Studio beta, Nov 2026: can't publish yet; Emit(n), flipbooks, EmissionMode, Speed/Acceleration/Drag) |
--!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:
StyleSheetwithStyleRules (Selectorlike"TextButton",".Primary"(tag),"#Close"(name),"TextButton:Hover"(state),"::UICorner"(modifier pseudo-instance)) andrule:SetProperties({...}).- Tokens are attributes on a token sheet (
$Primary,$Radius); themes are sheets deriving tokens (StyleDerive); swap themes by retargeting theStyleDerive. - A
StyleLinkunder aScreenGuiapplies 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 toUserInputService:GetPropertyChangedSignal("PreferredInput")to swap button prompts and layouts. Don't infer platform fromTouchEnabled/KeyboardEnabledalone. - Use
GuiButton.Activated(works for mouse, touch, and gamepad) instead ofMouseButton1Click. - Gamepad/console: every interactive element
Selectable, setGuiService.SelectedObjectwhen a menu opens, group withSelectionGroup/NextSelection*for predictable D-pad navigation, supportButtonBto close. Minimum touch target ≈ 44×44 px; readable text ≥ 14 px on phones. - Bind actions through the Input Action System (
InputBinding.UIButtonmakes an on-screen button trigger an action) — seeroblox-input.
Text
RichText = trueenables<b>,<i>,<font color="#FF0">, `<s
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/styling-and-frameworks.md
FAQ
Что делает скилл 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.
Как установить скилл roblox-ui?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл roblox-ui запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
AnthropicGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
webapp-testing
AnthropicToolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
brand-guidelines
AnthropicApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
web-artifacts-builder
AnthropicSuite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…